Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access the content of a general field
Message
From
09/12/1999 11:24:16
 
 
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
00294239
Message ID:
00301053
Views:
34
Hi,
We discussed this some time ago. I thought you might be interested for the solution: Query the OleBoundControl for the IDataObject interface and retrieve a handy clipboard format from the object, through IDataObject::GetData. I tested this against Word, Excel and Acad R14 servers and it worked on all cases. I get a metafile (from Word) or an enhanced metafile (from Excel and Acad) and I can use it to print (or whatever else) the content of the OleBoundControl. Unfortunatelly, I couldn't make the simpler Paintbrush server to do this, but I'm working on it :-)
Regards,
Remus

>>>>>Do you want to print the BMP through the VFP report writer or through the Windows API?
>>>>I want to print it through the Win32 API. But I cannot access the content of the genral field.
>>>
>>>Correct - by using a General field , you've given up direct access to the field content, relying instead on the services provided by the application handling the general field for VFP. If you want to access the content without relying on the server, you'd need to store the binary bitmap data in a memo field and extract it to a file for the API call to reference.
>>
>>100% accurate. But what if I want to ask the server to print the content of the general field instead of displaying it on the screen? The server application (paintbrush) certainly can do it, but how can I use this service? I thought that I can relly on the Object property of OleBound control, but the Object property is actually NULL...
>
>You'd have to tell the General field's server to use an available Print function through its implied call to ShellExecute(). Since there's no way I'm aware of to link to the General field through the API, you're stuck with using internal tools in VFP that know how to do this. If the data could be extracted from the General field, then the server's verb could be invoked through ShellExecute()/ShellExecuteEx(), but you've precluded this as a solution by using a General field.
>
>IOW, you can't get there from here.
Previous
Reply
Map
View

Click here to load this message in the networking platform