网站首页  词典首页

请输入您要查询的函数:

 

术语 dlgdirselectcomboboxex
释义 DlgDirSelectComboBoxEx
语法:
BOOL DlgDirSelectComboBoxEx( HWND hDlg,
LPTSTR lpString,
int nCount,
int nIDComboBox
);
DlgDirSelectComboBoxEx功能
检索当前选择从组合框中使用DlgDirListComboBox功能填补。在选择被解释为一个驱动器号,文件或目录的名称。
参数
hDlg
[in]的句柄对话框,其中包含组合框。
lpString
[内]对缓冲区接收所选路径的指针。
nCount
[in]的长度,以字符指出,缓冲区的由lpString参数。
nIDComboBox
[in]的对话框中的组合框控件整数标识符。
返回值
如果当前的选择是一个目录名,则返回值为非零。
如果当前的选择是不是目录名,则返回值是零。为了获得更多错误信息,调用GetLastError。
备注
如果当前选择指定一个目录名或驱动器号,DlgDirSelectComboBoxEx函数删除封闭(驱动器字母和连字符)方括号中的名称或信件发好,可以插入到一个新的路径或文件名。如果没有选择,对缓冲区的内容指出lpString不会改变。
该DlgDirSelectComboBoxEx功能不允许多个文件的名称是从一个组合框返回。
如果字符串为长或更长,比缓冲区,缓冲区包含了与终止空字符截断的字符串。
DlgDirSelectComboBoxEx发送CB_GETCURSEL和CB_GETLBTEXT信息组合框。
您可以使用组合框的所有三种类型(CBS_SIMPLE,CBS_DROPDOWN和CBS_DROPDOWNLIST)这个函数。
安全警告:不当使用这功能,可能会导致您的应用程序的问题。例如,nCount参数应设置适当的ANSI和Unicode版本。不这样做可能导致缓冲区溢出。您应该检讨的安全注意事项:在继续之前微软Windows控件。
Microsoft Windows 95或更高版本:DlgDirSelectComboBoxExW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98系统。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
CB_GETCURSEL,CB_GETLBTEXT,DlgDirListComboBox
==英文原文==DlgDirSelectComboBoxEx Function
Retrieves the current selection from a combo box filled by using the DlgDirListComboBox function. The selection is interpreted as a drive letter, a file, or a directory name.
Syntax
BOOL DlgDirSelectComboBoxEx( HWND hDlg,
LPTSTR lpString,
int nCount,
int nIDComboBox
);
Parameters
hDlg
[in] A handle to the dialog box that contains the combo box.
lpString
[out] A pointer to the buffer that receives the selected path.
nCount
[in] The length, in characters, of the buffer pointed to by the lpString parameter.
nIDComboBox
[in] The integer identifier of the combo box control in the dialog box.
Return Value
If the current selection is a directory name, the return value is nonzero.
If the current selection is not a directory name, the return value is zero. To get extended error information, call GetLastError .
Remarks
If the current selection specifies a directory name or drive letter, the DlgDirSelectComboBoxEx function removes the enclosing square brackets (and hyphens for drive letters) so the name or letter is ready to be inserted into a new path or file name. If there is no selection, the contents of the buffer pointed to by lpString do not change.
The DlgDirSelectComboBoxEx function does not allow more than one file name to be returned from a combo box.
If the string is as long or longer than the buffer, the buffer contains the truncated string with a terminating null character.
DlgDirSelectComboBoxEx sends CB_GETCURSEL and CB_GETLBTEXT messages to the combo box.
You can use this function with all three types of combo boxes (CBS_SIMPLE, CBS_DROPDOWN, and CBS_DROPDOWNLIST).
Security Alert Improper use of this function can cause problems for your application. For instance, the nCount parameter should be set properly for both ANSI and Unicode versions. Failure to do so could lead to a buffer overflow. You should review Security Considerations: Microsoft Windows Controls before continuing.
Microsoft Windows 95 or later: DlgDirSelectComboBoxExW 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 Me/98/95 Systems .
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
CB_GETCURSEL , CB_GETLBTEXT , DlgDirListComboBox
==原始网址==http://msdn.microsoft.com/en-us/library/bb775937(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:00