diff --git a/dlls/comdlg32/cdlg.h b/dlls/comdlg32/cdlg.h index 22cd5a21e8a..f88e2d4f68c 100644 --- a/dlls/comdlg32/cdlg.h +++ b/dlls/comdlg32/cdlg.h @@ -126,6 +126,13 @@ typedef struct { #define IDS_CHARSET_ISO10 223 #define IDS_CHARSET_CELTIC 224 +/* Font styles */ + +#define IDS_FONT_REGULAR 256 +#define IDS_FONT_BOLD 257 +#define IDS_FONT_ITALIC 258 +#define IDS_FONT_BOLD_ITALIC 259 + /* Color names string IDs */ #define IDS_COLOR_BLACK 1040 diff --git a/dlls/comdlg32/cdlg_En.rc b/dlls/comdlg32/cdlg_En.rc index a9be1a940e4..20214484d95 100644 --- a/dlls/comdlg32/cdlg_En.rc +++ b/dlls/comdlg32/cdlg_En.rc @@ -443,6 +443,14 @@ Please install one and retry." PD32_PRINTER_STATUS_POWER_SAVE "Power save mode; " } +STRINGTABLE DISCARDABLE /* Font styles */ +{ + IDS_FONT_REGULAR "Regular" + IDS_FONT_BOLD "Bold" + IDS_FONT_ITALIC "Italic" + IDS_FONT_BOLD_ITALIC "Bold Italic" +} + STRINGTABLE DISCARDABLE /* Color names */ { IDS_COLOR_BLACK "Black" diff --git a/dlls/comdlg32/cdlg_Pl.rc b/dlls/comdlg32/cdlg_Pl.rc index 7376fb74642..f28b00ea7e4 100644 --- a/dlls/comdlg32/cdlg_Pl.rc +++ b/dlls/comdlg32/cdlg_Pl.rc @@ -449,6 +449,14 @@ STRINGTABLE DISCARDABLE IDS_OPEN_FILE "Otwórz plik" } +STRINGTABLE DISCARDABLE /* Font styles */ +{ + IDS_FONT_REGULAR "Regularny" + IDS_FONT_BOLD "Pogrubiony" + IDS_FONT_ITALIC "Kusywa" + IDS_FONT_BOLD_ITALIC "Pogrubiona kursywa" +} + STRINGTABLE DISCARDABLE /* Color names */ { IDS_COLOR_BLACK "Czarny" diff --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c index 899cfe4c5b2..2532f2ffc13 100644 --- a/dlls/comdlg32/fontdlg.c +++ b/dlls/comdlg32/fontdlg.c @@ -357,17 +357,13 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf) { int italic; int weight; - const WCHAR *stname; + UINT resId; }; - static const WCHAR strRegular[] = {'R','e','g','u','l','a','r',0}; - static const WCHAR strItalic[] = {'I','t','a','l','i','c',0}; - static const WCHAR strBold[] = {'B','o','l','d',0}; - static const WCHAR strBoldItalic[] = {'B','o','l','d',' ','I','t','a','l','i','c',0}; static const struct FONTSTYLE fontstyles[FSTYLES]={ - { 0, FW_NORMAL, strRegular }, - { 1, FW_NORMAL, strItalic }, - { 0, FW_BOLD, strBold }, - { 1, FW_BOLD, strBoldItalic } + { 0, FW_NORMAL, IDS_FONT_REGULAR }, + { 1, FW_NORMAL, IDS_FONT_ITALIC }, + { 0, FW_BOLD, IDS_FONT_BOLD }, + { 1, FW_BOLD, IDS_FONT_BOLD_ITALIC } }; HFONT hf; TEXTMETRICW tm; @@ -390,7 +386,9 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf) (fontstyles[i].weight == FW_BOLD && tm.tmWeight > FW_MEDIUM)) && ((tm.tmItalic != 0)==fontstyles[i].italic)) { - j=SendMessageW(hwnd,CB_ADDSTRING,0,(LPARAM)fontstyles[i].stname ); + WCHAR name[64]; + LoadStringW(COMDLG32_hInstance, fontstyles[i].resId, name, 64); + j=SendMessageW(hwnd,CB_ADDSTRING,0,(LPARAM)name ); if (j==CB_ERR) return 1; j=SendMessageW(hwnd, CB_SETITEMDATA, j, MAKELONG(tm.tmWeight,fontstyles[i].italic));