Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dlls and Reportpreviewer
Message
De
11/08/2008 07:48:14
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01337987
Message ID:
01337991
Vues:
10
Thanks Sergey, that's sorted it.

Jon

>Hi Jon,
>
>You hit a VFP bug. When Windows API function is declared w/o alias VFP releases any previous declarations with an alias.
>You can use a trick from GdiPlusX. Comment out DECLARE and create following function. If GS_SplitReleaseDC is not declared yet, the function will be called. Otherwise the function in DLL will be called.
>
>FUNCTION GS_SplitReleaseDC(hWnd, HDC)
>DECLARE Long ReleaseDC IN WIN32API AS GS_SplitReleaseDC Long hWnd, Long HDC
>RETURN GS_SplitReleaseDC(m.hWnd, m.HDC)
>
>>
>>Can anyone shed any light on this for me?
>>
>>This is declared in the toolbar:
>>declare integer ReleaseDC in WIN32API as GS_SplitReleaseDC integer hWnd, integer HDC
>>? GS_SplitReleaseDC(0,-12345) && this is garbage but returns a result of 0.
>>
>>then:
>>_REPORTPREVIEW = ("c:\products\ppwin\dev9\ReportPreview.app")
>>EXTERNAL CLASS frxPreview.vcx
>>NewForm = NEWOBJECT([frxpreviewForm],[frxPreview],_REPORTPREVIEW)
>>loRef = NULL
>>DO (_REPORTPREVIEW) WITH loRef
>>repORT form "C:\Tmp\frx2any\Samples\VFP 9\VFP 9 Reports\usingchartenginewithvfp9.frx" preview
>>
>>If I try to call the following I get an error saying GS_SplitReleaseDC doesnt exist:
>>? GS_SplitReleaseDC(0,-12345) && now errors
>>
>>I have looked inside the ReportPreviewer project and I can see that it also declares ReleaseDC.
>>
>>Currently the only way I can see around this is to re-declare ReleaseDC after the previewer has finished, is there a better way to do this?
>>
>>Thanks
>>
>>Jon
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform