📄 helptext.h
字号:
CWnd::OnNcHitTest
afx_msg UINT OnNcHitTest( CPoint point );
Return Value
One of the mouse hit-test enumerated values listed below.
Parameters
point
Contains the x- and y-coordinates of the cursor. These coordinates are always screen coordinates.
Remarks
The framework calls this member function for the CWnd object that contains the cursor (or the CWnd object that used the SetCapture member function to capture the mouse input) every time the mouse is moved.
Note This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.
CWnd Overview | Class Members | Hierarchy Chart
See Also CWnd::GetCapture,WM_NCHITTEST
Mouse Enumerated Values
HTBORDER In the border of a window that does not have a sizing border.
HTBOTTOM In the lower horizontal border of the window.
HTBOTTOMLEFT In the lower-left corner of the window border.
HTBOTTOMRIGHT In the lower-right corner of the window border.
HTCAPTION In a title-bar area.
HTCLIENT In a client area.
HTERROR On the screen background or on a dividing line between windows (same as HTNOWHERE except that the DefWndProc Windows function produces a system beep to indicate an error).
HTGROWBOX In a size box.
HTHSCROLL In the horizontal scroll bar.
HTLEFT In the left border of the window.
HTMAXBUTTON In a Maximize button.
HTMENU In a menu area.
HTMINBUTTON In a Minimize button.
HTNOWHERE On the screen background or on a dividing line between windows.
HTREDUCE In a Minimize button.
HTRIGHT In the right border of the window.
HTSIZE In a size box (same as HTGROWBOX).
HTSYSMENU In a Control menu or in a Close button in a child window.
HTTOP In the upper horizontal border of the window.
HTTOPLEFT In the upper-left corner of the window border.
HTTOPRIGHT In the upper-right corner of the window border.
HTTRANSPARENT In a window currently covered by another window.
HTVSCROLL In the vertical scroll bar.
HTZOOM In a Maximize button.
//////
CWnd::GetMenu
CMenu* GetMenu( ) const;
Return Value
Identifies the menu. The value is NULL if CWnd has no menu. The return value is undefined if CWnd is a child window.
The returned pointer may be temporary and should not be stored for later use.
Remarks
Retrieves a pointer to the menu for this window. This function should not be used for child windows because they do not have a menu.
CWnd Overview | Class Members | Hierarchy Chart
See Also ::GetMenu
//////
CWnd::OnMenuSelect
afx_msg void OnMenuSelect( UINT nItemID, UINT nFlags HMENU hSysMenu );
Parameters
nItemID
Identifies the item selected. If the selected item is a menu item, nItemID contains the menu-item ID. If the selected item contains a pop-up menu, nItemID contains the pop-up menu index, and hSysMenu contains the handle of the main (clicked-on) menu.
nFlags
Contains a combination of the following menu flags:
MF_BITMAP Item is a bitmap.
MF_CHECKED Item is checked.
MF_DISABLED Item is disabled.
MF_GRAYED Item is dimmed.
MF_MOUSESELECT Item was selected with a mouse.
MF_OWNERDRAW Item is an owner-draw item.
MF_POPUP Item contains a pop-up menu.
MF_SEPARATOR Item is a menu-item separator.
MF_SYSMENU Item is contained in the Control menu.
hSysMenu
If nFlags contains MF_SYSMENU, identifies the menu associated with the message. If nFlags contains MF_POPUP, identifies the handle of the main menu. If nFlags contains neither MF_SYSMENU nor MF_POPUP, it is unused.
Remarks
If the CWnd object is associated with a menu, OnMenuSelect is called by the framework when the user selects a menu item.
If nFlags contains 0xFFFF and hSysMenu contains 0, Windows has closed the menu because the user pressed the ESC key or clicked outside the menu.
Note This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.
CWnd Overview | Class Members | Hierarchy Chart
See Also WM_MENUSELECT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -