Commit 6f1a7da4 authored by Rein Klazes's avatar Rein Klazes Committed by Alexandre Julliard

Implement combobox to select the font's character set.

Bug fixes: handle WM_MEASUREITEM message; handle the WM_PAINT message in the 16bit font dialog, so it displays the sample string too.
parent 4175fdb7
......@@ -139,8 +139,11 @@ FONT 8, "Helv"
LTEXT "&Color:", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Exemple",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -139,8 +139,11 @@ FONT 8, "Helv"
LTEXT "颜色(&C):", 1091 ,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 "示例",1073,98,72,160,49,WS_GROUP
CTEXT "中文字体AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
GROUPBOX "示例",grp2,98,72,120,36,WS_GROUP
CTEXT "中文字体AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -139,8 +139,11 @@ FONT 8, "Helv"
LTEXT "&Farve:", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Eksempel",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -169,8 +169,11 @@ FONT 8, "Helv"
LTEXT "&Farbe:", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Muster",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -139,8 +139,11 @@ FONT 8, "Helv"
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",grp2,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Sample",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt:",stc7 ,98,114,40,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -139,8 +139,11 @@ FONT 8, "Helv"
LTEXT "&Color:", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Ejemplo",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -139,8 +139,11 @@ FONT 8, "Helv"
LTEXT "V&ri:", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Nyte",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -142,8 +142,11 @@ FONT 8, "Helv"
LTEXT "&Couleur:", 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 "Exemple",grp2,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Exemple",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -138,8 +138,11 @@ FONT 8, "Helv"
LTEXT "&Szn:", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Minta",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -138,8 +138,11 @@ FONT 8, "Helv"
LTEXT "&Colore:", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Esempio",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
CHOOSE_COLOR DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 300, 185
......
......@@ -139,8 +139,11 @@ FONT 8, "MS Pゴシック"
LTEXT "色(&C):", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "サンプル",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -137,10 +137,13 @@ FONT 8, "Helv"
CHECKBOX "&Doorhalen", 1040, 10,82,50,10, BS_AUTOCHECKBOX | WS_TABSTOP
CHECKBOX "&Onderstrepen", 1041, 10,94,50,10, BS_AUTOCHECKBOX
LTEXT "&Kleur:", 1091 ,6,110,30,9
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
COMBOBOX cmb4,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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Voorbeeld",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Schr&ift:",stc7 ,98,114,40,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -136,8 +136,13 @@ WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE | CBS_SORT, 179,13,32,54
LTEXT "&Kolor:", 1091, 6,110,30,9, WS_CHILD | WS_VISIBLE | WS_GROUP
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", stc5, "STATIC", SS_NOPREFIX | NOT WS_VISIBLE, 104,81,149,37
/* CONTROL "Przykad", 1073, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 98,72,160,49
CONTROL "AaBbYyZz\xB3", stc5, "STATIC", SS_NOPREFIX | NOT WS_VISIBLE, 104,81,149,37 */
GROUPBOX "Przykad",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz\xB3",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
END
/* PUSHBUTTON "&Replace", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP
* PUSHBUTTON "Replace &All", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
......
......@@ -140,8 +140,11 @@ FONT 8, "Helv"
LTEXT "&Cor:", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Amostra",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -139,8 +139,11 @@ FONT 8, "Ms Sans Serif"
LTEXT "&:", 1091 ,6,110,30,9
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 "AaBb",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBb",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -139,8 +139,11 @@ FONT 8, "MS Sans Serif"
LTEXT "&Barva:", 1091 ,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 "Vzorec",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Vzorec",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -141,8 +141,11 @@ FONT 8, "Helv"
LTEXT "&Farba:", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Vzorka",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
CHOOSE_COLOR DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 300, 185
......
......@@ -137,8 +137,11 @@ FONT 8, "Helv"
LTEXT "&Frg:", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Test",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -144,8 +144,11 @@ FONT 8, "Helv"
LTEXT "&Coleur:", 1091 ,6,110,30,9
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",stc5,104,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "Egzimpe",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -90,8 +90,11 @@ FONT 8, "Helv"
LTEXT "色彩(&C):", 1091 ,6,110,30,9
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",stc5,134,81,149,37,SS_NOPREFIX | NOT WS_VISIBLE
GROUPBOX "範例",grp2,98,72,120,36,WS_GROUP
CTEXT "AaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
LTEXT "Scr&ipt (translate):",stc7 ,98,114,80,9
COMBOBOX cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
}
......
......@@ -417,15 +417,16 @@ INT AddFontFamily(const LOGFONTA *lplf, UINT nFontType,
if (e) e->added++;
i=SendMessageA(hwnd, CB_ADDSTRING, 0, (LPARAM)lplf->lfFaceName);
if (i!=CB_ERR)
{
i=SendMessageA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)lplf->lfFaceName);
if (i == CB_ERR) {
i = SendMessageA(hwnd, CB_ADDSTRING, 0, (LPARAM)lplf->lfFaceName);
if( i != CB_ERR) {
w=(lplf->lfCharSet << 8) | lplf->lfPitchAndFamily;
/* store some important font information */
SendMessageA(hwnd, CB_SETITEMDATA, i, MAKELONG(nFontType,w));
return 1 ; /* store some important font information */
}
else
return 0;
}
return 1;
}
/*************************************************************************
......@@ -526,10 +527,13 @@ static int SetFontSizesToCombo3(HWND hwnd, LPCHOOSEFONTA lpcf)
/***********************************************************************
* AddFontStyle [internal]
*/
INT AddFontStyle(const LOGFONTA *lplf, UINT nFontType,
LPCHOOSEFONTA lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg)
INT AddFontStyle( const ENUMLOGFONTEXA *lpElfex, UINT nFontType,
LPCHOOSEFONTA lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg,
BOOL iswin16)
{
int i;
const LOGFONTA *lplf = &(lpElfex->elfLogFont);
HWND hcmb5;
TRACE("(nFontType=%d)\n",nFontType);
TRACE(" %s h=%ld w=%ld e=%ld o=%ld wg=%ld i=%d u=%d s=%d"
......@@ -553,9 +557,18 @@ INT AddFontStyle(const LOGFONTA *lplf, UINT nFontType,
if (i)
return 0;
}
if( iswin16 || !( hcmb5 = GetDlgItem(hDlg, cmb5))) return 1;
i = SendMessageA( hcmb5, CB_FINDSTRINGEXACT, 0,
(LPARAM)lpElfex->elfScript);
if( i == CB_ERR) {
i = SendMessageA( hcmb5, CB_ADDSTRING, 0,
(LPARAM)lpElfex->elfScript);
if( i != CB_ERR)
SendMessageA( hcmb5, CB_SETITEMDATA, i, lplf->lfCharSet);
}
return 1 ;
}
static INT CFn_FitFontSize( HWND hDlg, int points)
{
int i,n;
......@@ -598,18 +611,42 @@ static INT CFn_FitFontStyle( HWND hDlg, LONG packedstyle )
return ret;
}
static INT CFn_FitCharSet( HWND hDlg, int charset )
{
int i,n,cs;
/* look for fitting har set in combobox5 */
n=SendDlgItemMessageA(hDlg, cmb5, CB_GETCOUNT, 0, 0);
for (i=0;i<n;i++)
{
cs =SendDlgItemMessageA(hDlg, cmb5, CB_GETITEMDATA, i, 0);
if (charset == cs)
{
SendDlgItemMessageA(hDlg, cmb5, CB_SETCURSEL, i, 0);
SendMessageA(hDlg, WM_COMMAND, MAKEWPARAM(cmb5, CBN_SELCHANGE),
(LPARAM)GetDlgItem(hDlg,cmb2));
return 1;
}
}
/* no charset fits: select the first one in the list */
SendDlgItemMessageA(hDlg, cmb5, CB_SETCURSEL, 0, 0);
SendMessageA(hDlg, WM_COMMAND, MAKEWPARAM(cmb5, CBN_SELCHANGE),
(LPARAM)GetDlgItem(hDlg,cmb2));
return 0;
}
/***********************************************************************
* FontStyleEnumProc32 [internal]
*/
static INT WINAPI FontStyleEnumProc( const LOGFONTA *lpFont,
static INT WINAPI FontStyleEnumProc( const ENUMLOGFONTEXA *lpElfex,
const TEXTMETRICA *metrics, DWORD dwFontType, LPARAM lParam )
{
LPCFn_ENUMSTRUCT s=(LPCFn_ENUMSTRUCT)lParam;
HWND hcmb2=s->hWnd1;
HWND hcmb3=s->hWnd2;
HWND hDlg=GetParent(hcmb3);
return AddFontStyle(lpFont, dwFontType, s->lpcf32a, hcmb2,
hcmb3, hDlg);
return AddFontStyle( lpElfex, dwFontType, s->lpcf32a,
hcmb2, hcmb3, hDlg, FALSE);
}
/***********************************************************************
......@@ -701,6 +738,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
if (j!=CB_ERR)
{
INT height = (lpcf->iPointSize + 5) / 10;
int charset = lpxx->lfCharSet;
pstyle=MAKELONG(lpxx->lfWeight > FW_MEDIUM ? FW_BOLD:FW_NORMAL,lpxx->lfItalic !=0);
SendDlgItemMessageA(hDlg, cmb1, CB_SETCURSEL, j, 0);
SendMessageA(hDlg, WM_COMMAND, MAKEWPARAM(cmb1, CBN_SELCHANGE),
......@@ -710,6 +748,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
CFn_FitFontStyle(hDlg, pstyle);
/* look for fitting font size in combobox3 */
CFn_FitFontSize(hDlg, height);
CFn_FitCharSet( hDlg, charset );
}
}
if (!init)
......@@ -824,6 +863,7 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
case cmb2:
case cmb3:
/* TRACE(commdlg,"WM_DRAWITEN cmb2,cmb3\n"); */
case cmb5:
SendMessageA(lpdi->hwndItem, CB_GETLBTEXT, lpdi->itemID,
(LPARAM)buffer);
TextOutA(lpdi->hDC, lpdi->rcItem.left,
......@@ -887,30 +927,38 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
{
INT pointsize; /* save current pointsize */
LONG pstyle; /* save current style */
int idx2, idx3;
idx3 = SendDlgItemMessageA(hDlg, cmb3, CB_GETCURSEL, 0, 0);
int charset;
int idx;
idx = SendDlgItemMessageA(hDlg, cmb3, CB_GETCURSEL, 0, 0);
pointsize = (int)SendDlgItemMessageA( hDlg, cmb3, CB_GETITEMDATA,
idx3, 0);
idx2 = SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0);
pstyle = SendDlgItemMessageA(hDlg, cmb2, CB_GETITEMDATA, idx2, 0);
idx, 0);
idx = SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0);
pstyle = SendDlgItemMessageA(hDlg, cmb2, CB_GETITEMDATA, idx, 0);
idx = SendDlgItemMessageA(hDlg, cmb5, CB_GETCURSEL, 0, 0);
charset = SendDlgItemMessageA(hDlg, cmb5, CB_GETITEMDATA, idx, 0);
SendDlgItemMessageA(hDlg, cmb2, CB_RESETCONTENT, 0, 0);
SendDlgItemMessageA(hDlg, cmb3, CB_RESETCONTENT, 0, 0);
SendDlgItemMessageA(hDlg, cmb5, CB_RESETCONTENT, 0, 0);
i=SendDlgItemMessageA(hDlg, cmb1, CB_GETCURSEL, 0, 0);
if (i!=CB_ERR)
{
HCURSOR hcursor=SetCursor(LoadCursorA(0,(LPSTR)IDC_WAIT));
CFn_ENUMSTRUCT s;
char str[256];
LOGFONTA enumlf;
SendDlgItemMessageA(hDlg, cmb1, CB_GETLBTEXT, i,
(LPARAM)str);
TRACE("WM_COMMAND/cmb1 =>%s\n",str);
(LPARAM)enumlf.lfFaceName);
TRACE("WM_COMMAND/cmb1 =>%s\n",enumlf.lfFaceName);
s.hWnd1=GetDlgItem(hDlg, cmb2);
s.hWnd2=GetDlgItem(hDlg, cmb3);
s.lpcf32a=lpcf;
EnumFontFamiliesA(hdc, str, FontStyleEnumProc, (LPARAM)&s);
enumlf.lfCharSet = DEFAULT_CHARSET; /* enum all charsets */
enumlf.lfPitchAndFamily = 0;
EnumFontFamiliesExA(hdc, &enumlf,
(FONTENUMPROCA)FontStyleEnumProc, (LPARAM)&s, 0);
CFn_FitFontStyle(hDlg, pstyle);
CFn_FitFontSize(hDlg, pointsize);
if( pointsize != CB_ERR) CFn_FitFontSize(hDlg, pointsize);
if( charset != CB_ERR) CFn_FitCharSet( hDlg, charset );
SetCursor(hcursor);
}
if (!((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC))
......@@ -927,6 +975,7 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
case chx2:
case cmb2:
case cmb3:
case cmb5:
if (HIWORD(wParam)==CBN_SELCHANGE || HIWORD(wParam)== BN_CLICKED )
{
char str[256];
......@@ -964,6 +1013,9 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
lpxx->lfHeight=-LOWORD(SendDlgItemMessageA(hDlg, cmb3, CB_GETITEMDATA, i, 0));
else
lpxx->lfHeight=0;
i=SendDlgItemMessageA(hDlg, cmb5, CB_GETCURSEL, 0, 0);
if (i!=CB_ERR)
lpxx->lfCharSet=SendDlgItemMessageA(hDlg, cmb5, CB_GETITEMDATA, i, 0);
lpxx->lfStrikeOut=IsDlgButtonChecked(hDlg,chx1);
lpxx->lfUnderline=IsDlgButtonChecked(hDlg,chx2);
lpxx->lfWidth=lpxx->lfOrientation=lpxx->lfEscapement=0;
......@@ -1033,7 +1085,7 @@ LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam)
return TRUE;
}
static LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam,
LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam,
LPCHOOSEFONTA lpcf )
{
WINDOWINFO info;
......@@ -1094,7 +1146,7 @@ INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
if (uMsg!=WM_INITDIALOG)
{
lpcf=(LPCHOOSEFONTA)GetWindowLongA(hDlg, DWL_USER);
if (!lpcf)
if (!lpcf && uMsg != WM_MEASUREITEM)
return FALSE;
if (CFn_HookCallChk32(lpcf))
res=CallWindowProcA((WNDPROC)lpcf->lpfnHook, hDlg, uMsg, wParam, lParam);
......
......@@ -45,8 +45,9 @@ typedef struct
INT AddFontFamily(const LOGFONTA *lplf, UINT nFontType, LPCHOOSEFONTA lpcf,
HWND hwnd, LPCFn_ENUMSTRUCT e);
INT AddFontStyle(const LOGFONTA *lplf, UINT nFontType, LPCHOOSEFONTA lpcf,
HWND hcmb2, HWND hcmb3, HWND hDlg);
INT AddFontStyle(const ENUMLOGFONTEXA *lpElfex, UINT nFontType,
LPCHOOSEFONTA lpcf, HWND hcmb2,
HWND hcmb3, HWND hDlg, BOOL iswin16);
void _dump_cf_flags(DWORD cflags);
LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
......@@ -55,6 +56,8 @@ LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam);
LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam);
LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
LPCHOOSEFONTA lpcf);
LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam,
LPCHOOSEFONTA lpcf);
LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam);
#endif /* _WINE_FONTDLG_H */
......@@ -117,10 +117,10 @@ INT16 WINAPI FontStyleEnumProc16( SEGPTR logfont, SEGPTR metrics,
HWND hDlg=GetParent(hcmb3);
LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
LOGFONT16 *lplf = MapSL(logfont);
LOGFONTA lf32a;
FONT_LogFont16To32A(lplf, &lf32a);
return AddFontStyle(&lf32a, nFontType, (LPCHOOSEFONTA)lpcf->lpTemplateName,
hcmb2, hcmb3, hDlg);
ENUMLOGFONTEXA elf32a;
FONT_LogFont16To32A(lplf, &(elf32a.elfLogFont));
return AddFontStyle(&elf32a, nFontType, (LPCHOOSEFONTA)lpcf->lpTemplateName,
hcmb2, hcmb3, hDlg, TRUE);
}
/***********************************************************************
......@@ -257,12 +257,11 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message,
{
HWND hDlg = HWND_32(hDlg16);
LPCHOOSEFONT16 lpcf;
LPCHOOSEFONTA lpcf32a;
BOOL16 res=0;
if (message!=WM_INITDIALOG)
{
lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
if (!lpcf)
if (!lpcf && message != WM_MEASUREITEM)
return FALSE;
if (CFn_HookCallChk(lpcf))
res=CallWindowProc16((WNDPROC16)lpcf->lpfnHook,hDlg16,message,wParam,lParam);
......@@ -272,8 +271,7 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message,
else
{
lpcf=(LPCHOOSEFONT16)lParam;
lpcf32a=(LPCHOOSEFONTA)lpcf->lpTemplateName;
if (!CFn_WMInitDialog(hDlg, wParam, lParam, lpcf32a))
if (!CFn_WMInitDialog(hDlg, wParam, lParam, (LPCHOOSEFONTA)lpcf->lpTemplateName))
{
TRACE("CFn_WMInitDialog returned FALSE\n");
return FALSE;
......@@ -281,7 +279,6 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message,
if (CFn_HookCallChk(lpcf))
return CallWindowProc16((WNDPROC16)lpcf->lpfnHook,hDlg16,WM_INITDIALOG,wParam,lParam);
}
lpcf32a=(LPCHOOSEFONTA)lpcf->lpTemplateName;
switch (message)
{
case WM_MEASUREITEM:
......@@ -316,7 +313,8 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message,
}
break;
case WM_COMMAND:
res=CFn_WMCommand(hDlg, MAKEWPARAM( wParam, HIWORD(lParam) ), LOWORD(lParam), lpcf32a);
res=CFn_WMCommand(hDlg, MAKEWPARAM( wParam, HIWORD(lParam) ), LOWORD(lParam),
(LPCHOOSEFONTA)lpcf->lpTemplateName);
break;
case WM_DESTROY:
res=CFn_WMDestroy(hDlg, wParam, lParam);
......@@ -325,6 +323,9 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message,
TRACE("WM_CHOOSEFONT_GETLOGFONT lParam=%08lX\n", lParam);
FIXME("current logfont back to caller\n");
break;
case WM_PAINT:
res= CFn_WMPaint(hDlg, wParam, lParam, (LPCHOOSEFONTA)lpcf->lpTemplateName);
break;
}
return res;
}
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