Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 platforms?

like image 855
Saeid Yazdani Avatar asked Dec 16 '11 15:12

Saeid Yazdani


People also ask

What is Windows messages?

The operating system communicates with your application window by passing messages to it. A message is simply a numeric code that designates a particular event. For example, if the user presses the left mouse button, the window receives a message that has the following message code.

What is Message loop in Windows programming?

The message loop is an obligatory section of code in every program that uses a graphical user interface under Microsoft Windows. Windows programs that have a GUI are event-driven. Windows maintains an individual message queue for each thread that has created a window. Usually only the first thread creates windows.

What is WM_ user?

Windows defines a constant, WM_USER, to represent the value at which you can start defining your own messages. Windows reserves all messages from 0 to WM_USER -1 for its own use. However, you can define any messages you like. between the values of WM_USER and WM_USER+0x7FFF.


2 Answers

Is this table of any help?

I'm not sure whether all Windows versions send all these message, but I'm pretty sure the codes aren't different between versions.

like image 151
Zruty Avatar answered Oct 01 '22 15:10

Zruty


WM_PAINT = 0xf is a specific parameter for a certain method. those "codes" are usually needed with interlop stuff; using unmanaged core libraries such as user32 and kernel32.

You can find methods and their parameters like that on the site http://pinvoke.net.

For example, your example WM_PAINT is from User32.GetMessage

If you want a full list of specific WindowsMessage parameters; they can be found here.

like image 33
Ron Sijm Avatar answered Oct 01 '22 14:10

Ron Sijm