惧留孙网

juliusun.com

惧留孙网 > 惧留孙课堂 > 在线手册 > WINDOWS API手册 > SendMessage
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

SendMessage 函数

向创建标识窗口的线程发送一个消息。此函数会在发送完消息后,等待窗口过程处理发送的消息然后返回处理结果。
如果发送线程消息,可使用函数 PostThreadMessage
 函数原型:
 LRESULT WINAPI SendMessage ( HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam  );
参数
hWnd
类型:HWND
接收消息的窗口句柄。如果这个参数是 HWND_BROADCAST ((HWND)0xffff),消息被发送到系统的最顶层窗口。

Msg
类型:UINT
被发送的消息值

wParam
类型:WPARAM
消息附加值

lParam
类型:LPARAM
消息附加值
返回值
类型:LRESULT
返回消息的处理结果。消息不同,返回值意义不同。
备注
如果不需要消息处理结果,可使用函数 PostMessage
支持
最低桌面系统支持Windows 2000 Professional
头文件Winuser.h (已包含在Windows.h中)
User32.lib
DLLUser32.dll
UNICODE版本名SendMessageW
ANSI版本名SendMessageA

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

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

京ICP备15039193号-1

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