F
fantavir
Hi.
I'm developing an application for pocket PC using VB .NET.
I can draw polygons using this API:
Private Declare Function Polygon Lib "Coredll" (ByVal hdc As Integer,
ByVal lpPoint() As POINTAPI, ByVal nCount As Integer) As Integer
and calling
Polygon(hdc, Points, UBound(Points)+1)
Now I want to draw colored and rotated text.
In VB6 I can use SetTextColor, CreateFontIndirect, TextOut
I tried this declaration:
Private Declare Function ExtTextOut Lib "Coredll" Alias "ExtTextOutA"
(ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer, ByVal
wOptions As Integer, ByVal lpRect As System.IntPtr, ByVal lpString() As
Byte, ByVal nCount As Integer, ByVal lpDx As System.IntPtr) As Integer
or
Private Declare Function DrawText Lib "Coredll" Alias "DrawTextA"
(ByVal hdc As Integer, ByVal lpStr() As Byte, ByVal nCount As Integer,
ByVal lpRect As RECT, ByVal wFormat As Integer) As Integer
but it doesn't work (NotSupportedException).
What are the right declarations for SetTextColor, CreateFontIndirect,
TextOut?
Thanks.
Francesco.
I'm developing an application for pocket PC using VB .NET.
I can draw polygons using this API:
Private Declare Function Polygon Lib "Coredll" (ByVal hdc As Integer,
ByVal lpPoint() As POINTAPI, ByVal nCount As Integer) As Integer
and calling
Polygon(hdc, Points, UBound(Points)+1)
Now I want to draw colored and rotated text.
In VB6 I can use SetTextColor, CreateFontIndirect, TextOut
I tried this declaration:
Private Declare Function ExtTextOut Lib "Coredll" Alias "ExtTextOutA"
(ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer, ByVal
wOptions As Integer, ByVal lpRect As System.IntPtr, ByVal lpString() As
Byte, ByVal nCount As Integer, ByVal lpDx As System.IntPtr) As Integer
or
Private Declare Function DrawText Lib "Coredll" Alias "DrawTextA"
(ByVal hdc As Integer, ByVal lpStr() As Byte, ByVal nCount As Integer,
ByVal lpRect As RECT, ByVal wFormat As Integer) As Integer
but it doesn't work (NotSupportedException).
What are the right declarations for SetTextColor, CreateFontIndirect,
TextOut?
Thanks.
Francesco.