NonClientView_t::DoHitTest (Windows CE 5.0)

Send Feedback

This method determines whether a hit occurred in the nonclient area and the location of the hit.

static NcHitTestCode DoHitTest(HWND hwnd,POINT pt,UINT32 WindowState,bool bTopLevelWindow);

Parameters

  • hwnd
    [in] Handle to the window.
  • pt
    [in] POINT structure that receives the coordinates of the point where the hit occurred.
  • WindowState
    [in] Unsigned 32-bit integer that specifies the state of the nonclient area. The following table shows the possible values.
    Value Description
    WF_NC_DISABLE_CLOSE The Close(X) button for the window is disabled.
    WF_NC_SBH_PRESENT The window contains a horizontal scroll bar.
    WF_NC_SBV_PRESENT The window contains a vertical scroll bar.
    WF_SBH_DISABLED The horizontal scroll bar for the window appears dimmed.
    WF_SBV_DISABLED The vertical scroll bar for the window appears dimmed.
  • bTopLevelWindow
    [in] Boolean that specifies whether the window is a top-level window. TURE indicates that the window is a top-level window. FALSE indicates that the window is not a top-level window.

Return Values

The return value is a value of type NcHitTestCode that identifies the location of a hit relative to controls or other parts of the nonclient area of a window. The following table describes the possible values of type NcHitTestCode and the locations to which those values correspond.

Value Location
HTBORDER In the border of a window that does not have a sizing border.
HTBOTTOM In the bottom border of a window.
HTBOTTOMLEFT In the lower-left corner of a window border.
HTBOTTOMRIGHT In the lower-right corner of a window border.
HTCAPTION In a title bar.
HTCLIENT In a client area.
HTCLOSE In a Close(X) button.
HTGROWBOX In a size box.
HTHELP In a Help button.
HTHSCROLL In a horizontal scroll bar.
HTLEFT In the left border of a window.
HTMAXBUTTON In a Maximize button.
HTMINBUTTON In a Minimize button.
HTNOWHERE On the screen background or on a dividing line between windows.
HTOKBUTTON In an OK button.
HTRIGHT In the right border of a window.
HTTOP In the top border of a window.
HTTOPLEFT In the upper-left corner of a window border.
HTTOPRIGHT In the upper-right corner of a window border.
HTVSCROLL In a vertical scroll bar.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Nclientview.hpp.

See Also

NcHitTestCode | POINT

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.