From 7ee13d8f3e9b2f3ff76151f1ab1d757072e1e8ac Mon Sep 17 00:00:00 2001 From: Shachar Shemesh Date: Tue, 28 Jan 2003 00:18:31 +0000 Subject: [PATCH] - Defined IDs for string constants for font color names and for the various charsets. - Load the color names from the resources in the fonts dialog. --- dlls/commdlg/cdlg.h | 37 +++++++++++++++++++++++++++++++++++++ dlls/commdlg/cdlg_En.rc | 20 ++++++++++++++++++++ dlls/commdlg/fontdlg.c | 14 +++++++++----- 3 files changed, 66 insertions(+), 5 deletions(-) diff --git a/dlls/commdlg/cdlg.h b/dlls/commdlg/cdlg.h index 8d5b492ad9..5c7f67f6d9 100644 --- a/dlls/commdlg/cdlg.h +++ b/dlls/commdlg/cdlg.h @@ -105,6 +105,43 @@ typedef struct { #define PD32_MARGINS_IN_MILIMETERS 1586 #define PD32_MILIMETERS 1587 +/* Charset names string IDs */ + +#define IDS_CHARSET_ANSI 200 +#define IDS_CHARSET_SYMBOL 201 +#define IDS_CHARSET_SHIFTJIS 202 +#define IDS_CHARSET_HANGUL 203 +#define IDS_CHARSET_GREEK 204 +#define IDS_CHARSET_TURKISH 205 +#define IDS_CHARSET_HEBREW 206 +#define IDS_CHARSET_ARABIC 207 +#define IDS_CHARSET_BALTIC 208 +#define IDS_CHARSET_VIETNAMESE 209 +#define IDS_CHARSET_RUSSIAN 210 +#define IDS_CHARSET_EE 211 +#define IDS_CHARSET_THAI 212 +#define IDS_CHARSET_JOHAB 213 +#define IDS_CHARSET_OEM 214 + +/* Color names string IDs */ + +#define IDS_COLOR_BLACK 1040 +#define IDS_COLOR_MAROON 1041 +#define IDS_COLOR_GREEN 1042 +#define IDS_COLOR_OLIVE 1043 +#define IDS_COLOR_NAVY 1044 +#define IDS_COLOR_PURPLE 1045 +#define IDS_COLOR_TEAL 1046 +#define IDS_COLOR_GRAY 1047 +#define IDS_COLOR_SILVER 1048 +#define IDS_COLOR_RED 1049 +#define IDS_COLOR_LIME 1050 +#define IDS_COLOR_YELLOW 1051 +#define IDS_COLOR_BLUE 1052 +#define IDS_COLOR_FUCHSIA 1053 +#define IDS_COLOR_AQUA 1054 +#define IDS_COLOR_WHITE 1055 + #include "commctrl.h" #include "shlobj.h" #include "shellapi.h" diff --git a/dlls/commdlg/cdlg_En.rc b/dlls/commdlg/cdlg_En.rc index c03eff1ce8..79e36390e0 100644 --- a/dlls/commdlg/cdlg_En.rc +++ b/dlls/commdlg/cdlg_En.rc @@ -435,3 +435,23 @@ supported by your printer.\nPlease enter a value between 1 and %d." PD32_PRINTER_STATUS_SERVER_UNKNOWN "Print server unknown; " PD32_PRINTER_STATUS_POWER_SAVE "Power safe mode; " } + +STRINGTABLE DISCARDABLE /* Color names */ +{ + IDS_COLOR_BLACK "Black" + IDS_COLOR_MAROON "Maroon" + IDS_COLOR_GREEN "Green" + IDS_COLOR_OLIVE "Olive" + IDS_COLOR_NAVY "Navy" + IDS_COLOR_PURPLE "Purple" + IDS_COLOR_TEAL "Teal" + IDS_COLOR_GRAY "Gray" + IDS_COLOR_SILVER "Silver" + IDS_COLOR_RED "Red" + IDS_COLOR_LIME "Lime" + IDS_COLOR_YELLOW "Yellow" + IDS_COLOR_BLUE "Blue" + IDS_COLOR_FUCHSIA "Fuchsia" + IDS_COLOR_AQUA "Aqua" + IDS_COLOR_WHITE "White" +} diff --git a/dlls/commdlg/fontdlg.c b/dlls/commdlg/fontdlg.c index e50a4a94cc..a3d07b2266 100644 --- a/dlls/commdlg/fontdlg.c +++ b/dlls/commdlg/fontdlg.c @@ -722,7 +722,7 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTA lpcf) { HDC hdc; - int i,j,res,init=0; + int i,j,init=0; long l; LPLOGFONTA lpxx; HCURSOR hcursor=SetCursor(LoadCursorA(0,IDC_WAITA)); @@ -750,11 +750,15 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, ShowWindow(GetDlgItem(hDlg,psh3),SW_HIDE); if (lpcf->Flags & CF_EFFECTS) { - for (res=1,i=0;res && i