Questions tagged [window-messages]

79 questions
1
vote
1 answer

Is there a Windows Message for when any pixel in the window changes?

I'm trying to execute an action when a pixel changes in a window by using SetWindowsHookEx. I can successfully recieve Windows messages, but most messages are called while no screen updates occur, and some messages are called more than once on one…
boooba
  • 149
  • 2
  • 12
1
vote
1 answer

Problems with closing main application window when having only the ID of its process

I have ID of the process. This process is an application which have a main window. I am trying to close this application by sending WM_CLOSE to its main window. I am searching its main window by using EnumWindows. The problem is, that this…
Wodzu
  • 6,932
  • 10
  • 65
  • 105
1
vote
0 answers

WM_MOUSELEAVE sometimes occurs after WM_MOUSEMOVE on another control when compiled

Here is a short summary of the problem: I move the mouse pointer quickly from control 1 to control 2. In IDE, the sequence is this: Control 1: Enter Control 1: Leave Control 2: Enter Control 2: Leave When compiled, the sequence is this (sometimes,…
tmighty
  • 10,734
  • 21
  • 104
  • 218
1
vote
1 answer

LButton-scroll registers as Ctrl-scroll if VCL control has a child control

It seems like a windowed VCL control registers LButton-scroll as Ctrl-scroll if the window has a windowed child control. At least this happens if the user is using a Logitech MX Master mouse. Consider the following minimal example: unit…
Andreas Rejbrand
  • 105,602
  • 8
  • 282
  • 384
1
vote
1 answer

window message management in MFC : Is the addition of the base class call mandatory?

Let's consider this code fragment : BEGIN_MESSAGE_MAP(CMyCheckBox, CButton) ON_WM_MOUSEMOVE() END_MESSAGE_MAP() void CMyCheckBox::OnMouseMove(UINT nFlags, CPoint point) { // here my code .... CButton::OnMouseMove(nFlags, point); // <--…
Landstalker
  • 1,368
  • 8
  • 9
1
vote
0 answers

Find out the caller of WM_SIZING

I have a really huge project with hundreds of thousands lines of code. My application has a complex graphical interface. For some reason, sometimes my main form is resized, and I just don't see why / how this happens. To track down the reason for…
tmighty
  • 10,734
  • 21
  • 104
  • 218
1
vote
0 answers

Is there a way Usercontrols or IMessageFilter implementations can get WM_DEVICECHANGE messages?

I'm by no means a windows message expert - so forgive me if I'm asking something stupid, but I wasn't able to help myself: I have a form hooking up to Windows Messages by overriding WndProc to get notified when usb devices are connected or removed…
Marwie
  • 3,177
  • 3
  • 28
  • 49
1
vote
1 answer

Trap WM_NCHITTEST message but keep checking for MouseEnter/-Leave

I've got a form where I've removed the title bar but kept the border (see this answer). In the above answer it's stated that it's required to have the FormBorderStyle set to Sizable or SizableToolWindow, and in order to stop the form from being…
Visual Vincent
  • 18,045
  • 5
  • 28
  • 75
1
vote
1 answer

hacking lync to start recording

I have referred several sources and found that there is no way to programmatically control screen recording using lync sdk. So I've taken a spyxx.exe approach in order to be able to figure out the messages the conversation window gets in order to…
deostroll
  • 11,661
  • 21
  • 90
  • 161
1
vote
1 answer

PostMessage() or such on OS X. Sending messages to a window

What is the equivalent of PostMessage/SendMessage in Windows on Mac OS X? I have recently started out with Mac development, with most of my experience coming from Windows and nix. I want to hook a window and simulate mouse clicks or keyboard…
1
vote
1 answer

CStatic subclassed Control fails to receive input messages

I am using a MFC dialog based application and have a subclassed CStatic control. I would like to receive WM_MOUSEWHEEL and other messages inside my subclassed control but somehow those messages never arrive. Here is how my Dialog looks like: I'm…
Vinz
  • 3,030
  • 4
  • 31
  • 52
1
vote
0 answers

Receiver window not getting data through PostMessage in windows

void SendDataFromWorkerThread(HWND handle) { int *x = new int(10); ::PostMessage(handle, user_defined_message_id, 0, (LPARAM)x); } While receiving on different thread.. void GetDataFromWorkerThread(WPARAM wparam, LPARAM lparam) { int *x = (int*)…
coder
  • 65
  • 2
  • 8
1
vote
2 answers

How to determine that FindText dialog is closed when user click "Cancel"

This code produces simple FindText dialog window and when user clicks top-right X window close button the WM_CLOSE message is send to the hook procedure, but when clicking "cancel" button no message is produced to indicate that window ceased to…
rsk82
  • 28,217
  • 50
  • 150
  • 240
1
vote
1 answer

Given Window Handle, listen for on Handle Rect Change event

I have a handle (HWND) to a window and I want to listen for bounding rectangle changes. I could check the GetWindowRect(HWND hWnd, LPRECT lpRect); every n milliseconds, but that seems really wasteful. Is there a Windows message that I can listen…
Jason
  • 13,563
  • 15
  • 74
  • 125
1
vote
1 answer

Win32: How to post message to a process run by a different user in Windows?

We run two application, each of them register the same message using RegisterWindowMessage(): application A as a regular user and application B as administrator in the same user's session on the machine, and those applications would send this…
Artem
  • 7,275
  • 15
  • 57
  • 97