Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!ads.com!potomac.ads.com!jtn From: jtn@potomac.ads.com (John T. Nelson) Newsgroups: comp.sys.mac.programmer Subject: Getting resource template ID from Control Handle Message-ID: <1991Jun25.150157.910@potomac.ads.com> Date: 25 Jun 91 15:01:57 GMT Organization: Advanced Decision Systems, Arlington, VA Lines: 26 Okay, here's another little wierd problem I haven't been able to figure out. I have some buttons on a Dialog. The user is clicking on various items in the Dialog but since I use a mixture of controls and text in the dialog I need to use FindControl to figure out who got clicked on and how they should be serviced. Well... FindControl returns a control handle and not a dialog item number (the resource template number). Now I can look at the part code returned by FindControl to figure out whether or not the control is a button or not (inButton) but since there is more than one button in the Dialog I have no way of figuring out WHICH f___ing button was clicked on because all Find Control will tell me is what the handle of the control is. There doesn't seem to be a way to convert from a Handle to the item number. Surely there is an easy way to do this. It's such an obvious problem that someone must have solved it by now. Thanks in advance! --- John T. Nelson Internet: jtn@potomac.ads.com Advanced Decision Systems Uucp: kzin!speaker@mimsy.umd.edu Arlington, VA (703) 243-1611