Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fance Form
Message
 
To
24/08/1999 18:22:10
J Chris Powell
Myers and Stauffer Lc
Kansas, United States
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Title:
Miscellaneous
Thread ID:
00211975
Message ID:
00257429
Views:
32
>Thanks, that was very helpful. My form now runs error free, but I dont get a polygon yet, so I'm missing something. This API stuff is pretty new to me.<g> What I've ended up with is a call to each function, as in the KB article. Any more pointers?
>
>...
>lnwhandle = _WFindTitl(This.Caption)
>lnhDC = _WhToHWnd(lnwhandle)
>llresult = Polygon(lnhDC, @Points, 3)
>PGRgn = CreatePolygonRgn(@Points, 3, 1)
>Brush = GetStockObject(4)
>FillRgn(lnhDC, PGRgn, Brush)
>*SetWindowRgn(lnhDC, PGRgn, 1)
>Deleteobject(Brush)
>RETURN

Hi Chris,

It looks like you're missing a step in the above. Try this instead, the changes are in bold
lnwhandle = _WFindTitl(This.Caption)
<b>lnhWnd</b> = _WhToHWnd(lnwhandle)
<b>lnhDC = GetDC(lnhWnd)</b>
llresult = Polygon(lnhDC, @Points, 3)
PGRgn = CreatePolygonRgn(@Points, 3, 1)
Brush = GetStockObject(4)
FillRgn(lnhDC, PGRgn, Brush)
*SetWindowRgn(lnhDC, PGRgn, 1)
Deleteobject(Brush)
RETURN
The declaration for GetDC is:
GetDC in Win32API INTEGER hWnd
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform