Главная страница
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.025 c
6-71814
Ренат
2003-07-24 11:43
2003.09.22
Прервать передачу файла по FTP


14-71846
Kost
2003-09-01 14:38
2003.09.22
StringGird


1-71637
Max_
2003-09-09 10:31
2003.09.22
Глобальная переменная и её уничтожение!


1-71678
LinOS
2003-09-11 12:14
2003.09.22
Как при нажатии на кнопку добавить в MainMenu пункты из PopupMenu


1-71684
qwerty2
2003-09-11 10:56
2003.09.22
Interface not supported