惧留孙网

juliusun.com

惧留孙网 > 惧留孙课堂 > 在线手册 > WINDOWS API手册 > WM_NCHITTEST
acceptAdjustWindowRectAdjustWindowRectExAngleArcAppendMenuArcArcToBeginPaintbindBitBltBM_GETCHECKBM_SETCHECKButton_GetCheckButton_SetCheckClientToScreenclosesocketconnectCreateCompatibleDCCreateDialogCreateDialogParamCreateFontCreateMenuCreatePenCreatePopupMenuCreateSolidBrushCreateWindowCreateWindowExDefWindowProcDeleteDCDeleteObjectDestroyCursorDestroyIconDestroyMenuDestroyWindowDialogBoxDialogBoxParamDialogProcDispatchMessageDrawIconDrawIconExEdit_HideBalloonTipEdit_ShowBalloonTipEDITBALLOONTIPEllipseEM_HIDEBALLOONTIPEM_SHOWBALLOONTIPEndDialogEndPaintFillRectFrameRectGetArcDirectionGetClientRectGetDlgItemGetDlgItemTextGetMessageGetStockObjectGetSystemMetricsGetTextAlignGetWindowTextGetWindowTextLengthInvalidateRectIsDialogMessageLineTolistenLoadCursorLoadIconLoadImageMAKEINTRESOURCEMessageBoxMoveToExMSGPiePOINTPolygonPolylinePolylineToPolyPolylinePostMessagePostQuitMessagePostThreadMessageRectanglerecvRegisterClassRegisterClassExRoundRectScreenToClientSelectObjectsendSendDlgItemMessageSendMessageSetArcDirectionSetBkColorSetBkModeSetDlgItemTextSetPixelSetTextAlignSetTextColorSetWindowTextShowWindowsocketstrcmpStretchBltstrlenTextOutTrackPopupMenuTrackPopupMenuExTranslateMessageUnregisterClassUpdateWindowwcscmpwcslenWindowProcWinMainWM_CHARWM_CLOSEWM_COMMANDWM_CREATEWM_DESTROYWM_GETTEXTWM_GETTEXTLENGTHWM_INITDIALOGWM_KEYDOWNWM_KEYUPWM_LBUTTONDBLCLKWM_LBUTTONDOWNWM_LBUTTONUPWM_MBUTTONDBLCLKWM_MBUTTONDOWNWM_MBUTTONUPWM_MOUSEHWHEELWM_MOUSEMOVEWM_MOUSEWHEELWM_NCDESTROYWM_NCHITTESTWM_PAINTWM_QUITWM_RBUTTONDBLCLKWM_RBUTTONDBLCLKWM_RBUTTONDOWNWM_RBUTTONUPWM_SETFONTWM_SETTEXTWM_XBUTTONDBLCLKWM_XBUTTONDOWNWM_XBUTTONUPWNDCLASSWNDCLASSEXWSACleanupWSADATAWSAStartupwsprintf

WM_NCHITTEST 消息

当确定特定的屏幕坐标时,系统会向窗口过程发送此消息来进行询问所标识的点属于窗口的哪部分。如光标移动、鼠标按下或释放等多种情况下,都会收到此消息。
窗口通过窗口过程 WindowProc 来处理此消息。
 声明:
#define WM_NCHITTEST  0x0084
参数
wParam
此参数不被使用

lParam
低16位表示光标的横坐标,以屏幕左上角为基准。
高16位表示光标的纵坐标,以屏幕左上角为基准。
返回值
类型:LRESULT
函数 DefWindowProc 返回值可能如下,来标示光标位置
宏名宏值描述
HTBORDER18拥有不可改变大小边框的窗口边框上
HTCAPTION2在标题栏上
HTCLIENT1在客户区上
HTCLOSE20在关闭按钮上
HTMENU5在菜单上
HTHSCROLL6在水平流动条上
HTHELP21在帮助按钮上
HTMAXBUTTON9在最大化按钮上
HTMINBUTTON8在最小化按钮上
HTREDUCE8在最小化按钮上,同 HTMINBUTTON
HTVSCROLL7在竖直滚动条上
HTZOOM9最大化按钮上,同 HTMAXBUTTON


列表不完整,完整列表可转到官网英文原版
备注
可以通过 GET_X_LPARAMGET_X_LPARAM 来从lParam中获取横纵坐标。
支持
最低桌面系统支持Windows 2000 Professional
头文件Winuser.h (已包含在Windows.h中)

作者:QQ:3304576112 交流QQ群:316930386 C语言窗口程序学习群 本站保留本页版权,可共享网址,匆复制内容

抖音
©2015-2024 惧留孙网 juliusun.com

京ICP备15039193号-1

首页 教程 下载 文章 聊天 我的