2

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

Vitaly
  • 597
  • 1
  • 5
  • 12
  • There's no such thing as a Unicode code page anyway. And all resources are Unicode regardless of Visual Studio settings. Do you perhaps have a font issue? Not all fonts have all Unicode characters; in fact most have only a small fraction. – MSalters Nov 28 '11 at 12:44

1 Answers1

3

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.

Mihai Nita
  • 5,547
  • 27
  • 27