09-19-2011 03:32 AM
Hello,
I'd like to know if the function can register more than 2 messages? As the function spec, if its 2nd parameter is zero, then the function returns a unique meaaage number. So if want to receive more than 2 Windows messages, can I make the 2nd parameter as such a format: "WM_QUIT, WM_DESTROY" ? thanks.
David
09-20-2011 02:42 PM
David,
If you want to catch windows messages, you should use InstallWinMsgCallback instead of RegisterWinMsgCallback. RegisterWinMsgCallback is instead used for user defined messages.
You can catch two windows messages with a single callback by calling the InstallWinMsgCallback twice: once for each message. For example,
status = InstallWinMsgCallback (panelHandle, WM_LBUTTONDOWN, MyCallback, VAL_MODE_INTERCEPT, NULL, &hwnd); status = InstallWinMsgCallback (panelHandle, WM_LBUTTONUP, MyCallback, VAL_MODE_INTERCEPT, NULL, &hwnd);