469,945 Members | 1,393 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,945 developers. It's quick & easy.

funny working ListBox - help!

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 !
Jul 22 '05 #1
1 1512
jagello wrote:
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 :


This question is off-topic here: There are no 'ListBox'es in C++.
Check a Microsoft newsgroup.

--
Michael Schutte
Remove the Xes from the eMail address to reply.
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by eScrewDotCom | last post: by
8 posts views Thread by eScrewDotCom | last post: by
5 posts views Thread by eScrewDotCom | last post: by
3 posts views Thread by Paul T. Rong | last post: by
reply views Thread by eScrewDotCom | last post: by
5 posts views Thread by tshad | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.