Commit fe7fc51a authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

Moved string to resources.

parent f783cd03
...@@ -145,6 +145,8 @@ typedef struct { ...@@ -145,6 +145,8 @@ typedef struct {
#define IDS_COLOR_AQUA 1054 #define IDS_COLOR_AQUA 1054
#define IDS_COLOR_WHITE 1055 #define IDS_COLOR_WHITE 1055
#define IDS_FONT_SIZE 1200
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "wingdi.h" #include "wingdi.h"
......
...@@ -460,6 +460,10 @@ STRINGTABLE DISCARDABLE /* Color names */ ...@@ -460,6 +460,10 @@ STRINGTABLE DISCARDABLE /* Color names */
IDS_COLOR_WHITE "White" IDS_COLOR_WHITE "White"
} }
STRINGTABLE DISCARDABLE
{
IDS_FONT_SIZE "Select a font size between %d and %d points."
}
/****************************************************************/ /****************************************************************/
/* English neutral resources /* English neutral resources
......
...@@ -436,6 +436,11 @@ STRINGTABLE DISCARDABLE ...@@ -436,6 +436,11 @@ STRINGTABLE DISCARDABLE
PD32_PRINTER_STATUS_POWER_SAVE "Tryb oszczdzania energii; " PD32_PRINTER_STATUS_POWER_SAVE "Tryb oszczdzania energii; "
} }
STRINGTABLE DISCARDABLE
{
IDS_FONT_SIZE "Wybierz czcionk o rozmiarze pomidzy %d a %d punktami."
}
STRINGTABLE DISCARDABLE /* Color names */ STRINGTABLE DISCARDABLE /* Color names */
{ {
IDS_COLOR_BLACK "Czarny" IDS_COLOR_BLACK "Czarny"
......
...@@ -393,16 +393,17 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf) ...@@ -393,16 +393,17 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
static int AddFontSizeToCombo3(HWND hwnd, UINT h, LPCHOOSEFONTW lpcf) static int AddFontSizeToCombo3(HWND hwnd, UINT h, LPCHOOSEFONTW lpcf)
{ {
int j; int j;
char buffer[20]; WCHAR buffer[20];
static const WCHAR strFormat[] = {'%','2','d',0};
if ( (!(lpcf->Flags & CF_LIMITSIZE)) || if ( (!(lpcf->Flags & CF_LIMITSIZE)) ||
((lpcf->Flags & CF_LIMITSIZE) && (h >= lpcf->nSizeMin) && (h <= lpcf->nSizeMax))) ((lpcf->Flags & CF_LIMITSIZE) && (h >= lpcf->nSizeMin) && (h <= lpcf->nSizeMax)))
{ {
sprintf(buffer, "%2d", h); wsprintfW(buffer, strFormat, h);
j=SendMessageA(hwnd, CB_FINDSTRINGEXACT, -1, (LPARAM)buffer); j=SendMessageW(hwnd, CB_FINDSTRINGEXACT, -1, (LPARAM)buffer);
if (j==CB_ERR) if (j==CB_ERR)
{ {
j=SendMessageA(hwnd, CB_ADDSTRING, 0, (LPARAM)buffer); j=SendMessageW(hwnd, CB_ADDSTRING, 0, (LPARAM)buffer);
if (j!=CB_ERR) j = SendMessageW(hwnd, CB_SETITEMDATA, j, h); if (j!=CB_ERR) j = SendMessageW(hwnd, CB_SETITEMDATA, j, h);
if (j==CB_ERR) return 1; if (j==CB_ERR) return 1;
} }
...@@ -1006,10 +1007,11 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, ...@@ -1006,10 +1007,11 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
EndDialog(hDlg, TRUE); EndDialog(hDlg, TRUE);
else else
{ {
char buffer[80]; WCHAR buffer[80];
sprintf(buffer,"Select a font size between %d and %d points.", WCHAR format[80];
lpcf->nSizeMin,lpcf->nSizeMax); LoadStringW(COMDLG32_hInstance, IDS_FONT_SIZE, format, sizeof(format)/sizeof(WCHAR));
MessageBoxA(hDlg, buffer, NULL, MB_OK); wsprintfW(buffer, format, lpcf->nSizeMin,lpcf->nSizeMax);
MessageBoxW(hDlg, buffer, NULL, MB_OK);
} }
return(TRUE); return(TRUE);
case IDCANCEL: case IDCANCEL:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment