windows-messages

TService won’t process messages

Hi there, 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 ...

Looking for a program to view Windows messages

Hi I am looking for a program to view Windows messages Can you help? ...

PostMessage() on Vista64 behaves weird

The scenario is like Process A invokes certain function foo in Process B, that actually does a PostMessage() on Process C. Process A invokes the function foo when then there is a WM_KEYDOWN message. This works just fine on all 32 bit platforms, but on Vista 64 - when there is a single keydown a burst of events is generated and there a...

Delphi custom message handlers

When a user double-clicks a dbgrid, I show a non-modal form. When they close that form, I want to refresh the grid. To accomplish that, I have tried the following: 1 - Define a custom message constant: const WM_REFRESH_MSG = WM_USER + 1; //defined in a globally available unit 2 - In the OnClose event of my non-modal form, I have...

WM_POWERBROADCAST message not caught in MFC Dlg

I try to catch WM_POWERBROADCAST message when the system goes into sleep mode. I'm doing like : BOOL CPowManApp::PreTranslateMessage(MSG* pMsg) { if(pMsg->message == WM_POWERBROADCAST || pMsg->message == WM_POWER) { CString strMessage; strMessage.Format(_T("%d WM_POWERB%s wParam %x lParam %x"), ...

How to find plain character code of a key press?

I'm handling WM_CHAR in a MessageFilter written in C#. I need to interpret the key that was pressed along with whether the ctrl or alt keys were pressed at the same time. So far, I've got this: case WM_CHAR: { bool control = (Control.ModifierKeys & Keys.Control) != 0; bool alt = (Control.ModifierKeys & Keys.Alt) != 0...

Is a mouse click a WM_* message or a combination of up & down messages?

I'm used to working with a Windows framework that provides events for things like a mouse click or a mouse double click. Are click events a Windows construct (i.e. does Windows send a WM_DOUBLECLICK or similar message) or does it send WM_MOUSEDOWN and WM_MOUSEUP to applications which then do some math to decide if the event was a click ...

Windows messages serviced whilst assert dialog is being displayed?

I have an MFC application that spawns a number of different worker threads and is compiled with VS2003. When calling CTreeCtrl::GetItemState() I'm occasionally getting a debug assertion dialog popup. I'm assuming that this is because I've passed in a handle to an invalid item but this isn't my immediate concern. My concern is: From my ...

What's a good way to debug Windows message content and destination?

I'm working on an application that simulates a Windows mouse based on other behavior. One example is that pressing the + or - keys on the keyboard sends the WM_MOUSEWHEEL message to a target window with an appropriate delta. The problem is that in some situations I'm having a hard time replicating the messages that i think windows is s...

Get child window handles in C#

I'm starting a process in C# and then sending Windows messages to that process with SendMessage. Usually I send the messages to Process.MainWindowHandle, but in some instances I might need to find a child window handle and send messages there instead. How would I do that in C# and what are the options for finding child windows (i.e. do...

Windows API: What is the first message a window is guaranteed to receive?

I've been used to thinking that WM_CREATE is the first message a window receives. However, when testing this assumption on a top-level window, it turns out to be false. In my test, WM_MINMAXINFO turned up as the first message. So, what is the first message a window is guaranteed to receive? ...

Delphi SDI application - Not handling cascade/tile horizontal & tile vertically?

My application doesn't seem to receive or handle the same windows messages for the Cascade, Tile Horizontal/Tile Vertical on specific windows versions. Windows XP x32 - Not working Windows XP x64 - Not tested Windows Vista x32 - Not working Windows Vista x64 - Works fine?? Windows 7 x32 - Not tested Windows 7 x64 - Not ...

How might i do these IPC techinques?

I remember back in the day while using C and win32 i had a number of IPC techniques. So far i haven't ran into any of them in .NET or seen them outside of C so i thought i ask how might i do these inter-process communication techniques? Shared/Global memory. Simply allocate ram that can be change by another process without any signal. ...

Completely halt application when showing a "you have crashed, we are sorry ..." popup

If my application crashes, I intercept the crash (using the function SetUnhandledExceptionFilter). In my crash handler, I create a mini dump file, and notify the user that his application has crashed. This notification is done via a MessageBox with the flag MB_TASKMODAL so the rest of the application is blocked. Unfortunately, that do...

Not receiving WM_PAINT message when returning from Security Screen (Ctrl+Alt+Del) in Windows7

I need to detect the closing of the security screen, this is the full screen that appears when a user presses Ctrl+Alt+Del under windows. In Xp my application receives an wm_paint message when this screen is closed but under windows 7, a message is not always received, maybe only 25% of the time. I tried catching the the WM_WTSSESSION...

Is there a windows message that I can hook for when an application starts?

I want to know whenever any application starts. Is there a windows message that I can set a hook for to know exactly when that happens? ...

How to send keypresses to a DirectX application?

I need to write a program in any programming language (preferably Delphi 7 / Delphi 10 / C#) that emulates pressing 1 every 10 seconds to a given process in Windows XP or Windows 7. Sending Windows messages, which worked for all the other applications I have tried, didn't work for this particular one and I am suspecting it is because it ...

Intercepting Dialog Window Activate message by Owner Window

Hi, we are using c# NativeWindow and overriding WndProc method to intercept the widow messages. Is it possible for a owner window(NativeWindow) to know when its child window(dialog window) gets activated when user presses alt+tab or click on the window in task ...

How can I learn a multitouch screen's communication protocol and write a C# application for it?

I have got a monitor with multitouch overlay on top of it. It works fine with Windows 7 but I want to write a multitouch application in C# for Windows XP which doesn't support touch feature out of the box. There is no documentation whatsoever and I emailed the manufacturer but never got a reply. However the device works with Google Ear...

EM_GETLINE fails when Spy++ is running

There is an edit box in some dialog in my application, which is running on Windows XP. When I issue EM_GETLINE on this control, it returns its contents and it's ok, but when I start Spy++ the control suddenly starts behaving incorreclty and always returns an empty string. What might be a problem? ...