mystone@caen.engin.umich.edu (Dean Yu) (12/01/88)
Is there a nice, simple way of getting the virtual key code for a particular key if you're given the ASCII character? I have a dialog box with 8 editText items, and I want to get the virtual key code for the first character of each item, then replace the content of each item with the uppercase character of that character. This is a dialog to modify the controls for a game, and I want it to respond to just the key, independent of whether or not caps lock is down. The way I'm doing it now, I have a filterProc for the dialog box, in which I'm getting keyDowns, and remembering the virtual code from the event.message field of the event record. Then I pipe this through KeyTrans (a la IM V), do some bit shifting, GetDIteming, and SetITexting to get it into the editText item in the dialog. This is a major pain, and takes up a lot of space. There has GOT to be an easier way! Does anyone have any ideas? Tnx1E06 in advance! ______________________________________________________________________________ Dean Yu | E-mail: mystone@caen.engin.umich.edu University of Michigan | Real-mail: Dean Yu Computer Aided Engineering Network | 2413 Kelsey House ===================================| 600 E Madison "These are MY opinions." (My | Ann Arbor, MI 48109 employer doesn't want them. |========================================== Actually, they don't really care | what I think. But President | This space intentionally left blank. Duderstadt does...) | ------------------------------------------------------------------------------