combo.Create(WS_VISIBLE|CBS_SIMPLE |CBS_HASSTRINGS |CBS_AUTOHSCROLL
|CBS_DROPDOWN |
0, CRect(0, 0, 100,00),
this,IDC_COMBO);
// Setting the FONT text, found in MSDN
// Set the font
CFont m_font;
LOGFONT lf; // Used to create the CFont.
memset(&lf, 0, sizeof(LOGFONT)); // Clear out structure.
lf.lfHeight = 15; // Request a 20-pixel-high font
strcpy(lf.lfFaceName, "Arial"); // with face name "Arial".
m_font.CreateFontIndirect(&lf); // Create the font.
combo.SetFont(&m_font, TRUE);
Any help is appreciated
Alberto.V
>// Setting the FONT text, found in MSDN
>// Set the font
>CFont m_font;
Alberto,
The font needs to exist for as long as the control using it. The
normal solution is to make the CFont variable a member variable of the
class that is the parent of the control you're using it with.
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.
Alberto