quick unicode question
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!
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement