• Advertisement
Sign in to follow this  

quick unicode question

This topic is 4625 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
Advertisement
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
Try setting the BS_MULTILINE style on the button when you call CreateWindowEx(); if the text characters are displaying correctly it isn't a Unicode problem.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement