Changelog Shachar Shemesh <winecode@sun.consumer.org.il> dlls/commdlg/cdlg.h dlls/commdlg/cdlg_En.rc * Defined IDs for string constants for font color names and for the various charsets * Defined the actual strings for English dlls/commdlg/fontdlg.c * Will now load the color names from the resources in the fonts dialog.
Index: dlls/commdlg/cdlg.h =================================================================== RCS file: /home/sun/sources/cvs/wine/dlls/commdlg/cdlg.h,v retrieving revision 1.25 diff -u -r1.25 cdlg.h --- dlls/commdlg/cdlg.h 3 Jan 2003 19:12:56 -0000 1.25 +++ dlls/commdlg/cdlg.h 26 Jan 2003 09:35:55 -0000 @@ -105,6 +105,43 @@ #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_RUSSION 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" Index: dlls/commdlg/cdlg_En.rc =================================================================== RCS file: /home/sun/sources/cvs/wine/dlls/commdlg/cdlg_En.rc,v retrieving revision 1.23 diff -u -r1.23 cdlg_En.rc --- dlls/commdlg/cdlg_En.rc 8 Nov 2002 18:56:46 -0000 1.23 +++ dlls/commdlg/cdlg_En.rc 26 Jan 2003 09:19:03 -0000 @@ -435,3 +435,23 @@ 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" +} Index: dlls/commdlg/fontdlg.c =================================================================== RCS file: /home/sun/sources/cvs/wine/dlls/commdlg/fontdlg.c,v retrieving revision 1.46 diff -u -r1.46 fontdlg.c --- dlls/commdlg/fontdlg.c 21 Nov 2002 23:55:10 -0000 1.46 +++ dlls/commdlg/fontdlg.c 26 Jan 2003 09:42:39 -0000 @@ -722,7 +722,7 @@ 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 @@ ShowWindow(GetDlgItem(hDlg,psh3),SW_HIDE); if (lpcf->Flags & CF_EFFECTS) { - for (res=1,i=0;res && i<TEXT_COLORS;i++) + for (i=0;i<TEXT_COLORS;i++) { - /* FIXME: load color name from resource: res=LoadString(...,i+....,buffer,.....); */ - char name[20]; - strcpy( name, "[color name]" ); + char name[30]; + + if( LoadStringA(COMMDLG_hInstance32, IDS_COLOR_BLACK+i, name, + sizeof(name)/sizeof(*name) )==0 ) + { + strcpy( name, "[color name]" ); + } j=SendDlgItemMessageA(hDlg, cmb4, CB_ADDSTRING, 0, (LPARAM)name); SendDlgItemMessageA(hDlg, cmb4, CB_SETITEMDATA16, j, textcolors[j]); /* look for a fitting value in color combobox */