user32: Use the window class icon if the MDI child doesn't have its own.

This commit is contained in:
Alex Henrie 2015-05-13 00:33:12 -06:00 committed by Alexandre Julliard
parent f2bf0227a2
commit 5579967c53
1 changed files with 4 additions and 0 deletions

View File

@ -863,8 +863,12 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
/* The system menu is replaced by the child icon */
hIcon = (HICON)SendMessageW(hChild, WM_GETICON, ICON_SMALL, 0);
if (!hIcon)
hIcon = (HICON)GetClassLongPtrW(hChild, GCLP_HICONSM);
if (!hIcon)
hIcon = (HICON)SendMessageW(hChild, WM_GETICON, ICON_BIG, 0);
if (!hIcon)
hIcon = (HICON)GetClassLongPtrW(hChild, GCLP_HICON);
if (!hIcon)
hIcon = LoadImageW(0, (LPWSTR)IDI_WINLOGO, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);