Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.09.22;
Скачать: CL | DM;

Вниз

Использование accelerator tables   Найти похожие ветки 

 
_smile   (2003-07-21 13:59) [0]

Как загрузить из ресурсов таблицы "горячих клавиш" (accelerators tables) и использовать их?


 
VMcL ©   (2003-07-21 14:13) [1]

LoadAccelerators + F1

In Microsoft® Windows®, a keyboard accelerator (or, simply, accelerator) is a keystroke or combination of keystrokes that generates a WM_COMMAND or WM_SYSCOMMAND message for an application.


 
nikkie ©   (2003-07-21 14:17) [2]

LoadAccelerators + TranslateAccelerator
The TranslateAccelerator function processes accelerator keys for menu commands. The function translates a WM_KEYDOWN or WM_SYSKEYDOWN message to a WM_COMMAND or WM_SYSCOMMAND message (if there is an entry for the key in the specified accelerator table)

g_hAccel = LoadAccelerators(g_hInstance, MAKEINTRESOURCE(IDR_MAINFRAME));
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(g_hwndMainWnd, g_hAccel, &msg)) {
TranslateMessage(&msg);
( &msg)
LoadAccelerators + TranslateAccelerator
The TranslateAccelerator function processes accelerator keys for menu commands. The function translates a WM_KEYDOWN or WM_SYSKEYDOWN message to a WM_COMMAND or WM_SYSCOMMAND message (if there is an entry for the key in the specified accelerator table)

g_hAccel = LoadAccelerators(g_hInstance, MAKEINTRESOURCE(IDR_MAINFRAME));
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(g_hwndMainWnd, g_hAccel, &msg)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}


 
_smile   (2003-07-21 15:06) [3]

Огромное спасибо nikkie за подробный ответ с куском кода, который прекрасно работает.
И VMcL тоже спасибо за то, что обратил внимание.



Страницы: 1 вся ветка

Текущий архив: 2003.09.22;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.028 c
3-71490
Sword
2003-09-01 17:24
2003.09.22
Распечатать содержимое DBTree


14-71928
Lex
2003-08-28 13:49
2003.09.22
Как не запутаться в коде?


14-71853
Noname_
2003-09-01 10:13
2003.09.22
DHCP сервер на Pro


1-71687
pashtet
2003-09-10 10:39
2003.09.22
Как защитить свой продукт от пиратства?


3-71481
Dush
2003-09-01 10:43
2003.09.22
Группировка данных