Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Leda > funny working L...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 130 of 212
Post > Topic >>

funny working ListBox - help!

by jagello7@[EMAIL PROTECTED] (jagello) May 30, 2004 at 07:52 AM

Hi!

I have a problem with setting the character set in my ListBox (List).
When I create a CFont object with a specific character set and I set
that font in the Device Context recieved from the ListBox, then it is
OK. I can write through that DC in the chosen charset. See Code :

    CFont * font = new CFont;
    CFont *oldFont;
    CPaintDC dc( List );
    font->CreateFont (28,0,0,0,700,0,0,0,
        RUSSIAN_CHARSET,OUT_DEFAULT_PRECIS,
        CLIP_DEFAULT_PRECIS,
        DEFAULT_QUALITY,
        DEFAULT_PITCH|FF_DONTCARE,
            "Arial");                                     
	oldFont = dc.SelectObject( font);
	dc.ExtTextOut(10,170,0,
		NULL,"some text",
		strlen("some text"),NULL);

!!!!!!!!! BUT !!!!!!!!!
If I set that font right in my ListBox and want to have the text added
with code :

	List->SetFont( font, TRUE);
	List->AddString( "some other text" );

in the chosen charset, then it DOES NOT work !
However the added text has the other parameters of the chosen font (
Height and so on) but the charset is the original (standard) one.
Does anyone know how to force the ListBox to accept the charset from
the font also ?
Please HELP !




 1 Posts in Topic:
funny working ListBox - help!
jagello7@[EMAIL PROTECTED  2004-05-30 07:52:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 0:42:31 CDT 2008.