jhp333
asked on
VC++ button control with special character or symbol
Using Visual Studio 2005, I added a symbol, a triangle character "¿", to the caption of a button control.
It looks fine in the resource editor, so does in test dialog view.
But when the project is built and run, the symbol just appears as a question mark.
I tried changing the font property of the dialog box without luck.
Am I missing something?
Thank you.
It looks fine in the resource editor, so does in test dialog view.
But when the project is built and run, the symbol just appears as a question mark.
I tried changing the font property of the dialog box without luck.
Am I missing something?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For Copyright symbol:
// 0xA9 is the hex for copyright symbol.
const LPCWSTR lpszCopyright = L"Copyright \xA9 cool";
// 0xA9 is the hex for copyright symbol.
const LPCWSTR lpszCopyright = L"Copyright \xA9 cool";
ASKER
Thank you for your answer.
You're right, the project doesn't support Unicode. But SetDlgItemText fixes the problem, even when the symbol is not in the font for the dialog box. So I guess it's an issue with the resource editor.
Do you have any idea why it's fine when used with SetDlgItemText but not with the resource editor?
Copyright symbol is a single byte character and doesn't make any problem. Also I can just copy and paste it without using the escaping you suggested.
You're right, the project doesn't support Unicode. But SetDlgItemText fixes the problem, even when the symbol is not in the font for the dialog box. So I guess it's an issue with the resource editor.
Do you have any idea why it's fine when used with SetDlgItemText but not with the resource editor?
Copyright symbol is a single byte character and doesn't make any problem. Also I can just copy and paste it without using the escaping you suggested.
I've said, check the code page set for the resource file.
The standard page is 1252 - English. I think, if you will set it in your project, it will work too.
Extended characters (from 128) are different for different code pages.
I do not use the resource editor for GUI. Maybe, only for small test applications.
Localization is a very long story. If you wish you can read everything yourself from the source documents:
MSDN. Developing International Software
http://msdn.microsoft.com/en-us/library/cc307362.aspx
The standard page is 1252 - English. I think, if you will set it in your project, it will work too.
Extended characters (from 128) are different for different code pages.
I do not use the resource editor for GUI. Maybe, only for small test applications.
Localization is a very long story. If you wish you can read everything yourself from the source documents:
MSDN. Developing International Software
http://msdn.microsoft.com/en-us/library/cc307362.aspx
ASKER
"¿"