Sign in to follow this  
squirrel_of_death

quick unicode question

Recommended Posts

Hi there, I've spent way too long on this already, and I still don't know what's going wrong. Very simple, I have a windows button, and am trying to set the text on the button to be two lines, and so I'm doing the following : TCHAR *text = TEXT("clear\r\nimages"); m_hwndButton = (blah blah.. text, blah blah); and what the button displays is : clear||images Any help please? thanks!

Share this post


Link to post
Share on other sites
I tried two ways, first with the text variable, as in :
TCHAR *text = TEXT("clear\r\nimages");
being passed as the 3d field ( CreateWindowEx ), and secondly I tried sending it a WM_SETTEXT message, which also got the wrong || characters instead of a newline.

:(

*edit* I also tried creating a regular string of the same text, and then MultiByteToWideChar'ing it, and passing that to the button, but this also didn't work. I believe the error lies somewhere in win32, and my understanding of it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this