Sign in to follow this  

quick unicode question

This topic is 4557 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

This topic is 4557 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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