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
4
votes
3 answers

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…
James Cadd
  • 12,136
  • 30
  • 85
  • 134
4
votes
4 answers

How can a control receive mouse events after the mouse is dragged beyond its borders?

I'm creating a custom control which recognizes when the mouse is dragging, specifically using messages WM_LBUTTONDOWN, WM_LBUTTONUP, and WM_MOUSEMOVE. When the mouse goes down, I capture the position on the control, and then when the mouse moves, if…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
4
votes
2 answers

Intercepting hint event on delphi

I am trying to change hint text temporarily at a run-time inside of a component, without changing the Hint property itself. I've tried catching CM_SHOWHINT, but this event seems to only come to form, but not the component itself. Inserting…
ertx
  • 1,494
  • 2
  • 15
  • 21
4
votes
2 answers

Parent window not receiving window's messages (Key Events)

I have a GUI application that is written using win API's and we need to launch a new GUI application when the user selects some command menu items. We decided to write the new application in PyQt and launch the PyQt application usig Python C…
Maverick
  • 366
  • 1
  • 5
  • 11
4
votes
1 answer

How to recognize when number, position, or resolution of monitors has changed?

I'm building something which needs to detect when things change with the monitor configuration. This includes Monitor added/removed, Monitor position moved (compared to main screen), or when Monitor resolution has changed. The most ideal way would…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
3
votes
2 answers

Window Message Notification - Language and Locale

I want to find out what win message is / are sent when we change the locale settings, Date Time and Language in particular. I know when window Theme is changed we receive WM_THEMECHANGED.
WPF-it
  • 19,625
  • 8
  • 55
  • 71
3
votes
2 answers

Looking for a program to view Windows messages

I am looking for a program to view Windows messages Can you help?
Charles Faiga
  • 11,665
  • 25
  • 102
  • 139
3
votes
1 answer

How Do I Find The Location A Message Was Sent From in Delphi?

I have a third party tree package (ElXTree by LMD Innovative) that I am using as a grid in my program. Whenever I select a cell, that row gains focus and becomes highlighted, just as I want it. When I invoke the supplied Inplace editor by clicking…
lkessler
  • 19,819
  • 36
  • 132
  • 203
3
votes
1 answer

Get 30th bit of the lParam param in WM_KEYDOWN message

I need to get the 30th bit of the lParam param passed with the WM_KEYDOWN message. This bit as written here allows me to know if the key was pressed before. Is this code right to get it? (lParam >> 30) & 1
Stefano
  • 3,213
  • 9
  • 60
  • 101
3
votes
1 answer

WM_POWERBROADCAST not received by message-only window in Windows XP

I'm trying to find out whether broadcast messages will be sent to message only windows, i.e. created as: hWnd = CreateWindow(MAKEINTATOM(RegisterClass(&wnd)), NULL, 0, 0, 0, 0, 0, 0, HWND_MESSAGE, hInstance, 0); Thing is that I don't get any…
Robert
  • 2,330
  • 29
  • 47
3
votes
2 answers

Subscribing to windows messages through unmanaged c++ dll from c# net core

I am trying to subscribe to windows message events/messaging system from c# net core through unamanged c++ dll using pinvoke. Issues I am having. Getting the handle for my process or creating an empty window (does .net even support that). var hwnd…
Aistis Taraskevicius
  • 781
  • 2
  • 10
  • 31
3
votes
3 answers

How to avoid WM_APP

I am writing a CFrameWnd wrapper and I have this line in the header file : #define WM_CFW_MESSAGE (WM_APP + 100) Is this is a good practice ? Does it require that users of this wrapper will have to remember not to use this particular…
Wartin
  • 1,965
  • 5
  • 25
  • 40
3
votes
0 answers

Windows UI execute detect is possible?

start menu's item can be executed single-click, explorer's item can be executed double-click or right-click and (O)pen. like this, Windows UI is many execution method. I want to know execution through UI(like item double-click). How to know that? I…
3
votes
3 answers

Using WM_SHOWWINDOW to Show a Window instead of ShowWindow()

I’m trying to use the SendMessage function of a hotkey utility (or NirCMD, etc.) to get a hidden window to pop up. I can for example get windows to close by sending 0x0010 (WM_CLOSE), but when I try sending 0x0018 (WM_SHOWWINDOW) with a wParam of 1…
Synetech
  • 9,643
  • 9
  • 64
  • 96
3
votes
1 answer

Handling WM_GETMINMAXINFO for multiple monitors

The docs for the ptMaxSize and ptMaxPosition components of MINMAXINFO say: For top-level windows, this value is based on (...) the primary monitor. Raymond Chen elaborates: If the specified size is greater than or equal to the size of the primary…
moonshadow
  • 86,889
  • 7
  • 82
  • 122