hum i create a dialog with out the font set, and the default font is the shits...hum how would i set it, so i can have it be like mS Sans Serif???

thanks in advance
sorry for 2 diff topics in so lil' time
Posted on 2001-07-26 13:12:04 by sToNeRiFiK
Afternoon, Stonerifik.

Use the 'DS_SETFONT' style for the dialog, and place the font info in your '*.rc' file;

DIALOGPROPS DIALOGEX 0, 50, 150, 145, 0

STYLE 0x0004 | WS_CAPTION | WS_VISIBLE | DS_SETFONT | WS_POPUPWINDOW
CAPTION "Properties"
FONT 9, "MS Sans Serif" ; <---- set font here!
BEGIN
LTEXT "Button", IDC_PanelButton, 0, 0, 50, 12, SS_SUNKEN
COMBOBOX IDC_ComboBoxButton, 50, 0, 100, 45, CBS_HASSTRINGS | BS_DROPDOWNLIST
...

END


Cheers,
Scronty
Posted on 2001-07-26 17:01:37 by Scronty
As well, if you want an api (that will apply to Dialogs and windows), use this:


invoke GetStockObject, ANSI_VAR_FONT
invoke SendMessage, hWindowORDlgItem, WM_SETFONT, eax, TRUE


Check out the GetStockObject API, there is losts of options... ( A way i remind myself to look here is, its the Window's Stores of defualts.. or a Stock of Objects to choose from to use in your programs.

Anywho.. hope this helps.

:tongue:
NaN
Posted on 2001-07-26 22:24:58 by NaN