Cheese wrote: |
i know how to code a hotkey in win32 c++, but only while the window is active...
IF ANYONE CAN FIND OUT HOW TO CODE A GLOBAL HOTKEY, THAT WOULD BE AWESOME. |
Code: Show/Hide RegisterHotKey(hwnd, 101, MOD_ALT, 'H'); case WM_HOTKEY: { MessageBox(hwnd,"wm hotkey","wm hotkey",MB_OK | MB_ICONINFORMATION); if(lParam == 101) { MessageBox(hwnd,"wm hotkey","101",MB_OK | MB_ICONINFORMATION); } } break; |
Code: Show/Hide RegisterHotKey(hwnd, 101, MOD_ALT, 'H'); RegisterHotKey(hwnd, 102, MOD_ALT, 'J'); ... case WM_HOTKEY: { if(wParam == 101) { MessageBox(hwnd,"101 W","wm hotkey",MB_OK | MB_ICONINFORMATION); } if(wParam == 102) { MessageBox(hwnd,"102 W","wm hotkey",MB_OK | MB_ICONINFORMATION); } } break; |