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
votes
1 answer

Passing messages from Delphi DLL to application

I have a delphi application loading a delphi dll which will send messages back to it. For testing, I have the dll sending message to another application, but they are not showing up. dll code type TSampleRecord = packed record card :…
Nils Guillermin
  • 1,867
  • 3
  • 21
  • 51
-1
votes
1 answer

why my windows receive en_setfocus 12 times

I want to be notified when user click the password text field. But when I do click the password text field, the following function is called more than once: void CUserDlg::OnSetfocusPasswordEdit() { // TODO: Add your control notification handler…
firstaccount
  • 155
  • 2
  • 13
-1
votes
1 answer

How do I get messages to embedded dialogs in MFC?

I seem to have the original problem from Embedded Modeless Child Dialog not getting messages. I have managed to add rows to my property page using tips form What is the best way to manage data for rows of similar controls in MFC? but now when I…
Chris Nelson
  • 3,519
  • 7
  • 40
  • 51
-1
votes
1 answer

Trying to write a better WndProc Handling

I'm trying to write a better (I think is better) and reusable WndProc procedure, but the code below does not work because when I add more arguments to the sub firm it says that the sub does not accept that amount of arguments, of course that is…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
-1
votes
1 answer

Adapt windows messages in this class

I would like to know if this code can be adapted to use it inside a normal class (Example: Form1 Class) to don't need subclassing a Control. Code is from BlueMonkMN here Capture the option selected by the user in a windows default contextmenu? Class…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
-2
votes
1 answer

How to handle custom messages coming from a DLL using Delphi

I'm totally new in messages handling using the winapi, I have a DLL which will post custom messages under the ID WM_GAS_AP I would like to receive these messages and print them in a memo. I tried several examples but without success, the currently I…
-2
votes
1 answer

MFC App Can't Maximize Only In Administrator Mode

I've got an MFC app on Windows 10 that has the maximize button disabled as it wasn't designed to be resized. If the program is run not as administrator/elevated then the user can minimize the window to the taskbar and then restore/maximize it like…
m4gik
  • 430
  • 5
  • 27
-2
votes
1 answer

WM_LBUTTONDOWN not sent immediately when mouse button is down

I can't detect precisely when the left mouse button is pressed with C++ in Windows 10 . I tried 2 ways : catching WM_LBUTTONDOWN message using directly GetKeyState(VK_LBUTTON) Each time, the behavior is the same : If I press the left button…
Xhilbert
  • 37
  • 6
-2
votes
1 answer

How to prevent message handling after the control's destruction

There are two instances of the following component types: TfrmTimeSliceStructure, which is a direct descendant of TFrame. THKSDBVirtualStringTree, which is a direct descendant of TDBVirtualStringTree (from FIBPlus), which itself is a direct…
-2
votes
3 answers

How to capture mouse windows messages out of the application?

First of all sorry 'cause maybe this could be a too localized question for C# but anyways I didn't find info about this for VB.NET and I don't understand in a good level C# code. Basically I need to capture/process some mouse messages out of the…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
-4
votes
1 answer

Wait for message delivered to MainWindow sent using SendMessage API

The application has multiple process,Process communicate through IPC. Main process is written in C# and has Windows form and DefWndProc. Another process sends the message to main process window through SendMessage API,however messages are not…
cc125
  • 13
  • 1
  • 5
-8
votes
1 answer

expected a ";" on strange place

I have posted here entier code cuz myb I made bad struct or put some functions on wrong place . But It doesnt make sens for me why I am getting Error on LRESULT CALLBACK MouseHookProc(int nCode, WPARAM wParam, LPARAM lParam) ,and it doesnt make sens…
1 2 3
20
21