Questions tagged [window-messages]

79 questions
3
votes
1 answer

Disappearing WS_STYLECHANGING/WS_STYLECHANGED messages in CRichEditCtrl derived & subclassed class, or a bug in Spy++?

I'm really puzzled over this. I have a CRichEditCtrl derived class that is also subclassed in my CDialog as a child control. (The window class for the Win32 rich-edit window itself is a newer RICHEDIT50W.) I'm trying to investigate messages that are…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
3
votes
3 answers

Catch WinKey+D key sequence in Winforms

I'm trying to make my application to be always presented on desktop level. It means that my app need to ignore key sequences like LWin+D or RWin+D . I tried to make it work this way: protected override bool ProcessCmdKey(ref Message msg, Keys…
altgov3en
  • 1,100
  • 2
  • 18
  • 33
3
votes
1 answer

Execution difference between "App.exe" and "App.vshost.exe" with WndProc

I am attempting to adapt an application developed in VS 2008/C# that listens to another application's WM_ messages through the use of the Control.WndProc method. When the "app.exe" version is run, WM_USER messages are visible and processed; however…
Bill
  • 335
  • 1
  • 4
  • 21
3
votes
1 answer

Detecting the WM_CLOSE event on main application window when a modal dialog is active?

Is it possible for the the main application window to detect a WM_CLOSE event when a modal dialog is active?. If not, is there any way of detecting the WM_CLOSE event because the event handler for the dialog does not detect it either. To observe…
Gearoid Murphy
  • 11,834
  • 17
  • 68
  • 86
3
votes
3 answers

Broadcasting to owned window with PostMessage vs. SendNotifyMessage

Recently I came about a strange difference between the two Win32 API calls "PostMessage" and "SendNotifyMessage" (at least noticed on Win7 64bit SP1): An owned top-level window of another process seems not to receive messages broadcasted…
Neffl
  • 39
  • 1
  • 3
3
votes
2 answers

Delphi 2009 - Handle when window is restored via double clicking the SysMenu?

I need to handle when the user restores the form by double clicking the title bar. I tried handling the WM_SYSCOMMAND window message however this only works if the user restores the form via clicking the restore button in the system menu. I am using…
James
  • 80,725
  • 18
  • 167
  • 237
2
votes
1 answer

Why don't forms receive WM_NOTIFY messages for children of a TFrame?

The WM_NOTIFY message is often used for in-place "tool tips" (message balloon) and other control notifications, but if I place a control on a TFrame, then WM_NOTIFY messages never occur for those controls. Why aren't those messages sent to my form…
Alfa000
  • 29
  • 2
2
votes
2 answers

MFC app doesn't seem to receive input messages?

We have a MFC Visual-C++ application that is not reacting to any user input. (Note: Currently only known on one machine. The behavior does recur occasionally, but only after the App has been running for several days!) The application is redrawn when…
Martin Ba
  • 37,187
  • 33
  • 183
  • 337
2
votes
0 answers

What does PBT_POWERSETTINGSCHANGE (32787) with lParam = 206730400 mean?

I am using trying to track when the monitor goes off due to user inactivity. To do that, I process PBT_POWERSETTINGCHANGE like this: Select Case wParam Case PBT_APMPOWERSTATUSCHANGE 'DebugPrint "PBT_APMPOWERSTATUSCHANGE" …
tmighty
  • 10,734
  • 21
  • 104
  • 218
2
votes
1 answer

Mysterious Window Message 0xc0e8 in Win32 Application

I am writing a Win32 application in C and have been monitoring the Window Messages coming through the message loop. I am getting an unknown message 0xc0e8 and cannot seem to find any information about this particular message. From my understanding…
2
votes
1 answer

WINAPI GetMessage HWND

I am working on window creation with Win32 API and I'm having a problem with this part: GetMessage(&message, NULL, 0, 0); My problem is that when I try to change the second parameter (hwnd) which is going to receive the messages to the window I…
user3407319
  • 227
  • 2
  • 10
2
votes
1 answer

Windows multiple monitors position

Does Windows send any message if the monitors poisition changed? e.g. I get messege if a new monitor plugged in the PC from WM_DEVICECHANGE. I need a message like this, when I change the position of the monitors. ( On poisiton i mean: First monitor…
Golyo
  • 65
  • 1
  • 6
2
votes
2 answers

WinAPI's ::WaitMessage stops WM_TIMER from coming

I have encountered a, so it seems to me, strange behaviour of the WinAPI. In my program I am setting a timer for the window with ::SetTimer(window_handle, timer_id, 10, NULL); and handle the WM_TIMER message in my window procedure. To reduce the…
Cyianor
  • 45
  • 5
1
vote
2 answers

Window message sent to my topmost form/window when the taskbar/start menu is over it?

I have a C# Windows Forms program, in Windows 7, but I think it applies to any Windows program. The main form of my program covers the entire screen, and has the Topmost property set. However, when I click the Start key to open the Start menu for…
TechAurelian
  • 5,561
  • 5
  • 50
  • 65
1
vote
2 answers

C# Windows Messages in Console Application?

I need to use IPC to receive messages from another process. Currently I am using WPF application to receive messages using WindowsMessages but I am wondering if that communication would work in a ConsoleApp instead? At first glance I've noticed that…
piort
  • 29
  • 3