We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Unicode characters in CTreeCtrl

Medium Priority
900 Views
Last Modified: 2013-12-03
Hi there,
I'M having problems displaying UNICODE characters on a CTreeCtrl. The project is compiled for UNICODE and the UNICODE characters are displayed correctly on other controls from the project, only in the CTreeCtrl the characters are not displayed, just squares instead of characters.

Thanks
Comment
Watch Question

mahesh1402IT Professional
Top Expert 2005

Commented:
It seems the problem is in the font not being able to support the chars in try changing the font of the dialog and font character set .

Also try changing style of dialog to DS_SHELLFONT ( DS_SETFONT+DS_FIXEDSYS )

MAHESH





mahesh1402IT Professional
Top Expert 2005
Commented:
Just First try to change font of control using SetFont().

MAHESH

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
mahesh1402IT Professional
Top Expert 2005

Commented:
also have a look at TreeView_SetUnicodeFormat() function which sends TVM_SETUNICODEFORMAT message to control.

e.g

TreeView_SetUnicodeFormat(m_cTreeCtrl.m_hWnd, TRUE);

MAHESH

Author

Commented:
Hi guys,
thanks for your replies, I just changed the font to Arial and the Unicode characters appeared. Duh, I thought to all crazy solutions but only on this one not.

Thanks

Author

Commented:
oops, I wanted to give the points in opposite ways. Mahesh, I posted the similar question on Programming section, reply there please.
mahesh1402IT Professional
Top Expert 2005

Commented:
give the link.

BTW how you solved your problem ?

MAHESH

Author

Commented:
http://www.experts-exchange.com/Programming/Q_21803335.html

I just changed the font for the dialog to Arial. It worked with SetFont for the treectrl without changing the font for the whole dialog as well.

Thanks
mahesh1402IT Professional
Top Expert 2005

Commented:
So what was there in my first comment ?

>>It seems the problem is in the font not being able to support the chars in try changing the font of the dialog and font character set .


MAHESH

Author

Commented:
Yeah, the 1st comment

A-
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.