Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pickup _screen windowstate change?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00085679
Message ID:
00085995
Views:
34
>>However, it does still leaves open the problem. Unfortunately, it doesn't appear as if any of the events fire when the _SCREEN is resized. It would seem that the only way to handle the problem is to add a timer to the form.
>
>My understanding of the windows API is rather limited. I was thinking that if you could get the handle to the VFP main window, and pass that handle to a loaded FLL that could hook messages to that window, then you would theoretically have a way of capturing those resize events. The FLL could then simulate (or cause) a VFP event regarding this. Possible?

Perhaps. What would have to be done is to get the address of the WndProc() function using GetWindowLong(). You'd have to store this value and use SetWindowLong() to point to a new routine to handle message processing. This routine would have to trap the WM_SIZE message and pass it and other messages on to the original function. When WM_SIZE came through, it could then pass another message (WM_PAINT maybe) to the function. This could then be used by the window to re-position itself. The question is can this be done in an FLL, and, even if so, you'd have to guard against the library being inadvertly released.

I don't claim to be a C++ programmer, so the above is purely speculation based on the theory that I know.
George

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

Click here to load this message in the networking platform