Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP listening to other app's messages
Message
From
25/09/2007 16:54:09
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01256698
Message ID:
01256793
Views:
22
This message has been marked as the solution to the initial question of the thread.
>I can get most of that stuff to work OK, at least the stuff I was experimenting with. What I can't get to work are some of the things I mentioned in the original post, like getting VFP to respond to WM_SIZE or WM_MOVE events that are caused by moving or resizing a non VFP window, such as notepad.
>
>I was reading up on the windows messaging system and I saw the following statement on MSDN:
>
>The system maintains a single system message queue and one thread-specific message queue for each graphical user interface (GUI) thread.
>
>At this point I can only suspect that some of the events I'm looking to trap are thread-specific instead of system specific, unless someone can tell me different.
>
>I appreciate your post, I didn't know about the task manager solution samples, that is very neat.

Hi Sean,

You can only bind to windows message for your own process. You can bind to any windows that created by VFP (your app) if you use 0 for the HWND. If you want to trap other app message event, you have to trap the process message queue (hook into the Window Procedure directly using Global-Hook). But this is not an easy task. I think it will be a lot easier if you just send/post messages between VFP app and the other one.

Regards
Herman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform