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

Changing the background color of another application

Back in the days of 16-bit applications I worked for a company which was running an ERP system that had little in the way of display customization. Sometimes users would switch into the Test environment to do something (which looked exactly the…
Wayne Ivory
  • 321
  • 2
  • 8
0
votes
2 answers

Sending Messages from cmd to winform application

I have an applicaion in Winform and this application is launched from cmd. I want to launch my winform application once and like to send messages to winform application. Also, when I like to close my winform application from cmd. I have written the…
Harsha
  • 1,861
  • 7
  • 28
  • 56
0
votes
1 answer

How to determine the meaning represented by the WParam and Laram attributes in the Message class in C#

In the following class, the attributes of WParam and LParam are IntPtr type, but I do not know the meaning they represent. I found them in the definition of C++. It is rather troublesome. Is there a way to know the above two attributes quickly? …
cnxy
  • 11
  • 3
0
votes
1 answer

What window messages are triggered when window comes to foreground?

What windows messages are triggered (wm_xyz) when an application window goes from background to foreground (or from invisible/minimized to visible/maximised)?
GeorgeU
  • 7,819
  • 8
  • 26
  • 38
0
votes
0 answers

Undocumented webBrowser message WM_USER+780 (0x070C)

is there anyone who knows if and where the messages WM_USER+780 (0x070C) and WM_USER+768 (0x0700) are documented? These messages are dispatched to the webBrowser (mshtml.dll): 0x070C is sent when the readyState of HTML document is…
Neil
  • 19
  • 1
0
votes
1 answer

C# Disable click/doubleClick or any WindowsMessage

My goal is to disable all DoubleClick() events in my application. Just simply unsubscribing from those events is not possbile, because those are external custom controls. So I am aiming for disabling either the DoubleClick() for those controls or my…
L. Guthardt
  • 1,990
  • 6
  • 22
  • 44
0
votes
2 answers

What value should a dialog procedure return on WM_NOTIFY if a particular notification is not processed?

My dialog procedure: INT_PTR CALLBACK DlgProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam) { INT_PTR result = TRUE; switch(iMessage) { case WM_NOTIFY: switch (((LPNMHDR)lParam)->idFrom) { case…
Bart
  • 547
  • 3
  • 16
0
votes
1 answer

How can I send WM_DROPFILES from C#?

I want to use C# code to simulate a user dragging and dropping a file onto a control in a separate process. As a stepping stone to this goal, I am trying to send a WM_DROPFILES message to my own TextBox and verifying that the DragDrop event is…
Ben
  • 1,272
  • 13
  • 28
0
votes
1 answer

Disabling desktop composition causes flickering on Tab Control

When i disable desktop composition i get flickering/blinking whenever i hover the mouse over the tabs. This only happens when desktop composition is disabled. I have tried to cancel WM_ERASEBKGND message but it doesn't fix the problem. What is the…
RCECoder
  • 247
  • 1
  • 5
  • 15
0
votes
0 answers

SendMessageTimeout with BM_CLICK never return

I'm trying to send BM_CLICK to a window in another process. When the target button get clicked, the target window pops up a modal dialog, then my calling thread never return even I send the timeout to 1 second. SendMessageTimeout(handle, BM_CLICK,…
user1633272
  • 2,007
  • 5
  • 25
  • 48
0
votes
0 answers

Forwarding MouseEvents from one WPF application to another

I would like to simulate Mouseevents in one WPF application by forwarding them from another windows application. Here is what I tried so far: Overriding WndProc in a Windows Forms NativeWindow to get the Mouse Messages. …
oleole
  • 207
  • 2
  • 10
0
votes
1 answer

Windows Messaging - trapping calls originating from another API

Scenario: We're busy wrapping up a 3rd party's C++ SDK as a DLL to make it simpler for other developers in our organisation to integrate this functionality into their own apps (be it, .net, delphi, etc) The underlying system sends Windows messages…
bunn_online
  • 742
  • 1
  • 6
  • 11
0
votes
1 answer

Receive and Handle Windows Messages in Lazarus

I'm trying to port a class I've written in Delphi to Lazarus. It relies on WM_DEVICECHANGE to detect attached USB devices. I can't get my component to receive Windows messages, while it was working perfectly in Delphi. After realizing that…
Delphi.Boy
  • 1,199
  • 4
  • 17
  • 38
0
votes
1 answer

Manipulate Dragged files from WinForm Application

wan't to write a outlook add-in which manipulate the email message when the user want to save the file local on the desk via drag and drop. At the moment I'm not able to get the MouseDown event of the window. Is there an specific Windows Message…
AppVault
  • 65
  • 7
0
votes
1 answer

How to get TGUID from the GUID_POWERSCHEME_PERSONALITY setting?

I've been working on wrapping the full WM_POWERBROADCAST Windows Message, and encapsulating it inside of an event driven component. A majority of it is working fine, and I have also further captured all of the PBT_POWERSETTINGCHANGE setting GUID's -…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327