mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 16:52:15 +00:00
Package Manager: fixed HotKeys (thanks to w3seek) *shamed*
svn path=/trunk/; revision=14592
This commit is contained in:
parent
abd513250f
commit
e70a05cabf
4 changed files with 18 additions and 7 deletions
|
@ -22,3 +22,13 @@ IDB_TOOLBAR BITMAP DISCARDABLE "res/toolbar.bmp"
|
||||||
13 ICON DISCARDABLE "res/update.ico"
|
13 ICON DISCARDABLE "res/update.ico"
|
||||||
14 ICON DISCARDABLE "res/uninstall.ico"
|
14 ICON DISCARDABLE "res/uninstall.ico"
|
||||||
|
|
||||||
|
/* HotKeys */
|
||||||
|
|
||||||
|
IDR_HOTKEYS ACCELERATORS DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"1", 2, VIRTKEY, CONTROL
|
||||||
|
"2", 3, VIRTKEY, CONTROL
|
||||||
|
"3", 4, VIRTKEY, CONTROL
|
||||||
|
"4", 5, VIRTKEY, CONTROL
|
||||||
|
"0", 1, VIRTKEY, CONTROL
|
||||||
|
END
|
||||||
|
|
|
@ -67,8 +67,11 @@ int WINAPI WinMain (HINSTANCE hinst, HINSTANCE hPrevInstance, PSTR szCmdLine, in
|
||||||
// Start getting messages
|
// Start getting messages
|
||||||
while(GetMessage(&msg,NULL,0,0))
|
while(GetMessage(&msg,NULL,0,0))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
if(!TranslateAccelerator(hwnd, hHotKeys, &msg))
|
||||||
DispatchMessage(&msg);
|
{
|
||||||
|
TranslateMessage(&msg);
|
||||||
|
DispatchMessage(&msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close our handle
|
// Close our handle
|
||||||
|
@ -152,11 +155,7 @@ void InitControls (HWND hwnd)
|
||||||
ImageList_AddIcon(hIcon, LoadIcon(hinst, MAKEINTRESOURCE(10)));
|
ImageList_AddIcon(hIcon, LoadIcon(hinst, MAKEINTRESOURCE(10)));
|
||||||
|
|
||||||
// Setup Hotkeys
|
// Setup Hotkeys
|
||||||
RegisterHotKey(hwnd, 1, MOD_CONTROL, VK_1);
|
hHotKeys = LoadAccelerators (hinst, MAKEINTRESOURCE(IDR_HOTKEYS));
|
||||||
RegisterHotKey(hwnd, 2, MOD_CONTROL, VK_2);
|
|
||||||
RegisterHotKey(hwnd, 3, MOD_CONTROL, VK_3);
|
|
||||||
RegisterHotKey(hwnd, 4, MOD_CONTROL, VK_4);
|
|
||||||
RegisterHotKey(hwnd, 0, MOD_CONTROL, VK_0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the Icons
|
// Set the Icons
|
||||||
|
|
|
@ -19,6 +19,7 @@ int selected, splitter_pos = 50;
|
||||||
|
|
||||||
pTree tree;
|
pTree tree;
|
||||||
HMENU hPopup;
|
HMENU hPopup;
|
||||||
|
HACCEL hHotKeys;
|
||||||
HWND hTBar, hTree, hEdit, hStatus;
|
HWND hTBar, hTree, hEdit, hStatus;
|
||||||
HTREEITEM nodes [MAXNODES];
|
HTREEITEM nodes [MAXNODES];
|
||||||
|
|
||||||
|
|
|
@ -12,3 +12,4 @@
|
||||||
#define IDC_STATUS2 0x111
|
#define IDC_STATUS2 0x111
|
||||||
#define IDC_CANCEL 0x112
|
#define IDC_CANCEL 0x112
|
||||||
#define IDC_TSTATUS 0x113
|
#define IDC_TSTATUS 0x113
|
||||||
|
#define IDR_HOTKEYS 0x114
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue