mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
Fix usage of the first parameter for TranslateAccelerator: this should be the handle of the window that will receive the accelerator commands (not the window from which the message originates).
svn path=/trunk/; revision=71893
This commit is contained in:
parent
3d32d3faaf
commit
b9a5fd8135
|
@ -71,7 +71,7 @@ INT_PTR CALLBACK AboutProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
INT_PTR CALLBACK OptionsProc(HWND, UINT, WPARAM, LPARAM);
|
INT_PTR CALLBACK OptionsProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
INT_PTR CALLBACK WarningProc(HWND, UINT, WPARAM, LPARAM);
|
INT_PTR CALLBACK WarningProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
|
||||||
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
HACCEL hAccelTable;
|
HACCEL hAccelTable;
|
||||||
|
@ -102,7 +102,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
|
||||||
/* Main message loop */
|
/* Main message loop */
|
||||||
while (GetMessage(&msg, NULL, 0, 0))
|
while (GetMessage(&msg, NULL, 0, 0))
|
||||||
{
|
{
|
||||||
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
|
if (!TranslateAccelerator(hMainWnd, hAccelTable, &msg))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessage(&msg);
|
DispatchMessage(&msg);
|
||||||
|
|
|
@ -211,7 +211,7 @@ _tWinMain(HINSTANCE hInstance,
|
||||||
/* Starts main loop */
|
/* Starts main loop */
|
||||||
while (GetMessage(&msg, NULL, 0, 0))
|
while (GetMessage(&msg, NULL, 0, 0))
|
||||||
{
|
{
|
||||||
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
|
if (!TranslateAccelerator(main_win, hAccelTable, &msg))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessage(&msg);
|
DispatchMessage(&msg);
|
||||||
|
|
|
@ -67,7 +67,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
// Main message loop:
|
// Main message loop:
|
||||||
while (GetMessage(&msg, NULL, 0, 0))
|
while (GetMessage(&msg, NULL, 0, 0))
|
||||||
{
|
{
|
||||||
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
|
if (!TranslateAccelerator(hMainWnd, hAccelTable, &msg))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessage(&msg);
|
DispatchMessage(&msg);
|
||||||
|
|
|
@ -196,8 +196,8 @@ int APIENTRY WinMain(HINSTANCE hInstance,
|
||||||
instData.hWnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_TABBED_DIALOG), NULL, (DLGPROC)DlgProc, (LPARAM)&instData);
|
instData.hWnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_TABBED_DIALOG), NULL, (DLGPROC)DlgProc, (LPARAM)&instData);
|
||||||
ShowWindow(instData.hWnd, SW_SHOW);
|
ShowWindow(instData.hWnd, SW_SHOW);
|
||||||
hAccel = LoadAccelerators(hInst, (LPCTSTR)IDR_ACCELERATOR);
|
hAccel = LoadAccelerators(hInst, (LPCTSTR)IDR_ACCELERATOR);
|
||||||
while (GetMessage(&msg, (HWND)NULL, 0, 0)) {
|
while (GetMessage(&msg, NULL, 0, 0)) {
|
||||||
if (!TranslateAccelerator(msg.hwnd, hAccel, &msg)) {
|
if (!TranslateAccelerator(instData.hWnd, hAccel, &msg)) {
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessage(&msg);
|
DispatchMessage(&msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue