Hi Paul,
>I also have a Pointers ActiveX control (downloadable from the UT's file section)that will "give" pointers to VFP.
I think I know it, tried it once, but never needed it.
>I just wanted to say that you cannot build the whole structure using only VFP if the structure contains pointers.
Depends on what kind of pointer you are talking here. If you are talking about function pointer, I agree. You need a few lines C code to do this. But if you're talking about simple pointers, I wonder why the following 100% VFP code works *g*:
Local lnHeap, lnDoc, lcStruct, lnHDC
If not Empty( lcPrinter )
lnHDC = CreateDC("WINSPOOL",lcPrinter,0,0)
lnHeap = HeapCreate(0, 8192, 8192)
lnDoc = HeapAlloc( lnHeap, 0, Len(tcDoc)+1 )
lstrcpy( lnDoc, tcDoc )
lcStruct = ToInt(12)+ToInt(lnDoc)+ToInt(0)
StartDoc( lnHDC, lcStruct )
StartPage( lnHDC )
toRTF.SelPrint( lnHDC )
EndPage( lnHDC )
EndDoc( lnHDC )
DeleteDC( lnHDC )
HeapFree(lnHeap, 0, lnDoc)
HeapDestroy(lnHeap)
Endif
That's only part of a larger function to print a RTF file. It's missing the declarations, as well as the function ToInt(), all of which are also pure VFP code.
OK, you turn. Why is it not possible?
>Yes, but this structure doesn't include pointers. Or wasn't it an example for this case?
It was just an example on how easy structures can be in VFP, and since I had this sample in my code library ready to post, I used it.
Christof
--
Christof