网站首页  词典首页

请输入您要查询的函数:

 

术语 dlgdirselectex
释义 DlgDirSelectEx
语法:
BOOL DlgDirSelectEx( HWND hDlg,
LPTSTR lpString,
int nCount,
int nIDListBox
);
DlgDirSelectEx功能
检索从单一选择列表框的当前选择。它假定列表框已被填补DlgDirList函数的功能,而选择一个驱动器号,文件名,或目录名称。
参数
hDlg
[in]的句柄对话框,其中包含列表框。
lpString
[out] 一个缓冲区,它接收所选路径的指针。
nCount
[in]的长度,指出TCHARs,对缓冲区的lpString。
nIDListBox
[in]一个在对话框中列表框标识符。
返回值
如果当前的选择是一个目录名,则返回值为非零。
如果当前的选择是不是目录名,则返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该DlgDirSelectEx函数复制到缓冲区的选择指向的lpString参数。如果当前的选择是一个目录名或驱动器号,DlgDirSelectEx删除封闭(和连字符的驱动器号,方括号),使字母的名称或准备成为一个新的路径插入。如果没有选择,lpString不会改变。
如果字符串为长或更长,比缓冲区,缓冲区将包含一个终止空字符截断的字符串。
DlgDirSelectEx发送LB_GETCURSEL和LB_GETTEXT消息到列表框中。该函数不会允许一个以上的文件是从一个列表框返回。列表框不能多重选择列表框。如果是,这个函数不返回零值,lpString保持不变。
Microsoft Windows 95或更高版本:DlgDirSelectExW是支持微软层对于Unicode。要使用此,您必须将某些文件到您的应用,概述了对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版本。
参见
DlgDirList函数,DlgDirListComboBox,DlgDirSelectComboBoxEx,LB_GETCURSEL,LB_GETTEXT
==英文原文==DlgDirSelectEx Function
Retrieves the current selection from a single-selection list box. It assumes that the list box has been filled by the DlgDirList function and that the selection is a drive letter, filename, or directory name.
Syntax
BOOL DlgDirSelectEx( HWND hDlg,
LPTSTR lpString,
int nCount,
int nIDListBox
);
Parameters
hDlg
[in] A handle to the dialog box that contains the list box.
lpString
[out] A pointer to a buffer that receives the selected path.
nCount
[in] The length, in TCHARs, of the buffer pointed to by lpString.
nIDListBox
[in] The identifier of a list box 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
The DlgDirSelectEx function copies the selection to the buffer pointed to by the lpString parameter. If the current selection is a directory name or drive letter, DlgDirSelectEx removes the enclosing square brackets (and hyphens, for drive letters), so that the name or letter is ready to be inserted into a new path. If there is no selection, lpString does not change.
If the string is as long or longer than the buffer, the buffer will contain the truncated string with a terminating null character.
DlgDirSelectEx sends LB_GETCURSEL and LB_GETTEXT messages to the list box. The function does not allow more than one filename to be returned from a list box. The list box must not be a multiple-selection list box. If it is, this function does not return a zero value and lpString remains unchanged.
Microsoft Windows 95 or later: DlgDirSelectExW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows Me/98/95 Systems .
Example
For an example, see Creating a Directory Listing in a Single-selection 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
DlgDirList , DlgDirListComboBox , DlgDirSelectComboBoxEx , LB_GETCURSEL , LB_GETTEXT
==原始网址==http://msdn.microsoft.com/en-us/library/bb761368(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 11:30:06