Questions tagged [windows-messages]

Questions about various messages in a Windows system.

Windows is an event driven operating system basically only responding to messages.

Message-identifier values are used as follows:

  • The system reserves message-identifier values in the range 0x0000 through 0x03FF (the value of WM_USER – 1) for system-defined messages. Applications cannot use these values for private messages.

  • Values in the range 0x0400 (the value of WM_USER) through 0x7FFF are available for message identifiers for private window classes.

  • If your application is marked version 4.0, you can use message-identifier values in the range 0x8000 (WM_APP) through 0xBFFF for private messages.

  • The system returns a message identifier in the range 0xC000 through 0xFFFF when an application calls the RegisterWindowMessage function to register a message. The message identifier returned by this function is guaranteed to be unique throughout the system. Use of this function prevents conflicts that can arise if other applications use the same message identifier for different purposes.

312 questions
0
votes
1 answer

Keystrokes sending incorrect identifier in Win32

So I am working on making a calculator with a GUI for a class project and I am currently working on setting up my input detection so I can filter out what keystokes I want to be included in user input and which I want to exclude. I have been…
user3010974
  • 61
  • 1
  • 6
0
votes
2 answers

tool for monitoring the windows messages used by an external application

i am looking a tool for monitoring the windows messages fired by an external application in real-time. some time ago i used winsight32 (tool that ships with Delphi), but is very memory expensive and freeze my laptop. (source: blong.com)
Salvador
  • 16,132
  • 33
  • 143
  • 245
0
votes
1 answer

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…
alemjerus
  • 8,023
  • 3
  • 32
  • 40
0
votes
2 answers

Distinguish between user generated and my own application generated mouse moves

My WinForms app moves the mouse cursor about the form simply by setting the Cursor.Position property in some kind of a loop with a timer. I would like this movement to continue only till the user does not wield the mouse himself to move it. As soon…
Water Cooler v2
  • 32,724
  • 54
  • 166
  • 336
0
votes
1 answer

Who sent/posted the WM_MOUSEMOVE?

When using the Win32 API message loop (or any higher level abstraction of the same such as System.Windows.Forms.IMessageFilter) to get a message, how do I find out who/which control/which component/which piece of code posted the WM_MOUSEMOVE? Does…
Water Cooler v2
  • 32,724
  • 54
  • 166
  • 336
0
votes
1 answer

How I could properly set the return value of a Windows Message by calling a method and passing the return value?

I'm trying to customize the way that I process the wndproc messages. In a class I have a simple wndproc overrided sub and when a KNOWN message is processed then I raise an event with that message information, this is how I'm handling the…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
0
votes
1 answer

Debugging Window Message handling in Delphi

I have an application that handles the the CM_DIALOGKEY message on it's main form. procedure CMDialogKey(var Message: TCMDialogKey); message CM_DIALOGKEY; This worked up until some point recently, but I can't figure out at what point something was…
Steve
  • 6,382
  • 3
  • 41
  • 66
0
votes
1 answer

Crash after creating child button window inside custom control

I have an MFC Application that show a simple dialog containing a custom control the custom create dynamic control windows. after the first child of the custom control is created the application crash after a stack overflow this is the call stack…
ahmedsafan86
  • 1,776
  • 1
  • 26
  • 49
0
votes
2 answers

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…
Patrick
  • 23,217
  • 12
  • 67
  • 130
0
votes
2 answers

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…
user34537
0
votes
0 answers

Getting a message when a child control receives focus

I have a control that contains another control inside. The inner control sometimes snatches focus from other controls and I need to place a watch on this and change focus back. I'm subclassing the out control (can't subclass the inner one), and I'm…
user884248
  • 2,134
  • 3
  • 32
  • 57
0
votes
2 answers

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…
James
  • 80,725
  • 18
  • 167
  • 237
0
votes
1 answer

Missing WM_WINDOWPOSCHANGING in VS 2012 MFC dialog

I'm trying to implement This Article But when I look at all the messages my dialog "has" in the resource view (in messages tab) I don't see this message. Any idea how to catch it (is it available ? is it an IDE problem ?) Thanks, Dani
Dani
  • 14,639
  • 11
  • 62
  • 110
0
votes
1 answer

Using WndProc override to detect when USB attached or detached

This question got me to where I am now The name 'WM_DEVICECHANGE' does not exist in the current context but I am having an issue detecting the proper messages when they happen, and I am not sure if the message codes I am using wrong or if I made a…
user1448018
0
votes
1 answer

Controls not receiving messages after parent change

In my application there are a lots of dialogs being opened and closed all the time. The dialogs are non-modal. In order to save some performace, we are "recycling" some of the more complicated controls. When one dialog is closed, the controls are…
Bojan Hrnkas
  • 1,587
  • 16
  • 22