惧留孙网

juliusun.com

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

GetWindowTextLength 函数

返回标识的窗口标题栏的字符个数(如果窗口有标题栏)。如果窗口是控件,返回控件文本字符个数。但是 GetWindowTextLength 函数不能返回其它应用程序的编辑框的字符个数。
 函数原型:
 int WINAPI GetWindowTextLength ( HWND hWnd  );
参数
hWnd
类型:HWND
包含文本内容窗口或控件的窗口句柄。
返回值
类型:int
如果成功,返回复制到缓冲区的字符个数,字符个数不包括结尾的NULL空字符。如果窗口没有标题栏或文本、标题栏是空或窗口或控件句柄不可用,返回0。

此函数不能返回其它应用程序的文本个数。
备注
如果目标窗口被本进程拥有,GetWindowTextLength 会向窗口发送 WM_GETTEXTLENGTH 消息来获取文本个数。
支持
最低桌面系统支持Windows 2000 Professional
头文件Winuser.h (已包含在Windows.h中)
User32.lib
DLLUser32.dll
UNICODE版本名GetWindowTextLengthW
ANSI版本名GetWindowTextLengthA

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

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

京ICP备15039193号-1

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