ultimatepp/reference/HotKey/main.cpp
cxl 0351e4aa2b reference: Hotkey Ctrl::RegisterSystemHotKey demontration
git-svn-id: svn://ultimatepp.org/upp/trunk@1588 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-09-24 09:41:56 +00:00

23 lines
402 B
C++

#include <CtrlLib/CtrlLib.h>
using namespace Upp;
void HotKey1()
{
PromptOK("HotKey1");
}
void HotKey2()
{
PromptOK("HotKey2");
}
GUI_APP_MAIN
{
TopWindow win;
int id = Ctrl::RegisterSystemHotKey(K_ALT|K_CTRL|K_F11, callback(HotKey1));
Ctrl::RegisterSystemHotKey(K_ALT|K_CTRL|K_SHIFT|K_A, callback(HotKey2));
win.Run();
Ctrl::UnregisterSystemHotKey(id);
win.Run();
}