Author: hbelusca
Date: Mon Jul 11 01:57:47 2016
New Revision: 71893
URL:
http://svn.reactos.org/svn/reactos?rev=71893&view=rev
Log:
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).
Modified:
trunk/reactos/base/applications/magnify/magnifier.c
trunk/reactos/base/applications/sndrec32/sndrec32.cpp
trunk/reactos/boot/freeldr/fdebug/fdebug.c
trunk/rosapps/templates/dialog/dialog.c
Modified: trunk/reactos/base/applications/magnify/magnifier.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/magnify/…
==============================================================================
--- trunk/reactos/base/applications/magnify/magnifier.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/magnify/magnifier.c [iso-8859-1] Mon Jul 11 01:57:47
2016
@@ -71,7 +71,7 @@
INT_PTR CALLBACK OptionsProc(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;
HACCEL hAccelTable;
@@ -102,7 +102,7 @@
/* Main message loop */
while (GetMessage(&msg, NULL, 0, 0))
{
- if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
+ if (!TranslateAccelerator(hMainWnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
Modified: trunk/reactos/base/applications/sndrec32/sndrec32.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/sndrec32.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/sndrec32.cpp [iso-8859-1] Mon Jul 11 01:57:47
2016
@@ -211,7 +211,7 @@
/* Starts main loop */
while (GetMessage(&msg, NULL, 0, 0))
{
- if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
+ if (!TranslateAccelerator(main_win, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
Modified: trunk/reactos/boot/freeldr/fdebug/fdebug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/fdebug/fdebug…
==============================================================================
--- trunk/reactos/boot/freeldr/fdebug/fdebug.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/fdebug/fdebug.c [iso-8859-1] Mon Jul 11 01:57:47 2016
@@ -67,7 +67,7 @@
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
- if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
+ if (!TranslateAccelerator(hMainWnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
Modified: trunk/rosapps/templates/dialog/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/templates/dialog/dialog.c?…
==============================================================================
--- trunk/rosapps/templates/dialog/dialog.c [iso-8859-1] (original)
+++ trunk/rosapps/templates/dialog/dialog.c [iso-8859-1] Mon Jul 11 01:57:47 2016
@@ -196,8 +196,8 @@
instData.hWnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_TABBED_DIALOG), NULL,
(DLGPROC)DlgProc, (LPARAM)&instData);
ShowWindow(instData.hWnd, SW_SHOW);
hAccel = LoadAccelerators(hInst, (LPCTSTR)IDR_ACCELERATOR);
- while (GetMessage(&msg, (HWND)NULL, 0, 0)) {
- if (!TranslateAccelerator(msg.hwnd, hAccel, &msg)) {
+ while (GetMessage(&msg, NULL, 0, 0)) {
+ if (!TranslateAccelerator(instData.hWnd, hAccel, &msg)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}