|
-
December 11th, 2008, 09:37 AM
#6
Re: using handles to get RichEdit text
You may want to change the method that you are using to declare your txt variable. You are mixing the TCHAR support (a Microsoft invention which allows building applications which support multiple character set widths) with a direct literal wide string.
You used the following to declare txt:
TCHAR is substituted with either wchar_t or char (depending on what the character set option is for the project). The right side (L"") requests an empty wide string (each character is a wchar_t).
Since this compiles, your character set must be set to Unicode. If you set your character set to Multi-Byte, this would produce a compile error.
If you need to support building the source using both settings, then the following could be used:
Code:
#include <tchar.h>
TCHAR txt[32]=_T("");
If you are only going to build the source with one setting for character set, then the following would work for unicode:
Code:
wchar_t txt[32]=L"";
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|