How to set a dialog code page in rc-file

712 Views Asked by At

I use VS 2010 and write in C++. How can i set a dialog codepage in a resource file (rc-file)?

I output a text through DrawText Win API function. I draw text right in a dialog (not in its child contols). I need to draw the "single right-pointing angle quotetion mark" symbol (code: U+203A). This is UNICODE character. My idea is to set UNICODE codepage to a dialog resource so DrawText can output it. If this solution will work how can i set UNICODE code page for a dialog resource? if this will not work what can i do to output this symbol in a dialog?

Should i change my project properties to use UNICODE charcterset (Configuration Properties -> General -> Character set) for these purposes?

Thanks

1

There are 1 best solutions below

0
On

Drawing on a dialog has nothing to do with setting the dialog to Unicode. You have to use use the Unicode version of DrawText. DrawText is just a macro that ends up as DrawTextW (Unicode) if UNICODE is defined, or as DrawTextA (non-Unicode version) if UNICODE is not defined.

So this means that you either call DrawTextW directly, or call DrawText but make sure you define UNICODE.