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

Trouble with various input API's (RAWINPUT, WINAPI)

Background: I have been using WM_MOUSEMOVE and WM_KEYDOWN/WM_KEYUP messages for mouse and keyboard input respectively throughout most of my time developing using the Windows API. However I have recently begun to implement an input class that handles…
0
votes
1 answer

Getting QWidget's Windows messages without subclassing it and reimplementing QWidget::winEvent

Is it possible to intercept QWidget's Win messages without reimplementing QWidget::winEvent? Is there something like installEventFilter but for Windows native messages?
Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
0
votes
2 answers

Windows Messages Privileges

what are the windows messages privileges? In the Application 1, I posted a message to Application 2: PostMessage(handle, WM_LOCAL, 0, Integer(Lst)); In the Application 2, The Message Implementation: var l: TStringList; begin ShowMessage('got…
EProgrammerNotFound
  • 2,403
  • 4
  • 28
  • 59
0
votes
2 answers

how to make FindText dialog put its messages onto main loop?

I have registered FINDMSGSTRINGW but it doesn't show on the main loop: #include #include int main() { using namespace std; UINT uFindReplaceMsg = RegisterWindowMessageW(FINDMSGSTRINGW); WCHAR szFindWhat[MAX_PATH] = {0};…
rsk82
  • 28,217
  • 50
  • 150
  • 240
0
votes
1 answer

Adding a button to form prevents WM_KEYDOWN messages from being sent

The following code works and will print to Label1 when the user presses the a key on the keyboard: Public Class Form1 Sub New() InitializeComponent() End Sub Public Declare Function PostMessage Lib "user32.dll" Alias "PostMessageA" (ByVal…
0
votes
0 answers

Handling WM messages to child

I am developing a Windows Form which contains a ListBox. Another application, running in the background sends WM_HSCROLL to the current active application which is the one i am working on. The listbox inside form is capable of receiving these…
sardok
  • 1,086
  • 1
  • 10
  • 19
0
votes
3 answers

VB.NET Send Tab key to another application window

I want to send "{TAB}" Key to another application window(send the key to the window not to textbox). I tried: SendMessage(hWnd, WM_SETHOTKEY, VK_TAB, 0) Nothing happened. my goal is: send tab key to my application Or other application when the…
Nmmmm
  • 187
  • 1
  • 2
  • 7
0
votes
1 answer

WH_MOUSE_LL hook, avoid getting useless WM_MOUSEMOVE events

Is there a way, even a dirty hack, to avoid receiving WM_MOUSEMOVE events in a WH_MOUSE_LL hook? I'm interested only in wheel rotations and buttons. The performance cost of receiving WM_MOUSEMOVE is unnacceptable in my scenario. I cannot use…
Lorenzo Pistone
  • 5,028
  • 3
  • 34
  • 65
0
votes
0 answers

Windows Proc "Unavailable" for processes spawned by service

I'm attempting to use psexec to spawn a process on a remote machine (for automated testing purposes) and noticed that the spawned process wasn't correctly responding to a message (WM_GETOBJECT, but that's another question entirely). I opened spy++…
Patrick Quirk
  • 23,334
  • 2
  • 57
  • 88
0
votes
0 answers

Sending WM messages to web browser input

I have here a web browser (OpenWebKitSharp) that goes to a chat room. I'm writing a bot that's very similar to an IRC bot. However, the input field has no submit form or button. Text is only sent by pressing enter, and the Javascript is extremely…
user1620777
0
votes
2 answers

Keep rendering a 3D window during modal dialogs/opening main menu?

(I use Ogre3D for the rendering but the question should be generic.) The problem: most 3D aplications use a cycle which iterates rendering a frame and checking for messages and processing them. However if a dialog is opened (MessageBox or similar),…
Cray
  • 2,396
  • 19
  • 29
0
votes
1 answer

WM_COMMAND not passed to main window

I would like to place an edit control (WC_EDIT) on a static control (WC_STATIC). Unfortunately, when I do that I don't receive any WM_COMMAND messages from the edit control in the windows callback function. Is it somehow possible to tell the static…
user667967
  • 628
  • 1
  • 8
  • 20
-1
votes
0 answers

WM_PAINT not triggered on runtime created component

I created a simple little unit that gives the basic TEdit component the ability to display a colorizable border. Essentially, it is: type TEdit = class(StdCtrls.TEdit) private FBorderColor: TColor; FUseCustomColor: boolean; procedure…
Needback
  • 15
  • 2
-1
votes
2 answers

How does the lParam parameter within NMLISTVIEW get set?

According to https://learn.microsoft.com/en-us/windows/win32/api/commctrl/ns-commctrl-nmlistview lParam is of Type: LPARAM and is a Application-defined value of the item. This member is undefined for notification messages that do not use it. It does…
Peter Nimmo
  • 1,045
  • 2
  • 12
  • 25
-1
votes
2 answers

How to associate Window Procedure to my existing dialog window

I had a Windows dialog-based project, which is auto-generated by VS 2013. Now I want to add code to detect usb device insert. I read code sample refer 1. It's a Window Procedure can handle message. I also know I had to associate this WinProc to a…
Wason
  • 1,341
  • 1
  • 13
  • 26
1 2 3
20
21