Skip to content

Commit 3342fc6

Browse files
authored
[SYSSETUP][SDK] Set arrow to current task (reactos#8598)
Follow-up of reactos#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.
1 parent ee97db9 commit 3342fc6

6 files changed

Lines changed: 17 additions & 6 deletions

File tree

dll/win32/syssetup/resource.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
#define IDI_ICON4 13
3434
#define IDI_ICON5 14
3535
#define IDI_CHECKICON 15
36+
#define IDI_ARROWICON 16
37+
#define IDI_CROSSICON 17
3638

3739
#define IDC_STATIC -1
3840

318 Bytes
Binary file not shown.
318 Bytes
Binary file not shown.

dll/win32/syssetup/syssetup.rc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ IDI_ICON3 ICON "resources/3.ico"
3131
IDI_ICON4 ICON "resources/4.ico"
3232
IDI_ICON5 ICON "resources/5.ico"
3333
IDI_CHECKICON ICON "resources/check-16x16.ico"
34+
IDI_ARROWICON ICON "resources/arrow-16x16.ico"
35+
IDI_CROSSICON ICON "resources/cross-16x16.ico"
3436

3537
STRINGTABLE
3638
BEGIN

dll/win32/syssetup/wizard.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2440,6 +2440,8 @@ ProcessPageDlgProc(HWND hwndDlg,
24402440
{
24412441
PSETUPDATA SetupData;
24422442
PREGISTRATIONNOTIFY RegistrationNotify;
2443+
static HICON s_hCheckIcon, s_hArrowIcon, s_hCrossIcon;
2444+
static HFONT s_hNormalFont;
24432445

24442446
/* Retrieve pointer to the global setup data */
24452447
SetupData = (PSETUPDATA)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
@@ -2454,13 +2456,16 @@ ProcessPageDlgProc(HWND hwndDlg,
24542456
ShowWindow(GetDlgItem(hwndDlg, IDC_TASKTEXT4), SW_HIDE);
24552457
ShowWindow(GetDlgItem(hwndDlg, IDC_CHECK3), SW_HIDE);
24562458
ShowWindow(GetDlgItem(hwndDlg, IDC_CHECK4), SW_HIDE);
2457-
SetupData->hCheckIcon = LoadImageW(hDllInstance, MAKEINTRESOURCEW(IDI_CHECKICON),
2458-
IMAGE_ICON, 16, 16, 0);
2459+
s_hCheckIcon = LoadImageW(hDllInstance, MAKEINTRESOURCEW(IDI_CHECKICON), IMAGE_ICON, 16, 16, 0);
2460+
s_hArrowIcon = LoadImageW(hDllInstance, MAKEINTRESOURCEW(IDI_ARROWICON), IMAGE_ICON, 16, 16, 0);
2461+
s_hCrossIcon = LoadImageW(hDllInstance, MAKEINTRESOURCEW(IDI_CROSSICON), IMAGE_ICON, 16, 16, 0);
2462+
s_hNormalFont = (HFONT)SendDlgItemMessage(hwndDlg, IDC_TASKTEXT1, WM_GETFONT, 0, 0);
24592463
break;
24602464

24612465
case WM_DESTROY:
2462-
DestroyIcon(SetupData->hCheckIcon);
2463-
SetupData->hCheckIcon = NULL;
2466+
DestroyIcon(s_hCheckIcon);
2467+
DestroyIcon(s_hArrowIcon);
2468+
DestroyIcon(s_hCrossIcon);
24642469
break;
24652470

24662471
case WM_NOTIFY:
@@ -2492,16 +2497,19 @@ ProcessPageDlgProc(HWND hwndDlg,
24922497
SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, (ULONG)lParam));
24932498
SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETPOS, 0, 0);
24942499
SendDlgItemMessage(hwndDlg, IDC_TASKTEXT1 + wParam, WM_SETFONT, (WPARAM)SetupData->hBoldFont, (LPARAM)TRUE);
2495-
SendDlgItemMessage(hwndDlg, IDC_CHECK1 + wParam, STM_SETIMAGE, IMAGE_ICON, (LPARAM)SetupData->hCheckIcon);
2500+
SendDlgItemMessage(hwndDlg, IDC_CHECK1 + wParam, STM_SETIMAGE, IMAGE_ICON, (LPARAM)s_hArrowIcon);
24962501
break;
24972502

24982503
case PM_ITEM_END:
24992504
DPRINT("PM_ITEM_END\n");
2505+
SendDlgItemMessage(hwndDlg, IDC_TASKTEXT1 + wParam, WM_SETFONT, (WPARAM)s_hNormalFont, (LPARAM)TRUE);
25002506
if (lParam == ERROR_SUCCESS)
25012507
{
2508+
SendDlgItemMessage(hwndDlg, IDC_CHECK1 + wParam, STM_SETIMAGE, IMAGE_ICON, (LPARAM)s_hCheckIcon);
25022509
}
25032510
else
25042511
{
2512+
SendDlgItemMessage(hwndDlg, IDC_CHECK1 + wParam, STM_SETIMAGE, IMAGE_ICON, (LPARAM)s_hCrossIcon);
25052513
ShowItemError(hwndDlg, (DWORD)lParam);
25062514
}
25072515
break;

sdk/include/reactos/libs/syssetup/syssetup.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ typedef struct _SETUPDATA
5959
UINT uPostNetworkWizardPage;
6060

6161
PRODUCT_OPTION ProductOption;
62-
HICON hCheckIcon;
6362
} SETUPDATA, *PSETUPDATA;
6463

6564

0 commit comments

Comments
 (0)