uLib
User mode C/C++ extended API library for Win32 programmers.
|
#include <uLib/StdDlg.h>
Standard Directory selection dialog..
DirDialog encapsulates and enhances the shell's directory selection dialog.
The inherited lParam member is reserved for it's _Hook, so you must not use it.
pData is provided as a replacement field for your application to use.
Note: You should call InitShellFunc() before using DirDialog methods.
The constructor has no such limitation, so it can be used globally.
See also [MSDN] BROWSEINFO, SHBrowseForFolder()
Public Data | |
LPITEMIDLIST | pIdl |
TCHAR | Folder [MAX_PATH] |
PVOID | pData |
Static Public Attributes | |
static CCSTR | DefaultTitle |
static IFolderFilter * | FolderFilter = NULL |
Public Functions | |
DirDialog (HWND Owner=NULL, UINT Flags=(BIF_RETURNONLYFSDIRS|BIF_NEWDIALOGSTYLE|BIF_EDITBOX)) | |
void | SetOwner (HWND Owner) |
void | Done () |
~DirDialog () | |
bool | SetInitialDir (CSTR Dir) |
void | SetRoot (LPITEMIDLIST pidl) |
bool | SetRootCsid (int csId) |
bool | SetRootDir (CSTR Dir) |
bool | Execute () |
Static Protected Member Functions | |
static UINT_PTR CALLBACK | _Hook (HWND hwnd, UINT msg, LPARAM lp, LPARAM data) |
Protected Attributes | |
IFolderFilterSite * | pFilterSite |
DirDialog::DirDialog | ( | HWND | Owner = NULL , |
UINT | Flags = (BIF_RETURNONLYFSDIRS| BIF_NEWDIALOGSTYLE| BIF_EDITBOX) |
||
) |
Definition at line 406 of file StdDlg.cpp.
DirDialog::~DirDialog | ( | ) |
Definition at line 433 of file StdDlg.cpp.
void DirDialog::SetOwner | ( | HWND | Owner | ) |
Who should be notified...
Definition at line 462 of file StdDlg.cpp.
void DirDialog::Done | ( | ) |
Dispose of non-NULL PIDL members, et c...
Definition at line 438 of file StdDlg.cpp.
bool DirDialog::SetInitialDir | ( | CSTR | Dir | ) |
Set initially selected item.
Definition at line 467 of file StdDlg.cpp.
void DirDialog::SetRoot | ( | LPITEMIDLIST | pidl | ) |
Set root by PIDL. See [MSDN] BROWSEINFO::pidlRoot
Definition at line 479 of file StdDlg.cpp.
bool DirDialog::SetRootCsid | ( | int | csId | ) |
Set root by a CSIDL. See [MSDN] SHGetSpecialFolderLocation
Definition at line 485 of file StdDlg.cpp.
bool DirDialog::SetRootDir | ( | CSTR | Dir | ) |
Set root by a dir path. See GetPathNamePIDL
Definition at line 495 of file StdDlg.cpp.
bool DirDialog::Execute | ( | ) |
Execute the shell's directory selection dialog.
When Execute returns 'true', the selected directory is returned
in both Folder and pIdl, for the sake of convenience.
Definition at line 503 of file StdDlg.cpp.
|
staticprotected |
DirDialog's BFFCALLBACK function..
This is used to activate your (optional) FolderFilter, and to clean up at dialog's end.
NOTE: If you should need additional hook processing, you should call this
from your own hook function, and not use BROWSEINFO::lParam (use pData instead).
The hook function recieves a PDirDialog as it's data parameter.
Definition at line 520 of file StdDlg.cpp.
TCHAR DirDialog::Folder[MAX_PATH] |
PVOID DirDialog::pData |
|
static |
|
static |