How do I repurpose a window's close button without affecting ALT+F4 or closing it in the taskbar?

放肆的年华 提交于 2019-12-06 11:31:54

Handle WM_NCLBUTTONDOWN message and use WM_NCHITTEST to check it the click is about to be delivered to HTCLOSE control (this is what your red [X] resolves to). Or alternatively, handle WM_NCHITTEST itself and prevent from discovering HTCLOSE part of your window GUI by replacing return value with something else.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!