RegisterHotKey in Visual C++ 2005. How to use it and reicive information from WM_HOTKEY?
Posted on 2006-06-26
I`m creating a small program in VC++ 2005. This program is a Windows Form Application. Program is almost complete. Currently I`m trying to implement a system wide hotkey in this application. I have searched all over the internet for a clear to a novice user solution.
My intention was to enable and disable a built in Timer using two hotkeys, even when the application is minimized.
From all the solutions I have seen on various websites, I have noticed that hotkeys require the usage of: user32.lib, windows.h, RegisterHotKey() function, onHotKey() function and ON_MESSAGE(WM_HOTKEY, OnHotKey). A call for onHotKey() inside of a message map?
I`m a novice in C++ and Visual C++ 2005.
I`m asking for a sample code, not a link to msdn or google.