[PROGMAN]

- Load the main icon in a global variable (we use it at different places).
- Use the main icon for the shell-about dialog.

svn path=/trunk/; revision=71325
This commit is contained in:
Hermès Bélusca-Maïto 2016-05-12 19:54:53 +00:00
parent 021e1a40a4
commit 1e2e730dd3
2 changed files with 7 additions and 8 deletions

View file

@ -620,11 +620,10 @@ INT WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
MAIN_LoadSettings(); MAIN_LoadSettings();
/* Load the default icons */ /* Load the default icons */
Globals.hDefaultIcon = LoadIconW(NULL, MAKEINTRESOURCEW(IDI_WINLOGO));
Globals.hMainIcon = LoadIconW(Globals.hInstance, MAKEINTRESOURCEW(IDI_APPICON));
Globals.hPersonalGroupIcon = LoadIconW(Globals.hInstance, MAKEINTRESOURCEW(IDI_GROUP_PERSONAL_ICON)); Globals.hPersonalGroupIcon = LoadIconW(Globals.hInstance, MAKEINTRESOURCEW(IDI_GROUP_PERSONAL_ICON));
Globals.hCommonGroupIcon = LoadIconW(Globals.hInstance, MAKEINTRESOURCEW(IDI_GROUP_COMMON_ICON)); Globals.hCommonGroupIcon = LoadIconW(Globals.hInstance, MAKEINTRESOURCEW(IDI_GROUP_COMMON_ICON));
Globals.hDefaultIcon = LoadIconW(NULL, MAKEINTRESOURCEW(IDI_WINLOGO));
// Globals.hMainIcon = LoadIconW(Globals.hInstance, MAKEINTRESOURCEW(IDI_APPICON));
/* Initialize the common controls */ /* Initialize the common controls */
icex.dwSize = sizeof(icex); icex.dwSize = sizeof(icex);
@ -1036,7 +1035,7 @@ static VOID MAIN_MenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
break; break;
case PM_ABOUT: case PM_ABOUT:
ShellAboutW(hWnd, szTitle, NULL, NULL); ShellAboutW(hWnd, szTitle, NULL, Globals.hMainIcon);
break; break;
default: default:
@ -1060,7 +1059,7 @@ static ATOM MAIN_RegisterMainWinClass(VOID)
wndClass.cbClsExtra = 0; wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = 0; wndClass.cbWndExtra = 0;
wndClass.hInstance = Globals.hInstance; wndClass.hInstance = Globals.hInstance;
wndClass.hIcon = LoadIconW(Globals.hInstance, MAKEINTRESOURCEW(IDI_APPICON)); wndClass.hIcon = Globals.hMainIcon;
wndClass.hCursor = LoadCursorW(NULL, MAKEINTRESOURCEW(IDC_ARROW)); wndClass.hCursor = LoadCursorW(NULL, MAKEINTRESOURCEW(IDC_ARROW));
wndClass.hbrBackground = (HBRUSH)GetStockObject(NULL_BRUSH); wndClass.hbrBackground = (HBRUSH)GetStockObject(NULL_BRUSH);
wndClass.lpszMenuName = NULL; wndClass.lpszMenuName = NULL;

View file

@ -147,11 +147,11 @@ typedef struct _GLOBALS
HACCEL hAccel; HACCEL hAccel;
HWND hMainWnd; HWND hMainWnd;
HWND hMDIWnd; HWND hMDIWnd;
//HICON hMainIcon; HICON hDefaultIcon;
HICON hGroupIcon; HICON hMainIcon;
// HICON hGroupIcon;
HICON hPersonalGroupIcon; HICON hPersonalGroupIcon;
HICON hCommonGroupIcon; HICON hCommonGroupIcon;
HICON hDefaultIcon;
HMENU hMainMenu; HMENU hMainMenu;
HMENU hFileMenu; HMENU hFileMenu;
HMENU hOptionMenu; HMENU hOptionMenu;