Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to obtain the device context in a report???
Message
From
13/05/2005 12:09:55
 
 
To
13/05/2005 10:22:48
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01013847
Message ID:
01013916
Views:
15
Hello,

i've done some research, that's what i've found so far ..

the ListenerObject has a native property called "GDIPlusGraphics" which is a handle to the GDI Graphics object .. you can pass this handle to the following functions from Gdiplus.dll
declare integer GdipGetDC in gdiplus.dll ;
	integer, integer @
declare integer GdipReleaseDC in gdiplus.dll ;
	integer, integer


FUNCTION yourListener.Render(...)

LOCAL lnRet, lnHdc
lnHdc = 0
lnRet = GdipGetDC(THIS.GDIPlusGraphics,@lnHdc)
IF lnRet != 0
? handle error ...
ENDIF

&& do your drawing stuff here

&& you have to release the hDC aftewards, otherwise GDIPlus will not be able & to function properly ..
GdipReleaseDC(THIS.GDIPlusGraphics,lnHdc)

&& call DODEFAULT ... 

ENFUNC
Regards
Christian
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform