Главная страница
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.027 c
1-71700
Стрелок
2003-09-10 08:41
2003.09.22
Запуск проги из стринга


14-71840
Danilka
2003-08-29 15:47
2003.09.22
Проверим степень вашей испорченности


14-71888
panov
2003-09-02 20:09
2003.09.22
Всё глючит...я уже сам глючу... Пофлудим?


14-71838
Igor__
2003-09-01 17:52
2003.09.22
Иконки с использованием прозрачности


14-71943
CinCinNut
2003-09-01 16:15
2003.09.22
Бывают такие люди...