开发者

NO ACTIVATE window style

I need a window that does not a开发者_如何学编程ctivate when I click on it but is should elsewhere react normal. By normal I mean if there is a button on it and I click on the button it should execute the click and call the click function ( or event handle or what so ever). So it should be a normal window except that it shouldn't get activated when you interact with it. I know you can do this with a message filter or hooks but is there any window style that does this automatically?

this is for windows.

thanks!


Have you tried the WS_EX_NOACTIVATE extended window style?

A top-level window created with this style does not become the foreground window when the user clicks it. The system does not bring this window to the foreground when the user minimizes or closes the foreground window.

To activate the window, use the SetActiveWindow or SetForegroundWindow function.


Otherwise, if that doesn't do what you want, you will need to handle the WM_MOUSEACTIVATE message and return MA_NOACTIVATE.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜