网站首页  词典首页

请输入您要查询的函数:

 

术语 setdlgitemtext
释义 SetDlgItemText
语法:
BOOL SetDlgItemText( HWND hDlg,
int nIDDlgItem,
LPCTSTR lpString
);
SetDlgItemText函数
该SetDlgItemText函数设置对话框中的标题或控件的文本。
参数
hDlg
[in]句柄对话框,其中包含了控制。
nIDDlgItem
[in]指定的标题或文字控制设置。
lpString
[in]指向NULL结尾的字符串,其中包含的文本复制到控制。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该SetDlgItemText函数WM_SETTEXT消息发送到指定的控制。
在Windows 95/98/Me:SetDlgItemTextW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
例如
有关示例,请参阅创建一个简单的列表框。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
对话框概述,GetDlgItemInt,GetDlgItemText,SetDlgItemInt,WM_SETTEXT
==英文原文==SetDlgItemText Function
The SetDlgItemText function sets the title or text of a control in a dialog box.
Syntax
BOOL SetDlgItemText( HWND hDlg,
int nIDDlgItem,
LPCTSTR lpString
);
Parameters
hDlg
[in] Handle to the dialog box that contains the control.
nIDDlgItem
[in] Specifies the control with a title or text to be set.
lpString
[in] Pointer to the null-terminated string that contains the text to be copied to the control.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The SetDlgItemText function sends a WM_SETTEXT message to the specified control.
Windows 95/98/Me: SetDlgItemTextW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Example
For an example, see Creating a Simple List Box .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Dialog Boxes Overview , GetDlgItemInt , GetDlgItemText , SetDlgItemInt , WM_SETTEXT
==原始网址==http://msdn.microsoft.com/en-us/library/ms645521(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:21:44