[SYSSETUP][SDK] Set arrow to current task (#8598)

Follow-up of #8596.
JIRA issue: N/A
- Add IDI_ARROWICON (arrow-16x16.ico)
  icon and IDI_CROSSICON
  (cross-16x16.ico).
- Retrieve normal font from control.
- Set arrow icon to the current task.
- Set bold font to the current task.
- Set normal font to done tasks.
This commit is contained in:
Katayama Hirofumi MZ
2026-01-22 08:24:21 +09:00
committed by GitHub
parent ee97db9f83
commit 3342fc6633
6 changed files with 17 additions and 6 deletions

View File

@@ -33,6 +33,8 @@
#define IDI_ICON4 13
#define IDI_ICON5 14
#define IDI_CHECKICON 15
#define IDI_ARROWICON 16
#define IDI_CROSSICON 17
#define IDC_STATIC -1

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

@@ -31,6 +31,8 @@ IDI_ICON3 ICON "resources/3.ico"
IDI_ICON4 ICON "resources/4.ico"
IDI_ICON5 ICON "resources/5.ico"
IDI_CHECKICON ICON "resources/check-16x16.ico"
IDI_ARROWICON ICON "resources/arrow-16x16.ico"
IDI_CROSSICON ICON "resources/cross-16x16.ico"
STRINGTABLE
BEGIN

View File

@@ -2440,6 +2440,8 @@ ProcessPageDlgProc(HWND hwndDlg,
{
PSETUPDATA SetupData;
PREGISTRATIONNOTIFY RegistrationNotify;
static HICON s_hCheckIcon, s_hArrowIcon, s_hCrossIcon;
static HFONT s_hNormalFont;
/* Retrieve pointer to the global setup data */
SetupData = (PSETUPDATA)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
@@ -2454,13 +2456,16 @@ ProcessPageDlgProc(HWND hwndDlg,
ShowWindow(GetDlgItem(hwndDlg, IDC_TASKTEXT4), SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_CHECK3), SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_CHECK4), SW_HIDE);
SetupData->hCheckIcon = LoadImageW(hDllInstance, MAKEINTRESOURCEW(IDI_CHECKICON),
IMAGE_ICON, 16, 16, 0);
s_hCheckIcon = LoadImageW(hDllInstance, MAKEINTRESOURCEW(IDI_CHECKICON), IMAGE_ICON, 16, 16, 0);
s_hArrowIcon = LoadImageW(hDllInstance, MAKEINTRESOURCEW(IDI_ARROWICON), IMAGE_ICON, 16, 16, 0);
s_hCrossIcon = LoadImageW(hDllInstance, MAKEINTRESOURCEW(IDI_CROSSICON), IMAGE_ICON, 16, 16, 0);
s_hNormalFont = (HFONT)SendDlgItemMessage(hwndDlg, IDC_TASKTEXT1, WM_GETFONT, 0, 0);
break;
case WM_DESTROY:
DestroyIcon(SetupData->hCheckIcon);
SetupData->hCheckIcon = NULL;
DestroyIcon(s_hCheckIcon);
DestroyIcon(s_hArrowIcon);
DestroyIcon(s_hCrossIcon);
break;
case WM_NOTIFY:
@@ -2492,16 +2497,19 @@ ProcessPageDlgProc(HWND hwndDlg,
SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, (ULONG)lParam));
SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETPOS, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_TASKTEXT1 + wParam, WM_SETFONT, (WPARAM)SetupData->hBoldFont, (LPARAM)TRUE);
SendDlgItemMessage(hwndDlg, IDC_CHECK1 + wParam, STM_SETIMAGE, IMAGE_ICON, (LPARAM)SetupData->hCheckIcon);
SendDlgItemMessage(hwndDlg, IDC_CHECK1 + wParam, STM_SETIMAGE, IMAGE_ICON, (LPARAM)s_hArrowIcon);
break;
case PM_ITEM_END:
DPRINT("PM_ITEM_END\n");
SendDlgItemMessage(hwndDlg, IDC_TASKTEXT1 + wParam, WM_SETFONT, (WPARAM)s_hNormalFont, (LPARAM)TRUE);
if (lParam == ERROR_SUCCESS)
{
SendDlgItemMessage(hwndDlg, IDC_CHECK1 + wParam, STM_SETIMAGE, IMAGE_ICON, (LPARAM)s_hCheckIcon);
}
else
{
SendDlgItemMessage(hwndDlg, IDC_CHECK1 + wParam, STM_SETIMAGE, IMAGE_ICON, (LPARAM)s_hCrossIcon);
ShowItemError(hwndDlg, (DWORD)lParam);
}
break;

View File

@@ -59,7 +59,6 @@ typedef struct _SETUPDATA
UINT uPostNetworkWizardPage;
PRODUCT_OPTION ProductOption;
HICON hCheckIcon;
} SETUPDATA, *PSETUPDATA;