Click to See Complete Forum and Search --> : WM_NCHITTEST annoying me
Zeddy2
September 23rd, 2005, 09:22 AM
Windows is too buggy :( I want to handle WM_NCHITTEST to allow window drag by client area. Fine, easy.
I also handle WM_NCLBUTTONDOWN - fine, easy.
WM_NCLBUTTONUP doesn't fire. Doesn't work. Many reports of bugs about this. Grr.
I need to get left button UP message when WM_NCHITTEST is HT_CAPTION! How do I do this? I don't want to install stupid mouse hook just for 1 message!
wildfrog
September 23rd, 2005, 09:28 AM
Here's a patch:
http://www.codeguru.com/Cpp/misc/misc/windowsmessaging/article.php/c3885/
- petter
wildfrog
September 23rd, 2005, 09:30 AM
Oh, sorry, you didn't want a stupid mouse hook... :p
- petter
ovidiucucu
September 23rd, 2005, 10:06 AM
That's it. Some hooks are smart, others are stupid. Depends only on implementation. ;)
Why do you need handle WM_NCLBUTTONUP?
Zeddy2
September 23rd, 2005, 10:22 AM
That's it. Some hooks are smart, others are stupid. Depends only on implementation. Why do you need handle WM_NCLBUTTONUP?
hehe yes but installing mouse hook to bypass bug in win32api is stupid! i guess i must use hook like peter pan.
Need to handle because of window settings. If window has WS_EX_NOACTIVATE set so user not able to touch window etc, it not possible to smoothly drag window to new possition. Instead window jumps from possition 1 to possition 2. So on mouse button down, _NOACTIVATE must be removed, on mouse button up it must be or'ed back into window style.
Thanks you.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.