Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print Screen
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00164942
Message ID:
00171154
Views:
33
>>Hi Klas,
>>
>>If there is, I haven't found it. There's no reference to such in the SDK, so my reaction is that there isn't a way to do it without going through a number of API calls to get a device context, do a bit block transfer, and build the necessary structures to create a bitmap. Can it be done in pure VFP? Yes, but not as easily as the snippet above.
>
>George and Klas,
>
>I have a theory that you might want to try. If VFP is running, GetActiveWindow() returns the VFP main window. I haven't tried this, but GetWindow() might be able to return a handle to the active form -if- the active form were a real window (I don't think it is) and on top, and seen by Windows as a child window of VFP, by something like:
>
>DECLARE INTEGER GetActiveWindow IN WIN32API
>DECLARE INTEGER GetWindow IN WIN32API INTEGER HWND, INTEGER uCmd
>#DEFINE GW_CHILD 5 &&See WINUSER.H
>nHandleOfZOrderTop = GetWindow(GetActiveWindow(),GW_CHILD)
>
>You could try passing that to keybd_event() as an experiment.

Hi Ed,

Well, it'd be simpler to use the foxtools _WFindTitl() and _WhTohWnd() functions to retrieve the window handle, but then, how would you indicate that was the window to send to the clipboard? The bScan parameter? Hmm...might be worth a try. I'll post back later on this.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform