>>>I have a VFP application that draws graphics in a window, and I need to print the window. The method that I employ to print the window must be something I can distribute with my application, so perhaps an OCX would be acceptable, but I assume the best way to do it is thru the Win32API. I would appreciate it if anyone could show me VFP source code which could be used to print the current VFP window.
>>
>>Normally I use OCX, but FindWindow function will return VFP screen/window handler which you could use for subsequent API print calls.
>>cVfpname=_screen.caption
>>DECLARE FindWindow in win32api INTEGER,STRING
>>nHandler=FindWindow(0,cVfpname)
>>****
>>CLEAR DLLS
>I understand that FindWindow() will return a Window Handle, but what I don't know is how to print it after I have the handle. Any help would be appreciated.
I don't know exactly what API function could print a window. I used to print image using OCX and add labels,rectangles,etc. using TextOut,Rectangle,SelectObject,CreateFont,etc. functions. Check Win32Api help, maybe you will find something.
Edward Pikman
Independent Consultant