News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

[Hooks] Moving window

Started by Scorpie, June 10, 2006, 09:44:10 PM

Previous topic - Next topic

Scorpie

Ok here is the problem, I'm trying to hook a window (which is no problem) and want to react whenever the window moves.
A normal hook doesn't cover the WM_MOVE message so that's no use. I've tried the HCBT hook, this covers the move event but only gives you a message (HCBT_MOVESIZE) when the window is done moving, i want an event whenever the window moves (so at every pixel it moves), no matter if the mouse is released in between etc etc.
Anyone has any idea on how to do this?

Sincerely,

Scorpie

jdoe


I think you are searching for the WM_WINDOWPOSCHANGED notification.

Using SetWindowLong with GWL_WNDPROC flag to set a custom WindowProc should help you to get this notification.


:U


Scorpie

#2
Thanks for the reply,

when i set my own WindowProc, is there a way to let it also use the default? Because the program wouldn't function properly anymore i think?
Edit: Guess i need to read the subclassing tutorial from iczelion right? (found that somewhere on the board, had about the same problem)

More edit: Woohoo its working now, thanks  :U