122 static int CALLBACK BrowseCallbackProc(HWND hwnd, UINT msg, LPARAM lParam, LPARAM lpData);
124 BROWSEINFO mBrowseInfo;
125 CString mInitialFolder;
126 CString mSelectedFolder;
127 TCHAR mDisplayName[MAX_PATH];
128 TCHAR mPath[MAX_PATH];
void EnableOK(BOOL enable)
Enable or disable the OK button.
CFolderDialog(LPCTSTR initialFolder, UINT flags, CWnd *parent)
Prepare the dialogue.
virtual void OnSelChanged(LPITEMIDLIST pidl)
Record a new selection.
virtual int DoModal()
Show the dialogue.
void SetSelection(LPCTSTR path)
Select a folder by path.
void SetStatusText(LPCTSTR text)
Show text above the folder tree.
void SetSelection(LPCITEMIDLIST pidl)
Select a folder by item.
virtual void OnBrowseMessage(HWND hwnd, UINT msg, LPARAM lParam)
Dispatch a message from the dialogue.
virtual void OnInitialized()
Select the initial folder once the dialogue is open.
CString GetSelectedFolder()
Report the chosen folder, or the initial folder when none was chosen.
CString ShortenPath(const CString &path)
Shorten a path to fit the status text: its first 35 characters and an ellipsis.