На главную

On-line справка по Win32 API

Написать письмо
БЕСПЛАТНАЯ ежедневная online лотерея! Выигрывай каждый день БЕСПЛАТНО!
Список всех статей A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z | Скачать Вниз

DlgDirList



The DlgDirList function fills the specified list box with the names of all files matching the specified path or filename.

int DlgDirList(

HWND hDlg, // handle to dialog box with list box
LPTSTR lpPathSpec, // pointer to path or filename string
int nIDListBox, // identifier of list box
int nIDStaticPath, // identifier of static control
UINT uFileType // file attributes to display
);


Parameters

hDlg

Identifies the dialog box that contains the list box.

lpPathSpec

Points to a null-terminated string that contains the path or filename. DlgDirList modifies this string, which should be long enough to contain the modifications. For more information about this parameter, see the Remarks section.

nIDListBox

Specifies the identifier of a list box. If this parameter is zero, DlgDirList assumes that no list box exists and does not attempt to fill one.

nIDStaticPath

Specifies the identifier of the static control used for displaying the current drive and directory. If this parameter is zero, DlgDirList assumes that no such control is present.

uFileType

Specifies attributes of the filenames to be displayed. This parameter must be one or more of the following values:

Value Description
DDL_ARCHIVE Includes archived files.
DDL_DIRECTORY Includes subdirectories. Subdirectory names are enclosed in square brackets ([ ]).
DDL_DRIVES Includes drives. Drives are listed in the form [-x-], where x is the drive letter.
DDL_EXCLUSIVE Includes only files with the specified attributes. By default, read-write files are listed even if DDL_READWRITE is not specified.
DDL_HIDDEN Includes hidden files.
DDL_READONLY Includes read-only files.
DDL_READWRITE Includes read-write files with no additional attributes.
DDL_SYSTEM Includes system files.
DDL_POSTMSGS Posts messages to the application's message queue. By default, DlgDirList sends messages directly to the dialog box procedure.


Return Values

If a listing is made ѕ even an empty listing ѕ the return value is nonzero. If the input string does not contain a valid search path, the return value is zero.

Remarks

If you specify a zero-length string for the lpPathSpec parameter or if you specify only a directory name with no filename, the string will be changed to *.*
The lpPathSpec parameter has the following form:
[drive:] [[\u]directory[\idirectory]\u] [filename]
In this example, drive is a drive letter, directory is a valid directory name, and filename is a valid filename that must contain at least one wildcard (? or *).

If lpPathSpec includes a drive or directory name, or both, the current drive and directory are changed to the specified drive and directory before the list box is filled. The static control identified by the nIDStaticPath parameter is also updated with the new drive or directory name, or both.
After the list box is filled, DlgDirList updates lpPathSpec by removing the drive or directory portion, or both, of the path and filename.
DlgDirList sends the LB_RESETCONTENT and LB_DIR messages to the list box.

See Also

DlgDirListComboBox, DlgDirSelectComboBoxEx, DlgDirSelectEx


Пригласи друзей и счет твоего мобильника всегда будет положительным!
Предыдущая статья
 
Сайт Народ.Ру Интернет
Следующая статья
Пригласи друзей и счет твоего мобильника всегда будет положительным!

DlgDirList



Функция DlgDirList заполняет определенному списку ящик именами всех файлов, сочетавшихся определенный путь или filename.

int DlgDirList(

HWND hDlg, // РУЧКА, чтобы общаться ящик с ящиком списка LPTSTR lpPathSpec, // указатель в путь или filename строка int nIDListBox, // идентификатор ящика списка int nIDStaticPath, // идентификатор статических атрибутов файла управления UINT uFileType //, чтобы отображаться
);


Параметры

hDlg

Идентифицирует диалоговый ящик, который содержит ящик списка.

lpPathSpec

Точки на недействительный расторгнутую строку, которые содержат путь или filename. DlgDirList МОДИФИЦИРУЕТ эту строку, которая должна быть длинный достаточно, чтобы содержать модификации. Более подробно об этом параметре, смотри секцию Замечаний.

nIDListBox

Определяет идентификатор ящика списка. Если этот параметр является нулем, DlgDirList допускает что никакой ящик списка не существует и не пытается заполнять один.

nIDStaticPath

Определяет идентификатор статического управления использованного для отображения текущего проезда и директория. Если этот параметр является нулем, DlgDirList допускает что никакое такое управление не представляет.

uFileType

Определяет атрибуты filenames, чтобы быть отображенн. Этот параметр должен быть одно или более из следующего величин:

Величина Description DDL_ARCHIVE Включает архивные файлы.
DDL_DIRECTORY Включает подкаталоги. Имена Subdirectory приложены в квадратных скобках ([ ]).
DDL_DRIVES Включает накопителей. Накопители указаны в форме [-x-], где x - письмо накопителя.
DDL_EXCLUSIVE Включает только файлы с определенными атрибутами. По умолчанию, прочитайте-файлы записи указаны даже если бы DDL_READWRITE не определен.
DDL_HIDDEN Включает скрытые файлы.
DDL_READONLY Включает только для чтения файлы.
DDL_READWRITE Включает прочитанная запись файлов без дополнительных атрибутов.
DDL_SYSTEM Включает системные файлы.
DDL_POSTMSGS Посылает сообщения в прикладную очередь сообщения. По умолчанию, DlgDirList посылает сообщения непосредственно диалоговому блоку процедуры.


Обратные Величины

Если листинг сделан U даже пустой листинг U обратная величина ненулевая. Если входная строка не содержит правильный путь поиска, обратная величина нулевая.

Замечания

Если Вы определяете нулевую длину строки для параметра lpPathSpec или если Вы определяете только имя директория без filename, строка будет изменена, чтобы *.* параметр lpPathSpec имеет следующее формы: [накопитель:] [[\u]directory[\idirectory]\u] [filename]
В этом примере, накопитель является письмом накопителя, директорий является правильным именем директория, и filename - правильный filename, что должно содержать по крайней мере один шаблон (? или *).

Если lpPathSpec включает накопителя или имя директория, или как, текущий накопитель так и директорий изменены определенному накопителю и директорию прежде, чем блок списка будет заполнен. Статическое управление идентифицированное параметром nIDStaticPath также скорректировано новым накопителем или именем директория, или обоими.
После того, как блок списка будет заполнен, коррекция DlgDirList lpPathSpec удаляя накопителя или часть директория, или как, пути так и filename.
DlgDirList ПОСЫЛАЕТ LB_RESETCONTENT и сообщения LB_DIR блоку списка.

Смотри Также

DlgDirListComboBox, DlgDirSelectComboBoxEx, DlgDirSelectEx


Вверх Version 1.3, Oct 26 2010 © 2007, 2010, mrhx Вверх
 mrhx software  Русский перевод OpenGL  Русский перевод Win32 API
 
Используются технологии uCoz