question about comparison of DWORD; WPARAM
-
with the help of a c++ 6 control i get hotkey information in the form of a DWORD (it may be f.e. ctrl+s) DWORD CHotKeyCtrl.GetHotKey(); how to extract information so that this DWORD is comparable to a WPARAM in the message queue, if a key is pressed i get a WPARAM with information in it about the key being pressed I just want to know how to compare the dword to the wparam (HIWORD? LOWORD? <- i am a prog-n00b plz easy language)
-
with the help of a c++ 6 control i get hotkey information in the form of a DWORD (it may be f.e. ctrl+s) DWORD CHotKeyCtrl.GetHotKey(); how to extract information so that this DWORD is comparable to a WPARAM in the message queue, if a key is pressed i get a WPARAM with information in it about the key being pressed I just want to know how to compare the dword to the wparam (HIWORD? LOWORD? <- i am a prog-n00b plz easy language)
To extract information from the return value of
CHotKeyCtrl.GetHotKey()
useHIWORD
andLOWORD
macros.wVirtualKeyCode=LOWORD(GetHotKey()); wModifiers=HIWORD(GetHotKey());
To create WPARAM useMAKEWPARAM
macro:MAKEWPARAM(wVirtualKeyCode,wModifiers)
To compare DWORD to WPARAM use:if(wParam==(WPARAM)dwValue)
Regards, Andrzej MarkowskiMy Latest ArticlesCCustomBitmapButton: An owner-draw button and a frame for the caption bar, in one class. CCustomTabCtrl: A clone of the Excel tab sheet control.