|
-
Aug 2nd, 2007, 11:24 AM
#1
Thread Starter
Frenzied Member
ActiveX with DrawTextW + UniCode Help...
Hello,
I'm testing out to create a UniCode aware simple label.
Now Im using the DrawAPIW API.
Call SetRect(R, 1, 1, UserControl.ScaleWidth / Screen.TwipsPerPixelX - 1, UserControl.ScaleHeight / Screen.TwipsPerPixelY + 1)
Call DrawTextW(UserControl.hDC, StrPtr(m_Caption), Len(m_Caption), R, tempAlight)
Ok it all works when I use the Forms .HDC to draw UniCode chars, but the problem is when i implement this in to an AcitveX and use the Usercontrol.Hdc.
Then i dont get the Unicode characters...
Any reasons for this?
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
Mar 17th, 2008, 01:08 PM
#2
Re: ActiveX with DrawTextW + UniCode Help...
1. Check your UserControl.Font. Try "Tahoma" in lieu of MS Sans Serif.
2. Make sure your Unicode string is OK. Try "CHS: " & ChrW$(&H6B22) & ChrW$(&H8FCE)
3. In DrawTextW you can set the Len to -1 and it will calculate automatically.
4. Make sure R is in Pixels.
4. Set UserControl.AutoRedraw=True unless you are using UserControl_Paint.
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
|