Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to obtain the device context in a report???
Message
De
13/05/2005 12:09:55
 
 
À
13/05/2005 10:22:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01013847
Message ID:
01013916
Vues:
16
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform