This enumeration was custom-built to identify the return value passed back by the WndProc method when it processes this message.
Most of these relate to the non-client (NC) region of the form. The client region of the form is the region where the normal interactive controls are placed, whereas the non-client section of a form includes the border, title bar, minimize, maximize, close and help buttons, etc. which make up the OS look and feel.
C# Definition:
/// <summary>Options available when a form is tested for mose positions.</summary>
enum WindowHitTestRegions
{
/// <summary>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).</summary>
Error = -2,
/// <summary>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).</summary>
TransparentOrCovered = -1,
/// <summary>HTNOWHERE: On the screen background or on a dividing line between
/// windows.</summary>
NoWhere = 0,
/// <summary>HTCLIENT: In a client area.</summary>
ClientArea = 1,
/// <summary>HTCAPTION: In a title bar.</summary>
TitleBar = 2,
/// <summary>HTSYSMENU: In a window menu or in a Close button in a child window.</summary>
SystemMenu = 3,
/// <summary>HTGROWBOX: In a size box (same as HTSIZE).</summary>
GrowBox = 4,
/// <summary>HTMENU: In a menu.</summary>
Menu = 5,
/// <summary>HTHSCROLL: In a horizontal scroll bar.</summary>
HorizontalScrollBar = 6,
/// <summary>HTVSCROLL: In the vertical scroll bar.</summary>
VerticalScrollBar = 7,
/// <summary>HTMINBUTTON: In a Minimize button. </summary>
MinimizeButton = 8,
/// <summary>HTMAXBUTTON: In a Maximize button.</summary>
MaximizeButton = 9,
/// <summary>HTLEFT: In the left border of a resizable window (the user can click
/// the mouse to resize the window horizontally).</summary>
LeftSizeableBorder = 10,
/// <summary>HTRIGHT: In the right border of a resizable window (the user can click
/// the mouse to resize the window horizontally).</summary>
RightSizeableBorder = 11,
/// <summary>HTTOP: In the upper-horizontal border of a window.</summary>
TopSizeableBorder = 12,
/// <summary>HTTOPLEFT: In the upper-left corner of a window border.</summary>
TopLeftSizeableCorner = 13,
/// <summary>HTTOPRIGHT: In the upper-right corner of a window border.</summary>
TopRightSizeableCorner = 14,
/// <summary>HTBOTTOM: In the lower-horizontal border of a resizable window (the
/// user can click the mouse to resize the window vertically).</summary>
BottomSizeableBorder = 15,
/// <summary>HTBOTTOMLEFT: In the lower-left corner of a border of a resizable
/// window (the user can click the mouse to resize the window diagonally).</summary>
BottomLeftSizeableCorner = 16,
/// <summary>HTBOTTOMRIGHT: In the lower-right corner of a border of a resizable
/// window (the user can click the mouse to resize the window diagonally).</summary>
BottomRightSizeableCorner = 17,
/// <summary>HTBORDER: In the border of a window that does not have a sizing
/// border.</summary>
NonSizableBorder = 18,
/// <summary>HTOBJECT: Unknown...No Documentation Found</summary>
Object = 19,
/// <summary>HTCLOSE: In a Close button.</summary>
CloseButton = 20,
/// <summary>HTHELP: In a Help button.</summary>
HelpButton = 21,
/// <summary>HTSIZE: In a size box (same as HTGROWBOX). (Same as GrowBox).</summary>
SizeBox = GrowBox,
/// <summary>HTREDUCE: In a Minimize button. (Same as MinimizeButton).</summary>
ReduceButton = MinimizeButton,
/// <summary>HTZOOM: In a Maximize button. (Same as MaximizeButton).</summary>
ZoomButton = MaximizeButton,
}
VB.NET Definition:
''' <summary>Options available when a form is tested for mose positions.</summary>
Enum WindowHitTestRegions
''' <summary>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).</summary>
[Error] = -2
''' <summary>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).</summary>
TransparentOrCovered = -1
''' <summary>HTNOWHERE: On the screen background or on a dividing line between
''' windows.</summary>
NoWhere = 0
''' <summary>HTCLIENT: In a client area.</summary>
ClientArea = 1
''' <summary>HTCAPTION: In a title bar.</summary>
TitleBar = 2
''' <summary>HTSYSMENU: In a window menu or in a Close button in a child window.</summary>
SystemMenu = 3
''' <summary>HTGROWBOX: In a size box (same as HTSIZE).</summary>
GrowBox = 4
''' <summary>HTMENU: In a menu.</summary>
Menu = 5
''' <summary>HTHSCROLL: In a horizontal scroll bar.</summary>
HorizontalScrollBar = 6
''' <summary>HTVSCROLL: In the vertical scroll bar.</summary>
VerticalScrollBar = 7
''' <summary>HTMINBUTTON: In a Minimize button. </summary>
MinimizeButton = 8
''' <summary>HTMAXBUTTON: In a Maximize button.</summary>
MaximizeButton = 9
''' <summary>HTLEFT: In the left border of a resizable window (the user can click
''' the mouse to resize the window horizontally).</summary>
LeftSizeableBorder = 10
''' <summary>HTRIGHT: In the right border of a resizable window (the user can click
''' the mouse to resize the window horizontally).</summary>
RightSizeableBorder = 11
''' <summary>HTTOP: In the upper-horizontal border of a window.</summary>
TopSizeableBorder = 12
''' <summary>HTTOPLEFT: In the upper-left corner of a window border.</summary>
TopLeftSizeableCorner = 13
''' <summary>HTTOPRIGHT: In the upper-right corner of a window border.</summary>
TopRightSizeableCorner = 14
''' <summary>HTBOTTOM: In the lower-horizontal border of a resizable window (the
''' user can click the mouse to resize the window vertically).</summary>
BottomSizeableBorder = 15
''' <summary>HTBOTTOMLEFT: In the lower-left corner of a border of a resizable
''' window (the user can click the mouse to resize the window diagonally).</summary>
BottomLeftSizeableCorner = 16
''' <summary>HTBOTTOMRIGHT: In the lower-right corner of a border of a resizable
''' window (the user can click the mouse to resize the window diagonally).</summary>
BottomRightSizeableCorner = 17
''' <summary>HTBORDER: In the border of a window that does not have a sizing
''' border.</summary>
NonSizableBorder = 18
''' <summary>HTOBJECT: Unknown...No Documentation Found</summary>
[Object] = 19
''' <summary>HTCLOSE: In a Close button.</summary>
CloseButton = 20
''' <summary>HTHELP: In a Help button.</summary>
HelpButton = 21
''' <summary>HTSIZE: In a size box (same as HTGROWBOX). (Same as GrowBox).</summary>
SizeBox = GrowBox
''' <summary>HTREDUCE: In a Minimize button. (Same as MinimizeButton).</summary>
ReduceButton = MinimizeButton
''' <summary>HTZOOM: In a Maximize button. (Same as MaximizeButton).</summary>
ZoomButton = MaximizeButton
End Enum
Notes:
None.
Enumeration built to support the WM_NCHITTEST Notification. Check with WindowsMessages for more details.
27/07/2009 22:05:28 - -74.46.23.128
C# and VB enums of many of the Windows Messages.
28/07/2010 18:23:16 - -198.53.67.103
A delegate for window procedure callbacks (handlers).
31/07/2009 19:04:10 - anss123-212.251.139.186
Please edit this page!
Do you have...
helpful tips?
corrections to the existing content?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it!
NEW: SmartAssembly 5.0
Automated Error Reporting: get a volume of crash reports and a complete state of your program whenever it fails, and improve the quality of your program.