Click here to Skip to main content
15,884,973 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I embedded some comboboxes on to my toolbar,(i.e. the toolbar is their parent) but I don't like the font used to display string in the boxes. The font used is too bold and too large. How can I change the combobox's font? What message do I handle?
Posted
Updated 17-Dec-14 7:48am
Comments
Maciej Los 17-Dec-14 12:51pm    
WPF? WinForm? WebControl? Any?
Please, be more specific and provide more details.
Gbenbam 17-Dec-14 13:49pm    
MFC

Perhaps this[^] or this [^] link will help.
 
Share this answer
 
CFont m_font;
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT));
lf.lfHeight = 15;                  
strcpy(lf.lfFaceName, "Arial");
m_font.CreateFontIndirect(&lf);
combo.SetFont(&m_font, TRUE);
 
Share this answer
 
Comments
Gbenbam 18-Dec-14 11:20am    
Thanks. It worked.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900