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 {
#define IDS_COLOR_AQUA 1054
#define IDS_COLOR_WHITE 1055
#define IDS_FONT_SIZE 1200
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
......
......@@ -460,6 +460,10 @@ STRINGTABLE DISCARDABLE /* Color names */
IDS_COLOR_WHITE "White"
}
STRINGTABLE DISCARDABLE
{
IDS_FONT_SIZE "Select a font size between %d and %d points."
}
/****************************************************************/
/* English neutral resources
......
......@@ -436,6 +436,11 @@ STRINGTABLE DISCARDABLE
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 */
{
IDS_COLOR_BLACK "Czarny"
......
......@@ -393,16 +393,17 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
static int AddFontSizeToCombo3(HWND hwnd, UINT h, LPCHOOSEFONTW lpcf)
{
int j;
char buffer[20];
WCHAR buffer[20];
static const WCHAR strFormat[] = {'%','2','d',0};
if ( (!(lpcf->Flags & CF_LIMITSIZE)) ||
((lpcf->Flags & CF_LIMITSIZE) && (h >= lpcf->nSizeMin) && (h <= lpcf->nSizeMax)))
{
sprintf(buffer, "%2d", h);
j=SendMessageA(hwnd, CB_FINDSTRINGEXACT, -1, (LPARAM)buffer);
wsprintfW(buffer, strFormat, h);
j=SendMessageW(hwnd, CB_FINDSTRINGEXACT, -1, (LPARAM)buffer);
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) return 1;
}
......@@ -1006,10 +1007,11 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
EndDialog(hDlg, TRUE);
else
{
char buffer[80];
sprintf(buffer,"Select a font size between %d and %d points.",
lpcf->nSizeMin,lpcf->nSizeMax);
MessageBoxA(hDlg, buffer, NULL, MB_OK);
WCHAR buffer[80];
WCHAR format[80];
LoadStringW(COMDLG32_hInstance, IDS_FONT_SIZE, format, sizeof(format)/sizeof(WCHAR));
wsprintfW(buffer, format, lpcf->nSizeMin,lpcf->nSizeMax);
MessageBoxW(hDlg, buffer, NULL, MB_OK);
}
return(TRUE);
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