shell32: Load the application icon for the control panel window.
This commit is contained in:
parent
8182520f13
commit
3f5136ce3a
|
@ -475,10 +475,12 @@ static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
|
||||||
case IDM_CPANEL_ABOUT:
|
case IDM_CPANEL_ABOUT:
|
||||||
{
|
{
|
||||||
WCHAR appName[MAX_STRING_LEN];
|
WCHAR appName[MAX_STRING_LEN];
|
||||||
|
HICON icon = LoadImageW((HINSTANCE)GetWindowLongPtrW(hWnd, GWLP_HINSTANCE),
|
||||||
|
MAKEINTRESOURCEW(IDI_APPICON), IMAGE_ICON, 48, 48, LR_SHARED);
|
||||||
|
|
||||||
LoadStringW(shell32_hInstance, IDS_CPANEL_TITLE, appName,
|
LoadStringW(shell32_hInstance, IDS_CPANEL_TITLE, appName,
|
||||||
sizeof(appName) / sizeof(appName[0]));
|
sizeof(appName) / sizeof(appName[0]));
|
||||||
ShellAboutW(hWnd, appName, NULL, NULL);
|
ShellAboutW(hWnd, appName, NULL, icon);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -612,7 +614,7 @@ static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
|
||||||
|
|
||||||
static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
|
static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
|
||||||
{
|
{
|
||||||
WNDCLASSW wc;
|
WNDCLASSEXW wc;
|
||||||
MSG msg;
|
MSG msg;
|
||||||
WCHAR appName[MAX_STRING_LEN];
|
WCHAR appName[MAX_STRING_LEN];
|
||||||
const WCHAR className[] = {'S','h','e','l','l','_','C','o','n','t','r','o',
|
const WCHAR className[] = {'S','h','e','l','l','_','C','o','n','t','r','o',
|
||||||
|
@ -625,13 +627,15 @@ static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
|
||||||
wc.cbClsExtra = 0;
|
wc.cbClsExtra = 0;
|
||||||
wc.cbWndExtra = sizeof(CPlApplet*);
|
wc.cbWndExtra = sizeof(CPlApplet*);
|
||||||
wc.hInstance = panel->hInst = hInst;
|
wc.hInstance = panel->hInst = hInst;
|
||||||
wc.hIcon = 0;
|
wc.hIcon = LoadIconW( hInst, MAKEINTRESOURCEW(IDI_APPICON) );
|
||||||
wc.hCursor = LoadCursorW( 0, (LPWSTR)IDC_ARROW );
|
wc.hCursor = LoadCursorW( 0, (LPWSTR)IDC_ARROW );
|
||||||
wc.hbrBackground = GetStockObject(WHITE_BRUSH);
|
wc.hbrBackground = GetStockObject(WHITE_BRUSH);
|
||||||
wc.lpszMenuName = NULL;
|
wc.lpszMenuName = NULL;
|
||||||
wc.lpszClassName = className;
|
wc.lpszClassName = className;
|
||||||
|
wc.hIconSm = LoadImageW( hInst, MAKEINTRESOURCEW(IDI_APPICON), IMAGE_ICON,
|
||||||
|
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
|
||||||
|
|
||||||
if (!RegisterClassW(&wc)) return;
|
if (!RegisterClassExW(&wc)) return;
|
||||||
|
|
||||||
CreateWindowExW(0, wc.lpszClassName, appName,
|
CreateWindowExW(0, wc.lpszClassName, appName,
|
||||||
WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
||||||
|
|
|
@ -178,6 +178,8 @@
|
||||||
#define IDI_SHELL_CONFIRM_DELETE 161
|
#define IDI_SHELL_CONFIRM_DELETE 161
|
||||||
#define IDI_SHELL_MY_DOCUMENTS 235
|
#define IDI_SHELL_MY_DOCUMENTS 235
|
||||||
|
|
||||||
|
#define IDI_APPICON 101
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AVI resources, windows shell32 has 14 of them: 150-152 and 160-170
|
AVI resources, windows shell32 has 14 of them: 150-152 and 160-170
|
||||||
FIXME: Need to add them, but for now just let them use the same: searching.avi
|
FIXME: Need to add them, but for now just let them use the same: searching.avi
|
||||||
|
|
Loading…
Reference in New Issue