[CPL][SHELL32] Add icons to input, joy, sysdm, folder options (#1138)

CORE-15445
This commit is contained in:
Katayama Hirofumi MZ 2018-12-16 08:40:47 +09:00 committed by GitHub
parent 44bb99cc8e
commit 235042a16c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 55 additions and 8 deletions

View file

@ -205,6 +205,23 @@ public:
EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, IDataObject *pDataObj);
static int CALLBACK
PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
{
// NOTE: This callback is needed to set large icon correctly.
HICON hIcon;
switch (uMsg)
{
case PSCB_INITIALIZED:
{
hIcon = LoadIconW(shell32_hInstance, MAKEINTRESOURCEW(IDI_SHELL_FOLDER_OPTIONS));
SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
break;
}
}
return 0;
}
static VOID
ShowFolderOptionsDialog(HWND hWnd, HINSTANCE hInst)
{
@ -242,11 +259,13 @@ ShowFolderOptionsDialog(HWND hWnd, HINSTANCE hInst)
memset(&pinfo, 0x0, sizeof(PROPSHEETHEADERW));
pinfo.dwSize = sizeof(PROPSHEETHEADERW);
pinfo.dwFlags = PSH_NOCONTEXTHELP;
pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_USEICONID | PSH_USECALLBACK;
pinfo.hwndParent = stub;
pinfo.nPages = num_pages;
pinfo.phpage = hppages;
pinfo.pszIcon = MAKEINTRESOURCEW(IDI_SHELL_FOLDER_OPTIONS);
pinfo.pszCaption = szOptions;
pinfo.pfnCallback = PropSheetProc;
PropertySheetW(&pinfo);