Главная страница
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.029 c
3-71561
AlexWeb
2003-08-29 10:57
2003.09.22
Можно ли подключить базу IB при помощи ADO?


4-72013
Prov
2003-07-21 10:26
2003.09.22
Загрузить текст


3-71507
3APA3A
2003-08-29 20:31
2003.09.22
ADO


3-71489
kalliopiy
2003-09-02 15:05
2003.09.22
Инсталлятор


14-71871
Skier
2003-09-02 16:33
2003.09.22
Есть ли переводы ошибок ?