Commit 8b07a8c8 authored by Ken Belleau's avatar Ken Belleau Committed by Alexandre Julliard

- Removed code that took the focus away from the buttons.

- Make the buttons forward WM_KEYDOWN to their parent.
parent 31ec065b
...@@ -782,6 +782,18 @@ static LRESULT CALLBACK WINHELP_ButtonBoxWndProc(HWND hWnd, UINT msg, WPARAM wPa ...@@ -782,6 +782,18 @@ static LRESULT CALLBACK WINHELP_ButtonBoxWndProc(HWND hWnd, UINT msg, WPARAM wPa
case WM_COMMAND: case WM_COMMAND:
SendMessage(GetParent(hWnd), msg, wParam, lParam); SendMessage(GetParent(hWnd), msg, wParam, lParam);
break; break;
case WM_KEYDOWN:
switch (wParam)
{
case VK_UP:
case VK_DOWN:
case VK_PRIOR:
case VK_NEXT:
case VK_ESCAPE:
return SendMessage(GetParent(hWnd), msg, wParam, lParam);
}
break;
} }
return DefWindowProc(hWnd, msg, wParam, lParam); return DefWindowProc(hWnd, msg, wParam, lParam);
...@@ -793,13 +805,19 @@ static LRESULT CALLBACK WINHELP_ButtonBoxWndProc(HWND hWnd, UINT msg, WPARAM wPa ...@@ -793,13 +805,19 @@ static LRESULT CALLBACK WINHELP_ButtonBoxWndProc(HWND hWnd, UINT msg, WPARAM wPa
*/ */
static LRESULT CALLBACK WINHELP_ButtonWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) static LRESULT CALLBACK WINHELP_ButtonWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
WINHELP_WINDOW* win; if (msg == WM_KEYDOWN)
{
if (msg == WM_LBUTTONUP) switch (wParam)
{ {
win = (WINHELP_WINDOW*) GetWindowLong(GetParent(hWnd), 0); case VK_UP:
SetFocus(win->hMainWnd); case VK_DOWN:
case VK_PRIOR:
case VK_NEXT:
case VK_ESCAPE:
return SendMessage(GetParent(hWnd), msg, wParam, lParam);
} }
}
return CallWindowProc(Globals.button_proc, hWnd, msg, wParam, lParam); return CallWindowProc(Globals.button_proc, hWnd, msg, wParam, lParam);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment