Главная страница
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.014 c
8-71763
som
2003-05-19 12:14
2003.09.22
работа с мр3


4-72001
off
2003-06-11 12:45
2003.09.22
Передача кусора другому окну.


1-71610
mfender
2003-09-09 04:05
2003.09.22
TIME_ZONE, или как определить сторону света.


14-71907
Chery
2003-09-04 14:41
2003.09.22
Почему Делфя 5 и 6 ?


1-71750
DeniM
2003-09-10 11:32
2003.09.22
Incompartible types Integer and Extended (+)