Re: Changing part program to display UNICODE strings
"pfArt" <pfArts@gmail.com> wrote in message
news:1173369655.708573.257640@p10g2000cwp.googlegroups.com
Strange enough it does'nt do the trick for me.
Not strange at all when your code doesn't match mine.
I did the following:
Definition class:
HFONT myFont;
Constructor:
newFont.lfHeight=26;
newFont.lfCharSet=CHINESEBIG5_CHARSET;
wcscpy(newFont.lfFaceName, L"Arial Unicode MS");
myFont = CreateFontIndirectW(&newFont);
So is it myFont or newFont?
HWND CreateStaticText(HINSTANCE hInst,int Left,int Top,int Width,int
Height,CString Msg)
Make that CStringW
{
HWND tmpHwnd;
tmpHwnd = CreateWindowEx(WS_EX_CLIENTEDGE, "STATIC",
Make that CreateWindowExW and L"Static"
(LPCTSTR)Msg,WS_CHILD | WS_VISIBLE
Remove the cast, which is unnecessary at best and wrong if UNICODE is not
defined.
,Left,Top,Width,Height, parentHwnd, NULL, hInst, NULL);
SendMessage(tmpHwnd,WM_SETFONT,(WPARAM)myFont,0);
Use SendMessageW
--
John Carson