Create a window using the WS_EX_NOACTIVATE flag ,but it can't be dragged until I release the mouse

后端 未结 2 912
北恋
北恋 2021-01-22 14:18

I have created a window using the WS_EX_NOACTIVATE flag and it works great as far as not taking focus when you click the window. However when I drag the window or try to resize

2条回答
  •  -上瘾入骨i
    2021-01-22 14:46

    If you need a window that doesn't take focus when clicked, but can still be interacted with, you need to handle the WM_MOUSEACTIVATE, and return MA_NOACTIVATE.

    Additional information and fully working sample code has been published by Raymond Chen. See How can I have a window that rejects activation but still receives pointer input?

提交回复
热议问题