Catching Windows Messages - Other Than A Right Mouse Click (OpenInsight Specific)
At 02 SEP 1998 01:33:21AM Greg James, ISIS, Inc. wrote:
A past issue of the S/ENL describes how SEND_MESSAGE (using the QUALIFY_EVENT) and WINMSG (of the control of interest) can be used to catch windows messages. Specifically, a right mouse click (aka 0x7b) is discussed.
Are TABs and ESCAPEs also considered windows messages? How could a TAB or ESCAPE be caught in order to execute a 'control specific' script in the WINMSG event of a control?
Thanks.
At 02 SEP 1998 09:44AM Carl Pates wrote:
Greg,
You can use the same method (QUALIFY_EVENT) but you'll probably need to catch the WM_KEYDOWN message and check to see which key has been pressed.
eg.
In the CREATE event…
Equ WM_KEYDOWN$ To 256
RetVal=Send_Message( CtrlName, "QUALIFY_EVENT", WM_KEYDOWN$, TRUE$ )
Then in the WINMSG event…
Begin Case
Case Message=WM_KEYDOWN$Begin CaseCase wParam=9 ; * // VK_TAB
** Some processingCase wParam=27 ; * // VK_ESCAPEEnd CaseEnd Case
etc etc…
World Leaders in all things RevSoft