-
October 19th, 2004, 08:23 AM
#1
UNICODE with CString...
Hello,
I want to insert unicode character in a CString object using Format method.
CString sBuf;
int iCar = 0xB2; <----------------------- I would like to set 0x03B2
sBuf.Format("Car is %c", iCar);
How can I do that ?
Thanks to all.
Phil
-
October 19th, 2004, 11:59 PM
#2
Re: UNICODE with CString...
-
October 20th, 2004, 12:25 AM
#3
Re: UNICODE with CString...
If your project is compiled with _UNICODE flag you can use:
Code:
CString sBuf;
sBuf.Format(_T("Car is %c"), 0x03B2);
otherwise
Code:
wchar_t buf[100];
swprintf(buf,L"Car is %c",0x03B2);
A.M.
My Latest Articles:
CCustomBitmapButton - An owner-draw button and a frame for the caption bar, in one class.
CCustomTabCtrl - A clone of the Excel tab sheet control.
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
|