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
1
vote
3 answers

How can I learn a multitouch screen's communication protocol and write a C# application for it?

I have got a monitor with multitouch overlay on top of it. It works fine with Windows 7 but I want to write a multitouch application in C# for Windows XP which doesn't support touch feature out of the box. There is no documentation whatsoever and I…
puri
  • 807
  • 1
  • 11
  • 25
1
vote
2 answers

Sending WM_DROPFILES with C++ and WinAPI to third-party application

So I've desperately been trying to automate drag and drop functionality, and have narrowed my search for solutions down to a fairly refined chunk of code: // DragAndDrop.cpp : Defines the entry point for the console application. // #include…
araisbec
  • 1,223
  • 3
  • 16
  • 27
1
vote
1 answer

How to handle KeyBoard input messages on non-windowed objects?

I read here about how to create a Window Handle into a non-windowed conrol. I did just the way I read, but nothing happens. So I come to you guys. My class is this way right now: interface type TMyObject = class private …
Guill
  • 350
  • 5
  • 17
1
vote
1 answer

If I clicked a button in SSMS, how to track what Windows messages were sent to it?

I want to do some automation with SQL Server management studio and need to track what Windows messages were sent to it when I click the "Execute" button. Basically what I want to do is: When the user press the "Execute" button or press F5,…
user133580
  • 1,479
  • 1
  • 19
  • 28
1
vote
3 answers

How to send keypresses to a DirectX application?

I need to write a program in any programming language (preferably Delphi 7 / Delphi 10 / C#) that emulates pressing 1 every 10 seconds to a given process in Windows XP or Windows 7. Sending Windows messages, which worked for all the other…
Tom
  • 6,991
  • 13
  • 60
  • 78
1
vote
1 answer

How to detect Windows suspend message?

Does somebody know how to detect a Windows suspend message by C/C++ code? Or, does SetWindowsHookEx() function do this? Does somebody have these code for me? I want to detect this message.
Tody Kwok
  • 185
  • 2
  • 12
1
vote
1 answer

Not receiving WM_PAINT message when returning from Security Screen (Ctrl+Alt+Del) in Windows7

I need to detect the closing of the security screen, this is the full screen that appears when a user presses Ctrl+Alt+Del under windows. In Xp my application receives an wm_paint message when this screen is closed but under windows 7, a message is…
Andrew
  • 1,608
  • 16
  • 31
1
vote
3 answers

What does the Result property of a windows message mean and when and how to use it?

Result property meaning: Specifies the value that is returned to window in response to handling the message But MSDN does not says anymore: http://msdn.microsoft.com/en-us/library/system.windows.forms.message.result%28v=vs.110%29.aspx I will…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
1
vote
1 answer

GetMenuItemInfo does not retrieve the menu item information

I have this mii variable which allocates a MenuItemInfo structure to set (or get) items of the system menu. Private mii As New…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
1
vote
1 answer

Intercept Windows Messages And Winforms

So going back to the beginning of this issue. I have using System.Windows.Forms to create a text editor. The textbox control by default accepts an event when its contained text is double-clicked and highlights the entire row of text. I wanted to…
Nick
  • 1,148
  • 2
  • 14
  • 28
1
vote
2 answers

Killing old process with BroadcastSystemMessage

I have an application (native C++, Windows), that cannot be run simultaneously on one machine. The behavior that I want to implement is this: on the attempt to run second instance of the application the first one stops running. To do so I want to…
Kirill Daybov
  • 480
  • 3
  • 19
1
vote
1 answer

C++ Layered Window and WM_MOUSEMOVE

I'm trying to make a transparent screensaver in C++ and WinAPI. It works fine so far on Windows XP, but on WES7 I have the following problem: By making my screen transparent, I can't recieve any WM_MOUSMOVE messages. SetWindowLongPtr( hWnd, …
user2618639
  • 21
  • 2
  • 4
1
vote
1 answer

Interacting with windows messages with command based compiler

This is probably a stupid question but here it goes. Suppose you are interacting with a Driver API. You are using C and doing entirely via command prompt. No GUI. Is it possible to recieve and handle windows message in such files? I mean,…
user2178841
  • 849
  • 2
  • 13
  • 26
1
vote
1 answer

Handle a Window Message WMCOPY in WPF user control MVVM

I am working on a WPF application and following MVVM. I have 5 user controls. In one of my user control I need to handle a window message WMCOPY. How should I do that. Can WPF User control handle windows messages events in its view model? If yes…
fhnaseer
  • 7,159
  • 16
  • 60
  • 112
1
vote
2 answers

Canon SDK: Download latest picture taken by two devices to host

I'm writing an windows based application in Visual Studio 2010. My host PC is connected to two Canon EOS 600D. So far I managed two take a picture, download it directly (without a SD card) to the host PC and store the pictures under a specific name…
TLkuebler
  • 104
  • 1
  • 6