HTSYSMENU and WM_NCHITTEST are two different things.

HTSYSMENU is a flag that is returned by the WM_NCHITTEST message when the user clicks on the system menu icon in the title bar of a window. It indicates that the system menu should be displayed.

WM_NCHITTEST is a message that is sent to a window to determine where a mouse click occurred. The message is sent when the user clicks on the non-client area of a window, such as the title bar, borders, or scroll bars. The return value of the message indicates where the mouse click occurred, such as on the title bar, border, or client area of the window.

Together, these two concepts are used to handle user input in the non-client area of a window, such as when the user clicks on the system menu icon. The window procedure for the window can use the WM_NCHITTEST message to determine where the user clicked, and if the click was on the system menu icon, it can return the HTSYSMENU flag to indicate that the system menu should be displayed

HTSYSMENU WM_NCHITTEST

原文地址: https://www.cveoy.top/t/topic/deWc 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录