[DEVMGR][NETCFGX][MSCONFIG][NETSHELL] Fix and improve icons (#1143)

CORE-15445
This commit is contained in:
Katayama Hirofumi MZ 2018-12-19 20:07:17 +09:00 committed by GitHub
parent 0d6dcee968
commit 02936d4c67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 192 additions and 18 deletions

View file

@ -21,7 +21,8 @@ HINSTANCE hInst = 0;
HWND hMainWnd; /* Main Window */
HWND hTabWnd; /* Tab Control Window */
UINT uXIcon = 0, uYIcon = 0; /* Icon sizes */
HICON hDialogIcon = NULL;
HICON hDialogIconBig = NULL;
HICON hDialogIconSmall = NULL;
void MsConfig_OnTabWndSelChange(void);
@ -203,18 +204,25 @@ static
VOID
SetDialogIcon(HWND hDlg)
{
if (hDialogIcon) DestroyIcon(hDialogIcon);
if (hDialogIconBig) DestroyIcon(hDialogIconBig);
if (hDialogIconSmall) DestroyIcon(hDialogIconSmall);
hDialogIcon = LoadImage(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDI_APPICON),
IMAGE_ICON,
uXIcon,
uYIcon,
0);
hDialogIconBig = LoadIconW(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDI_APPICON));
hDialogIconSmall = LoadImage(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDI_APPICON),
IMAGE_ICON,
uXIcon,
uYIcon,
0);
SendMessage(hDlg,
WM_SETICON,
ICON_BIG,
(LPARAM)hDialogIconBig);
SendMessage(hDlg,
WM_SETICON,
ICON_SMALL,
(LPARAM)hDialogIcon);
(LPARAM)hDialogIconSmall);
}
@ -292,8 +300,10 @@ MsConfigWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
DestroyWindow(hFreeLdrPage);
if (hSystemPage)
DestroyWindow(hSystemPage);
if (hDialogIcon)
DestroyIcon(hDialogIcon);
if (hDialogIconBig)
DestroyIcon(hDialogIconBig);
if (hDialogIconSmall)
DestroyIcon(hDialogIconSmall);
return DefWindowProc(hDlg, message, wParam, lParam);
}