Commit 9ce27aa3 authored by Shachar Shemesh's avatar Shachar Shemesh Committed by Alexandre Julliard

- Changed all numeric resources in ChooseFont to labels for better

readability. - Changed all handling of stc6 (1093) to atc5 (1092) so that will be compatible with Windows resource numbers. - Added code to load the user's resources rather than our own if CF_ENABLETEMPLATE is passed in "flags".
parent 4c5c90e2
......@@ -136,7 +136,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Exemple",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -136,7 +136,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Eksempel",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -166,7 +166,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Muster",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -116,27 +116,27 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Font"
FONT 8, "Helv"
{
LTEXT "&Font:",1088 ,6,3,40,9
LTEXT "&Font:",stc1 ,6,3,40,9
COMBOBOX cmb1, 6,13,94,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |
CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE
LTEXT "Font St&yle:",1089 ,108,3,44,9
LTEXT "Font St&yle:",stc2 ,108,3,44,9
COMBOBOX cmb2,108,13,64,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |
WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE
LTEXT "&Size:",1090,179,3,30,9
LTEXT "&Size:",stc3,179,3,30,9
COMBOBOX cmb3,179,13,32,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |
WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE | CBS_SORT
DEFPUSHBUTTON "OK",IDOK,218,6,40,14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Cancel",IDCANCEL,218,23,40,14,WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Apply", psh3,218,40,40,14,WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Help" , pshHelp,218,57,40,14,WS_GROUP | WS_TABSTOP
GROUPBOX "Effects",1072,6,72,84,34,WS_GROUP
GROUPBOX "Effects",grp1,6,72,84,34,WS_GROUP
CHECKBOX "Stri&keout", chx1, 10,82,50,10, BS_AUTOCHECKBOX | WS_TABSTOP
CHECKBOX "&Underline", chx2, 10,94,50,10, BS_AUTOCHECKBOX
LTEXT "&Color:", 1091 ,6,110,30,9
LTEXT "&Color:", stc4 ,6,110,30,9
COMBOBOX cmb4,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Sample",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
GROUPBOX "Sample",grp2,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -136,7 +136,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Ejemplo",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -136,7 +136,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Nyte",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -136,7 +136,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Exemple",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -135,7 +135,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Minta",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -135,7 +135,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Esempio",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
CHOOSE_COLOR DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 300, 185
......
......@@ -136,7 +136,7 @@ FONT 8, "MS Pゴシック"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "サンプル",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -136,7 +136,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Voorbeeld",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -133,7 +133,7 @@ WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE | CBS_SORT, 179,13,32,54
CONTROL "", 1139, "COMBOBOX", CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 6,120,84,100
CONTROL "Przykad", 1073, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 98,72,160,49
CONTROL "AaBbYyZz\xB3", 1093, "STATIC", SS_NOPREFIX | WS_VISIBLE, 104,81,149,37
CONTROL "AaBbYyZz\xB3", stc5, "STATIC", SS_NOPREFIX | WS_VISIBLE, 104,81,149,37
END
/* PUSHBUTTON "&Replace", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP
* PUSHBUTTON "Replace &All", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
......
......@@ -136,7 +136,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Amostra",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -136,7 +136,7 @@ FONT 8, "Ms Sans Serif"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -136,7 +136,7 @@ FONT 8, "MS Sans Serif"
COMBOBOX cmb4,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Vzorec",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......@@ -429,6 +429,6 @@ Vnesite tevilo med %d in %d."
PD32_PRINTER_STATUS_USER_INTERVENTION "Poseg uporabnika; "
PD32_PRINTER_STATUS_OUT_OF_MEMORY "Zmanjkalo je pomnilnika; "
PD32_PRINTER_STATUS_DOOR_OPEN "Odprto ohije; "
PD32_PRINTER_STATUS_SERVER_UNKNOWN "Neznan strenik; " // not
PD32_PRINTER_STATUS_POWER_SAVE "V pripravljenosti; " // not
PD32_PRINTER_STATUS_SERVER_UNKNOWN "Neznan strenik; " /* not */
PD32_PRINTER_STATUS_POWER_SAVE "V pripravljenosti; " /* not */
}
......@@ -138,7 +138,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Vzorka",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
CHOOSE_COLOR DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 300, 185
......
......@@ -134,7 +134,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Test",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -141,7 +141,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Egzimpe",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -87,7 +87,7 @@ FONT 8, "Helv"
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "範例",1073,128,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,134,81,149,37,SS_NOPREFIX | WS_VISIBLE
CTEXT "AaBbYyZz",stc5,134,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
......
......@@ -262,14 +262,28 @@ BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont)
{
LPCVOID template;
HRSRC hResInfo;
HINSTANCE hDlginst;
HGLOBAL hDlgTmpl;
if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, "CHOOSE_FONT", RT_DIALOGA)))
if ( (lpChFont->Flags&CF_ENABLETEMPLATE)!=0 )
{
COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
return FALSE;
hDlginst=lpChFont->hInstance;
if( !(hResInfo = FindResourceA(hDlginst, lpChFont->lpTemplateName,
RT_DIALOGA)))
{
COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
return FALSE;
}
} else
{
hDlginst=COMMDLG_hInstance32;
if (!(hResInfo = FindResourceA(hDlginst, "CHOOSE_FONT", RT_DIALOGA)))
{
COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
return FALSE;
}
}
if (!(hDlgTmpl = LoadResource(COMMDLG_hInstance32, hResInfo )) ||
if (!(hDlgTmpl = LoadResource(hDlginst, hResInfo )) ||
!(template = LockResource( hDlgTmpl )))
{
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
......@@ -720,7 +734,7 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
hBitmapTT = LoadBitmapA(0, MAKEINTRESOURCEA(OBM_TRTYPE));
/* This font will be deleted by WM_COMMAND */
SendDlgItemMessageA(hDlg,stc6,WM_SETFONT,
SendDlgItemMessageA(hDlg,stc5,WM_SETFONT,
(WPARAM)CreateFontA(0, 0, 1, 1, 400, 0, 0, 0, 0, 0, 0, 0, 0, NULL),FALSE);
if (!(lpcf->Flags & CF_SHOWHELP) || !IsWindow(lpcf->hwndOwner))
......@@ -959,7 +973,7 @@ static LRESULT CFn_WMCtlColorStatic(HWND hDlg, WPARAM wParam, LPARAM lParam,
LPCHOOSEFONTA lpcf)
{
if (lpcf->Flags & CF_EFFECTS)
if (GetDlgCtrlID(HWND_32(LOWORD(lParam)))==stc6)
if (GetDlgCtrlID(HWND_32(LOWORD(lParam)))==stc5)
{
SetTextColor((HDC)wParam, lpcf->rgbColors);
return (LRESULT)GetStockObject(WHITE_BRUSH);
......@@ -1065,9 +1079,9 @@ static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
hFont=CreateFontIndirectA(lpxx);
if (hFont)
{
HFONT oldFont=(HFONT)SendDlgItemMessageA(hDlg, stc6,
HFONT oldFont=(HFONT)SendDlgItemMessageA(hDlg, stc5,
WM_GETFONT, 0, 0);
SendDlgItemMessageA(hDlg,stc6,WM_SETFONT,(WPARAM)hFont,TRUE);
SendDlgItemMessageA(hDlg,stc5,WM_SETFONT,(WPARAM)hFont,TRUE);
DeleteObject(oldFont);
}
}
......@@ -1077,7 +1091,7 @@ static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
if (i!=CB_ERR)
{
lpcf->rgbColors=textcolors[i];
InvalidateRect( GetDlgItem(hDlg,stc6), NULL, 0 );
InvalidateRect( GetDlgItem(hDlg,stc5), NULL, 0 );
}
break;
......@@ -1109,7 +1123,7 @@ static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
static LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
DeleteObject((HFONT)SendDlgItemMessageA(hwnd, stc6, WM_GETFONT, 0, 0));
DeleteObject((HFONT)SendDlgItemMessageA(hwnd, stc5, WM_GETFONT, 0, 0));
return TRUE;
}
......
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