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)
User 1343677
Posts
-
question about comparison of DWORD; WPARAM -
WM_HOTKEY how to notice a global hotkey release (keyup)?ty but doesnt work; since on release i dont get a WM_HOTKEY message and after releasing i wont get in the mentioned function (ON_WM_HOTKEY)
-
WM_HOTKEY how to notice a global hotkey release (keyup)?on pressing the global hotkey for some time ... I get a lot of WM_HOTKEY messages. But how to notice the release of the hotkey button? WM_KEYUP Notification (according to msdn) is posted to window with KEYBOARD FOCUS. but since i have a global hotkey i won't necessarily have keyboard focus. any suggestions?
-
global hotkey: i dont get the WM_HOTKEY messageI have a volume control prog. downloaded and written the necessary hotkey code lines based on Beginner's Tutorial - Using global hotkeys http://www.codeproject.com/system/nishhotkeys01.asp into it. The hotkey succesfully registers. RegisterHotKey(this->m_hWnd, myatom, MOD_CONTROL, VK_UP) on querying this line I get a true in the header: public: ... LRESULT OnHotKey(WPARAM wParam, LPARAM lParam); ... DECLARE_MESSAGE_MAP() in the correspondig cpp file: BEGIN_MESSAGE_MAP(CVolumeControlDemoDlg, CDialog) //{{AFX_MSG_MAP(CVolumeControlDemoDlg) ... // some more messages ON_MESSAGE(WM_HOTKEY,OnHotKey) //}}AFX_MSG_MAP END_MESSAGE_MAP() and also in the cpp file: LRESULT CVolumeControlDemoDlg::OnHotKey(WPARAM wParam, LPARAM lParam) { if(wParam == MOD_CONTROL && lParam == VK_UP) { log.write("!!! HOTKEY PRESSED SUCCESS !!!"); } return 0; } on pressing the hotkey while the prog is running -> NOTHING happens. But if I call the following line in the code I get the WM_HOTKEY message correctly: SendMessage(WM_HOTKEY, MOD_CONTROL, VK_UP); What am I doing wrong? Plz in very easy language since I am a programming N00b. TY