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
27
votes
2 answers

How can I stop my application from receiving a certain "message"?

POSSIBLE SOLUTION FOUND! I believe I have found a solution! I will be continuing testing to make sure it DOES in fact work, but I'm hopeful :) I have detailed how I found the solution in EDIT THREE of the question! For anyone wishing to know the…
user1167662
  • 1,245
  • 3
  • 16
  • 25
16
votes
3 answers

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

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…
Leonardo
  • 1,452
  • 3
  • 15
  • 26
12
votes
4 answers

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…
Agnel Kurian
  • 57,975
  • 43
  • 146
  • 217
9
votes
2 answers

Does C# have an equivalent of Delphi's message keyword?

In delphi, I can create my own message like this, const MY_MESSAGE = WM_USER+100; procedure MyMessage(var Msg: TMessage); message MY_MESSAGE; procedure TForm1.MyMessage(var Msg: TMessage); begin .... end; bu in c# I can do that like this public…
Okan Kocyigit
  • 13,203
  • 18
  • 70
  • 129
9
votes
1 answer

Difference between messages with CN and WM prefixes

When looking at Delphi source code, I often see messages declarations from the Windows API, such as CN_NOTIFY and WM_NOTIFY. I would like to know the differences between them and when they should be used?
Felipe Morais
  • 155
  • 2
  • 12
9
votes
2 answers

Why do some windows not receive Windows messages

Using Spy++ tool on Visual Studio I can see that windows like the Desktop or Explorer(The File Explorer thing) receive WM_ messages, but windows like Firefox or Visual Studio do not receive messages. Why do some receive messages and others…
JackBarn
  • 635
  • 1
  • 6
  • 18
8
votes
1 answer

Intercept mouse click from other program

I’m trying to intercept mouse clicks from another program. I’m making a plugin for the program, that overlays a transparent form on the program and displays additional information. When I click on the transparent part of the form I can click on…
VincentC
  • 245
  • 4
  • 14
7
votes
5 answers

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

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…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
7
votes
4 answers

Where to find info about WM Windows Message codes?

I see here and there pro users answer lots of noobs like me questions with things like WM_PAINT = 0xf What should I search for to get complete list of this codes? are they all the same for all verions of windows? can they also used for other…
Dumbo
  • 13,555
  • 54
  • 184
  • 288
7
votes
1 answer

How can I make my console application receive window messages?

I need to write a message handler in my console application that handles received messages. For example, I register WM_Test and send it by to my console application like this: var H: THandle; begin H:= FindWindow('ConsoleWindowClass', nil); …
Mojtaba Tajik
  • 1,725
  • 16
  • 34
7
votes
3 answers

Capturing Win32 messages

Does anyone know a tool that can capture win32 messages that get sent to a particular process? I thought there was a tool from sysinternals for that but now I can't locate it. Anyone knows some?
Peter Krumins
  • 838
  • 1
  • 7
  • 24
7
votes
2 answers

Delphi - How do I send a windows message to TDataModule?

I need to send a windows message to a TDataModule in my Delphi 2010 app. I would like to use PostMessage(???.Handle, UM_LOG_ON_OFF, 0,0); Question: The TDataModule does not have a Handle. How can I send a windows message to it?
Charles Faiga
  • 11,665
  • 25
  • 102
  • 139
7
votes
2 answers

C# - Capturing Windows Messages from a specific application

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++…
Peter Bridger
  • 9,123
  • 14
  • 57
  • 89
7
votes
2 answers

WM_TOUCH vs WM_POINTER

Which one should I use? I'm only using Windows 8.x, so I don't care about the fact that WM_POINTER is not backwards compatible with Windows 7 etc. I also don't care about gestures; only about raw touches. WM_POINTER's only clear advantage seems to…
Display Name
  • 2,323
  • 1
  • 26
  • 45
7
votes
3 answers

c# customizing controls on a save dialog -- how to disable parent folder button?

I am working from the sample project here: http://www.codeproject.com/Articles/8086/Extending-the-save-file-dialog-class-in-NET I have hidden the address/location bar at the top and made other modifications but I can't for the life of me manage to…
Bryan
  • 623
  • 1
  • 6
  • 23
1
2 3
20 21