- 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.
This commit is contained in:
parent
056d2a4421
commit
7ee13d8f3e
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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<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 */
|
||||
|
|
Loading…
Reference in New Issue