Author: mkupfer Date: Sat Jul 5 14:38:08 2008 New Revision: 34310
URL: http://svn.reactos.org/svn/reactos?rev=34310&view=rev Log: - title font for a syssetup alike look added
Modified: trunk/reactos/base/setup/reactos/reactos.c
Modified: trunk/reactos/base/setup/reactos/reactos.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/reactos.... ============================================================================== --- trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] Sat Jul 5 14:38:08 2008 @@ -26,9 +26,13 @@
#include <windows.h> #include <commctrl.h> +#include <tchar.h>
#include "resource.h"
+/* GLOBALS ******************************************************************/ + +HFONT hTitleFont;
/* FUNCTIONS ****************************************************************/
@@ -53,6 +57,31 @@ 0, 0, SWP_NOSIZE); +} + +static HFONT +CreateTitleFont(VOID) +{ + NONCLIENTMETRICS ncm; + LOGFONT LogFont; + HDC hdc; + INT FontSize; + HFONT hFont; + + ncm.cbSize = sizeof(NONCLIENTMETRICS); + SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); + + LogFont = ncm.lfMessageFont; + LogFont.lfWeight = FW_BOLD; + _tcscpy(LogFont.lfFaceName, _T("MS Shell Dlg")); + + hdc = GetDC(NULL); + FontSize = 12; + LogFont.lfHeight = 0 - GetDeviceCaps (hdc, LOGPIXELSY) * FontSize / 72; + hFont = CreateFontIndirect(&LogFont); + ReleaseDC(NULL, hdc); + + return hFont; }
static INT_PTR CALLBACK @@ -83,7 +112,14 @@ hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL); ShowWindow (hwndControl, SW_HIDE); EnableWindow (hwndControl, FALSE); - } + + /* Set title font */ + SendDlgItemMessage(hwndDlg, + IDC_STARTTITLE, + WM_SETFONT, + (WPARAM)hTitleFont, + (LPARAM)TRUE); +} break; case WM_NOTIFY: { @@ -139,8 +175,13 @@ psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK); psh.pszbmHeader = MAKEINTRESOURCE(IDB_HEADER);
+ /* Create title font */ + hTitleFont = CreateTitleFont(); + /* Display the wizard */ PropertySheet(&psh); + + DeleteObject(hTitleFont);
return 0;