Roman Pompejus's suggestion: do sensible things with focus when the

event log window appears or disappears.

[originally from svn r892]
This commit is contained in:
Simon Tatham 2001-01-23 17:40:51 +00:00
Родитель bde2f9ac8a
Коммит 34af1c4f1a
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -56,6 +56,7 @@ static int CALLBACK LogProc (HWND hwnd, UINT msg,
case IDOK: case IDOK:
case IDCANCEL: case IDCANCEL:
logbox = NULL; logbox = NULL;
SetActiveWindow(GetParent(hwnd));
DestroyWindow (hwnd); DestroyWindow (hwnd);
return 0; return 0;
case IDN_COPY: case IDN_COPY:
@ -110,6 +111,7 @@ static int CALLBACK LogProc (HWND hwnd, UINT msg,
return 0; return 0;
case WM_CLOSE: case WM_CLOSE:
logbox = NULL; logbox = NULL;
SetActiveWindow(GetParent(hwnd));
DestroyWindow (hwnd); DestroyWindow (hwnd);
return 0; return 0;
} }
@ -1991,6 +1993,7 @@ void showeventlog (HWND hwnd) {
hwnd, LogProc); hwnd, LogProc);
ShowWindow (logbox, SW_SHOWNORMAL); ShowWindow (logbox, SW_SHOWNORMAL);
} }
SetActiveWindow(logbox);
} }
void showabout (HWND hwnd) { void showabout (HWND hwnd) {