На главную

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 | Скачать Вниз

DlgDirListComboBox



The DlgDirListComboBox function fills the specified combo box with a directory listing. It fills the list with the names of all files, drives, and subdirectories that match the specified attributes and path string.

int DlgDirListComboBox(

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


Parameters

hDlg

Identifies the dialog box that contains the combo box.

lpPathSpec

Points to a null-terminated string of the following form:
[drive:][\]][directory\[...]][filename]
If the specified string includes a drive or directory path, the DlgDirListComboBox function changes the current drive and directory before filling the list. After the list is filled, the drive and directory path are removed from the string specified by the lpPathSpec parameter.

nIDComboBox

Specifies the identifier of a combo box control in a dialog box. If nIDComboBox is zero, the DlgDirListComboBox function assumes no combo box exists and does not attempt to fill it.

nIDStaticPath

Specifies the identifier of the static text control in which the DlgDirListComboBox function is to display the current directory. If nIDStaticPath is zero, DlgDirListComboBox assumes no such control is present.

uFiletype

Specifies the attributes of the files to be displayed. It can be any combination of the following values:

Value Meaning
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, the DlgDirList function sends messages directly to the dialog box procedure.


Return Values

If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. For example, if the string specified by lpPathSpec is not a valid path, the function fails. To get extended error information, call GetLastError.

Remarks

If the lpszPathSpec parameter points to a zero-length string or to a string specifying a drive, directory, or both ѕ but no filename ѕ the filename *.* (wildcards) is assumed.

Windows NT:

The directory listing displays long filenames, if any.

Windows 95:

The directory listing displays short filenames (the 8.3 form). You can use the SHGetFileInfo or GetFullPathName functions to get the corresponding long filename.

See Also

DlgDirList, DlgDirSelectComboBoxEx, GetFullPathName, SHGetFileInfo


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

DlgDirListComboBox



Функция DlgDirListComboBox заполняет определенный combo ящик листингом директория. Это заполняет список именами всех файлов, управляет, и подкаталоги, которые соответствуют определенной строке атрибутов и пути.

int DlgDirListComboBox(

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


Параметры

hDlg

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

lpPathSpec

Точки на недействительный расторгнутую строку следующего формы: [накопитель:][\]][директорий\[...]][filename] Если определенная строка включает накопителя или пути директория, функциональные изменения DlgDirListComboBox текущий накопитель и директорий перед наполнителем списка. После того, как список будет заполнен, накопитель и путь директория удалены из строки определенной параметром lpPathSpec.

nIDComboBox

Определяет идентификатор управления блока combo в диалоговом блоке. Если nIDComboBox - нуль, функция DlgDirListComboBox принимается, никакой combo блок не существует и не пытается заполнять это.

nIDStaticPath

Определяет идентификатор статического текстового управления в котором функция DlgDirListComboBox должна отображать текущий директорий. Если nIDStaticPath - нуль, DlgDirListComboBox принимает что никакое такое управление не присутствует.

uFiletype

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

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


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

Если функция добивается успеха, обратная величина ненулевая.
Если функция терпит неудачу, обратная величина нулевая. Например, если строка определенная lpPathSpec - не правильный путь, функция терпит неудачу. Для того, чтобы расширять информацию ошибки, вызовите GetLastError.

Замечания

Если параметр lpszPathSpec указывает на нулевую длину строки или в строку, определяющую накопителя, директория, или оба U но никакой filename U filename *.* (шаблоны), приняты.

Windows NT:

Директорий, перечисляющий дисплеи длинных filenames, если имеется.

Windows 95:

Директорий, перечисляющий перемычку дисплеев filenames ( 8.3 форм). Вы можете использовать SHGetFileInfo или функции GetFullPathName, чтобы получать соответствующий длинный filename.

Смотри Также

DlgDirList, DlgDirSelectComboBoxEx, GetFullPathName, SHGetFileInfo


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