windows-messages

How do I catch certain events of a form from outside the form?

心不动则不痛 提交于 2019-11-30 17:00:09
问题 I'm working on something which will require monitoring of many forms. From outside the form, and without putting any code inside the form, I need to somehow capture events from these forms, most likely in the form of windows messages. But how would you capture windows messages from outside the class it's related to? My project has an object which wraps each form it is monitoring, and I presume this handling will go in this object. Essentially, when I create a form I want to monitor, I create

How does the message queue work in Win32?

白昼怎懂夜的黑 提交于 2019-11-30 15:11:19
I read some stuff on Win32 and how the message loop works, and there's something that is still unclear to me: What exactly is stored in the message queue? The integer value that corresponds to a message ( WM_COMMAND , WM_CREATE , etc) or a pointer to a MSG structure containing the message integer value and other stuff like wParam , lParam , etc? To answer your question narrowly, each message in the queue stores, at the least, a window handle to which the message is directed, the message code, wParam and lParam, as you already correctly noted, the time when the message was posted, that you

TService won’t process messages

十年热恋 提交于 2019-11-30 14:26:35
问题 I have created a windows service that uses Windows Messaging System. When I test the app from the debugger the Messages go through nicely but when I install it my messag … asked 14 mins ago vladimir 1tuga 回答1: Services don't generally receive window messages. They don't necessarily have window handles at all. Even if they do, they run in a separate desktop. Programs cannot send messages from one desktop to another, so a service can only receive messages from another service, or from a program

TService won’t process messages

核能气质少年 提交于 2019-11-30 10:36:32
I have created a windows service that uses Windows Messaging System. When I test the app from the debugger the Messages go through nicely but when I install it my messag … asked 14 mins ago vladimir 1tuga Services don't generally receive window messages. They don't necessarily have window handles at all. Even if they do, they run in a separate desktop. Programs cannot send messages from one desktop to another, so a service can only receive messages from another service, or from a program started by a service. Before Windows Vista, you could have configured your service to interact with the

C# - Capturing Windows Messages from a specific application

只谈情不闲聊 提交于 2019-11-30 07:26:14
I'm writing a C# application which needs to intercept Window Messages that another applications is sending out. The company who wrote the application I'm monitoring sent me some example code, however it's in C++ which I don't really know. In the C++ example code I've got they use the following code: UINT uMsg = RegisterWindowMessage(SHOCK_MESSAGE_BROADCAST); ON_REGISTERED_MESSAGE(WM_SHOCK_BROADCAST_MESSAGE, OnShockStatusMessage) LRESULT OnShockStatusMessage(WPARAM wParam, LPARAM lParam); As I understand it this retrieves an Id from Windows for the specific message we want to listen for. Then

C# - Capturing Windows Messages from a specific application

混江龙づ霸主 提交于 2019-11-29 09:35:29
问题 I'm writing a C# application which needs to intercept Window Messages that another applications is sending out. The company who wrote the application I'm monitoring sent me some example code, however it's in C++ which I don't really know. In the C++ example code I've got they use the following code: UINT uMsg = RegisterWindowMessage(SHOCK_MESSAGE_BROADCAST); ON_REGISTERED_MESSAGE(WM_SHOCK_BROADCAST_MESSAGE, OnShockStatusMessage) LRESULT OnShockStatusMessage(WPARAM wParam, LPARAM lParam); As I

How do I stop Windows from blocking the program during a window drag or menu button being held down?

筅森魡賤 提交于 2019-11-27 22:58:52
I am novice with Win32 , and I have been pursuing a problem (if it can be called a problem at all) with Windows blocking your program's flow during the event when a user grabs the window title bar and moves it around the screen. I have no legitimate reason to solve this problem, except that it bothers me. A few possibilities include removing the frame altogether, but it seems an inconvenient hack. Some games (single player) do not find this a problem at all. I have read however, that multiplayer games might experience problems when the program freezes as it expects continuous flow of