I don't know how to change font and color of a combo box,anyone help? thanks
Posted on 2002-06-27 10:41:41 by pingyu
I've some code for changing the font:


 [color=chocolate]

LF LOGFONT <-12,0,0,0,400,0,0,0,0,1,2,1,49,"Arial">

invoke CreateFontIndirect, ADDR LF
invoke SendMessage, hComboBox, WM_SETFONT, eax, TRUE
[/color]


This is the structure LOGFONT:

[color=chocolate]

LOGFONT STRUCT
lfHeight DWORD ?
lfWidth DWORD ?
lfEscapement DWORD ?
lfOrientation DWORD ?
lfWeight DWORD ?
lfItalic BYTE ?
lfUnderline BYTE ?
lfStrikeOut BYTE ?
lfCharSet BYTE ?
lfOutPrecision BYTE ?
lflfClipPrecision BYTE ?
lfQuality BYTE ?
lfPitchAndFamily BYTE ?
lfFaceName BYTE 32 dup(?)
LOGFONT ENDS
[/color]
Posted on 2002-06-28 01:46:31 by Marwin
Use WM_CTLCOLORLISTBOX message to specify colour of your combobox.
Posted on 2002-06-28 11:49:36 by comrade
Thanks
Posted on 2002-07-02 08:08:48 by pingyu