WM_NCHITTEST message

最近hook滚动条,用到了很多这方面小知道,总结下:

HTBORDER:

In the border of a window that does not have a sizing border.

边界上!that does not have a sizing border好像没什么关系,反正普通的框鼠标停在边上就有这个事件(自测试)

HTBOTTOM

In the lower-horizontal border of a resizable window (the user can click the mouse to resize the window vertically).

可调窗体大小的下边界

HTBOTTOMLEFT

In the lower-left corner of a border of a resizable window (the user can click the mouse to resize the window diagonally).

可调窗体大小的左下角

HTBOTTOMRIGHT

In the lower-right corner of a border of a resizable window (the user can click the mouse to resize the window diagonally).

可调窗体大小的右下角

HTLEFT

In the left border of a resizable window (the user can click the mouse to resize the window horizontally).

可调窗体大小的左边界

HTRIGHT

In the right border of a resizable window (the user can click the mouse to resize the window horizontally).

可调窗体大小的右边界

HTTOP

In the upper-horizontal border of a window.

窗体的上边界

HTTOPLEFT

In the upper-left corner of a window border.

窗体的左上角

HTTOPRIGHT

窗体的右上角

HTCAPTION

In a title bar.

标题栏,用来模拟拖动区

HTCLIENT

In a client area.

客户区

HTCLOSE

In a Close button

关闭按钮上

HTERROR

On the screen background or on a dividing line between windows (same as HTNOWHERE, except that the DefWindowProc function produces a system beep to indicate an error).

在屏幕的后面或在窗体之间的线上(相当于HTNOWHERE,除了DefWindowProc函数产生的”嘟嘟”提示)

HTGROWBOX

In a size box (same as HTSIZE).

不懂了???????????????????????

HTHELP

In a Help button.

帮助按钮上

HTHSCROLL

In a horizontal scroll bar.

水平滚动条上

HTMENU

In a menu.

菜单上

HTMAXBUTTON

In a Maximize button.

最大化按钮上

HTMINBUTTON

In a Minimize button.

最小化按钮上

HTNOWHERE

On the screen background or on a dividing line between windows

在屏幕的后面或在窗体之间的线上,测试应该就是在窗口边界处有这个事件

HTREDUCE

In a Minimize button.

最小化的按钮,就是HTMINBUTTON

HTSIZE

In a size box (same as HTGROWBOX).

不懂了???????????????????????

HTSYSMENU

In a window menu or in a Close button in a child window.

在一个系统菜单上,或在一个子窗体的一个关闭按钮上

HTTRANSPARENT

In a window currently covered by another window in the same thread (the message will be sent to underlying windows in the same thread until one of them returns a code that is not HTTRANSPARENT).

在同一线程的两个窗体,一个窗体被另一个窗体覆盖着(消息会传递到下面的窗体,直到其中的一个窗体离开,否则就发送 HTTRANSPARENT消息)

HTVSCROLL

In the vertical scroll bar.

在垂直滚动条上

HTZOOM ==HTMAXBUTTON


 



 

原文地址:https://www.cnblogs.com/hgy413/p/3693588.html