Author: ekohl
Date: Sun Mar 4 00:03:22 2007
New Revision: 25978
URL:
http://svn.reactos.org/svn/reactos?rev=25978&view=rev
Log:
Users can now set bold or italic fonts.
Modified:
trunk/reactos/dll/cpl/desk/advappdlg.c
Modified: trunk/reactos/dll/cpl/desk/advappdlg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/advappdlg.c?r…
==============================================================================
--- trunk/reactos/dll/cpl/desk/advappdlg.c (original)
+++ trunk/reactos/dll/cpl/desk/advappdlg.c Sun Mar 4 00:03:22 2007
@@ -536,7 +536,7 @@
case IDC_ADVAPPEARANCE_SIZE_E:
if (g && HIWORD(wParam) == EN_CHANGE)
{
- int i = (int)LOWORD(SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_SIZE_UD,
UDM_GETPOS,0,0L));
+ INT i = (INT)LOWORD(SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_SIZE_UD,
UDM_GETPOS,0,0L));
switch (g->CurrentElement)
{
@@ -665,6 +665,86 @@
}
break;
+ case IDC_ADVAPPEARANCE_FONTBOLD:
+ if (g && HIWORD(wParam) == BN_CLICKED)
+ {
+ INT i;
+
+ switch (g->CurrentElement)
+ {
+ case IDX_INACTIVE_CAPTION:
+ case IDX_ACTIVE_CAPTION:
+ i = (INT)SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTBOLD, BM_GETCHECK, 0,
0);
+ g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfWeight =
+ (i == BST_CHECKED) ? FW_BOLD : FW_NORMAL;
+
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SETCAPTIONFONT, 0,
+ (LPARAM)&g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font]);
+ break;
+
+ case IDX_MENU:
+ i = (INT)SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTBOLD, BM_GETCHECK, 0,
0);
+
+ g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfWeight =
+ (i == BST_CHECKED) ? FW_BOLD : FW_NORMAL;
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SETMENUFONT, 0,
+ (LPARAM)&g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font]);
+ break;
+
+ case IDX_DIALOG:
+ i = (INT)SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTBOLD, BM_GETCHECK, 0,
0);
+
+ g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfWeight =
+ (i == BST_CHECKED) ? FW_BOLD : FW_NORMAL;
+
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SETDIALOGFONT, 0,
+ (LPARAM)&g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font]);
+ break;
+ }
+ }
+ break;
+
+ case IDC_ADVAPPEARANCE_FONTITALIC:
+ if (g && HIWORD(wParam) == BN_CLICKED)
+ {
+ INT i;
+
+ switch (g->CurrentElement)
+ {
+ case IDX_INACTIVE_CAPTION:
+ case IDX_ACTIVE_CAPTION:
+ i = (INT)SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTITALIC, BM_GETCHECK,
0, 0);
+
+ g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfItalic =
+ (i == BST_CHECKED) ? TRUE : FALSE;
+
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SETCAPTIONFONT, 0,
+ (LPARAM)&g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font]);
+ break;
+
+ case IDX_MENU:
+ i = (INT)SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTITALIC, BM_GETCHECK,
0, 0);
+
+ g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfItalic =
+ (i == BST_CHECKED) ? TRUE : FALSE;
+
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SETMENUFONT, 0,
+ (LPARAM)&g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font]);
+ break;
+
+ case IDX_DIALOG:
+ i = (INT)SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTITALIC, BM_GETCHECK,
0, 0);
+
+ g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfItalic =
+ (i == BST_CHECKED) ? TRUE : FALSE;
+
+ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SETDIALOGFONT, 0,
+ (LPARAM)&g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font]);
+ break;
+ }
+ }
+ break;
+
case IDC_ADVAPPEARANCE_COLOR1_B:
GetColor(hwndDlg, g, 0);
break;