[win32] Non-client events
Hello!
I have a problem with my application : It doesn't handle non-client mouse events! If I click in my window's client area and then I drag the mouse and release outside my window, my appication will never know that the mouse was released and will continue thinking that it is down, which is annoying and causes bugs.
I have all of the "case WM_NC*BUTTON* :" in my event switch statement, but they never get called. I think the problem is that my window hasn't got the fous when I release so it doesn't get the message.
How can I get those event messages?
...mmh...
I just had another look at MSDN and, if I understand well, Non-client events are events that happen in the window but not in the client area, I thought it meant outside the window.
So there's no way to catch mouse events outside of my window... then what should I do? should I consider that all buttons are released when the mouse leaves my window rectangle?
I just had another look at MSDN and, if I understand well, Non-client events are events that happen in the window but not in the client area, I thought it meant outside the window.
So there's no way to catch mouse events outside of my window... then what should I do? should I consider that all buttons are released when the mouse leaves my window rectangle?
WM_NC*BUTTON events only apply when the cursor is outside the client, but within the window.
Read up on SetCapture() and ReleaseCapture().
Read up on SetCapture() and ReleaseCapture().
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement