diff --git a/dlls/cryptui/cryptui_En.rc b/dlls/cryptui/cryptui_En.rc index 0bd34786747..7ec0792d5d5 100644 --- a/dlls/cryptui/cryptui_En.rc +++ b/dlls/cryptui/cryptui_En.rc @@ -93,6 +93,7 @@ STRINGTABLE DISCARDABLE IDS_IMPORT_CONTENT_STORE "Certificate Store" IDS_IMPORT_SUCCEEDED "The import was successful." IDS_IMPORT_FAILED "The import failed." + IDS_WIZARD_TITLE_FONT "Arial" IDS_PURPOSE_SERVER_AUTH "Ensures the identify of a remote computer" IDS_PURPOSE_CLIENT_AUTH "Proves your identity to a remote computer" IDS_PURPOSE_CODE_SIGNING "Ensures software came from software publisher\nProtects software from alteration after publication" @@ -234,7 +235,7 @@ CAPTION "Certificate Import Wizard" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Welcome to the Certificate Import Wizard", IDC_IMPORT_TITLE, - 115,1,195,24 + 115,1,195,40 LTEXT "This wizard helps you import certificates, certificate revocation lists, and certificate trust lists from a file to a certificate store.", stc1, 115,33,195,16 LTEXT "A certificate can be used to identify you or the computer with which you are communicating. It can also be used for authentication, and to sign messages. Certificate stores are collections of certificates, certificate revocation lists, and certificate trust lists.", @@ -277,7 +278,7 @@ CAPTION "Certificate Import Wizard" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Completing the Certificate Import Wizard", IDC_IMPORT_TITLE, - 115,1,195,24 + 115,1,195,40 LTEXT "You have successfully completed the Certificate Import Wizard.", stc1, 115,33,195,24 LTEXT "You have specified the following settings:", diff --git a/dlls/cryptui/cryptuires.h b/dlls/cryptui/cryptuires.h index fbbf441b6d1..a6adb20e962 100644 --- a/dlls/cryptui/cryptuires.h +++ b/dlls/cryptui/cryptuires.h @@ -90,6 +90,7 @@ #define IDS_IMPORT_CONTENT_STORE 1070 #define IDS_IMPORT_SUCCEEDED 1071 #define IDS_IMPORT_FAILED 1072 +#define IDS_WIZARD_TITLE_FONT 1073 #define IDS_PURPOSE_SERVER_AUTH 1100 #define IDS_PURPOSE_CLIENT_AUTH 1101 diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c index 286899dde85..a642ac47f0b 100644 --- a/dlls/cryptui/main.c +++ b/dlls/cryptui/main.c @@ -3690,6 +3690,21 @@ static BOOL import_file(DWORD dwFlags, HWND hwnd, LPCWSTR szTitle, return ret; } +struct ImportWizData +{ + HFONT titleFont; + DWORD dwFlags; + LPCWSTR pwszWizardTitle; + CRYPTUI_WIZ_IMPORT_SRC_INFO importSrc; + LPWSTR fileName; + DWORD contentType; + BOOL freeSource; + HCERTSTORE hDestCertStore; + BOOL freeDest; + BOOL autoDest; + BOOL success; +}; + static LRESULT CALLBACK import_welcome_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { @@ -3697,6 +3712,26 @@ static LRESULT CALLBACK import_welcome_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, switch (msg) { + case WM_INITDIALOG: + { + struct ImportWizData *data; + PROPSHEETPAGEW *page = (PROPSHEETPAGEW *)lp; + WCHAR fontFace[MAX_STRING_LEN]; + HDC hDC = GetDC(hwnd); + int height; + + data = (struct ImportWizData *)page->lParam; + LoadStringW(hInstance, IDS_WIZARD_TITLE_FONT, fontFace, + sizeof(fontFace) / sizeof(fontFace[0])); + height = -MulDiv(12, GetDeviceCaps(hDC, LOGPIXELSY), 72); + data->titleFont = CreateFontW(height, 0, 0, 0, FW_BOLD, 0, 0, 0, + DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, + DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, fontFace); + SendMessageW(GetDlgItem(hwnd, IDC_IMPORT_TITLE), WM_SETFONT, + (WPARAM)data->titleFont, TRUE); + ReleaseDC(hwnd, hDC); + break; + } case WM_NOTIFY: { NMHDR *hdr = (NMHDR *)lp; @@ -3780,20 +3815,6 @@ static WCHAR *make_import_file_filter(DWORD dwFlags) return filter; } -struct ImportWizData -{ - DWORD dwFlags; - LPCWSTR pwszWizardTitle; - CRYPTUI_WIZ_IMPORT_SRC_INFO importSrc; - LPWSTR fileName; - DWORD contentType; - BOOL freeSource; - HCERTSTORE hDestCertStore; - BOOL freeDest; - BOOL autoDest; - BOOL success; -}; - static BOOL import_validate_filename(HWND hwnd, struct ImportWizData *data, LPCWSTR fileName) { @@ -4181,6 +4202,8 @@ static LRESULT CALLBACK import_finish_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, data = (struct ImportWizData *)page->lParam; SetWindowLongPtrW(hwnd, DWLP_USER, (LPARAM)data); + SendMessageW(GetDlgItem(hwnd, IDC_IMPORT_TITLE), WM_SETFONT, + (WPARAM)data->titleFont, TRUE); GetWindowRect(lv, &rc); column.mask = LVCF_WIDTH; column.cx = (rc.right - rc.left) / 2 - 2; @@ -4269,6 +4292,7 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent, pages[nPages].u.pszTemplate = MAKEINTRESOURCEW(IDD_IMPORT_WELCOME); pages[nPages].pfnDlgProc = import_welcome_dlg_proc; pages[nPages].dwFlags = PSP_HIDEHEADER; + pages[nPages].lParam = (LPARAM)&data; nPages++; if (!pImportSrc || @@ -4339,6 +4363,7 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent, if (data.freeSource && data.importSrc.dwSubjectChoice == CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_STORE) CertCloseStore(data.importSrc.u.hCertStore, 0); + DeleteObject(data.titleFont); return data.success; }