wavelength 1.0.0
Loading...
Searching...
No Matches
CFolderDialog Class Reference

Shell dialogue that picks a folder, showing the current selection as its status text. More...

#include <FolderDialog.h>

Public Member Functions

 CFolderDialog (LPCTSTR initialFolder, UINT flags, CWnd *parent)
 Prepare the dialogue.
virtual ~CFolderDialog ()
virtual int DoModal ()
 Show the dialogue.
CString GetSelectedFolder ()
 Report the chosen folder, or the initial folder when none was chosen.

Protected Member Functions

virtual void OnInitialized ()
 Select the initial folder once the dialogue is open.
virtual void OnSelChanged (LPITEMIDLIST pidl)
 Record a new selection.
virtual void OnBrowseMessage (HWND hwnd, UINT msg, LPARAM lParam)
 Dispatch a message from the dialogue.
void EnableOK (BOOL enable)
 Enable or disable the OK button.
void SetSelection (LPCTSTR path)
 Select a folder by path.
void SetSelection (LPCITEMIDLIST pidl)
 Select a folder by item.
void SetStatusText (LPCTSTR text)
 Show text above the folder tree.
CString ShortenPath (const CString &path)
 Shorten a path to fit the status text: its first 35 characters and an ellipsis.

Detailed Description

Shell dialogue that picks a folder, showing the current selection as its status text.

The object is 0x238 bytes. The class has a virtual table but no RTTI, so the names of its members are inferred.

Constructor & Destructor Documentation

◆ CFolderDialog()

CFolderDialog::CFolderDialog ( LPCTSTR initialFolder,
UINT flags,
CWnd * parent )

Prepare the dialogue.

Parameters
initialFolderThe folder selected first, or null for none.
flagsThe BIF_ flags. BIF_STATUSTEXT is always added.
parentThe owner window, or null.
Ghidra address:
0x10001000

◆ ~CFolderDialog()

virtual CFolderDialog::~CFolderDialog ( )
virtual
Ghidra address:
0x10001121

Member Function Documentation

◆ DoModal()

virtual int CFolderDialog::DoModal ( )
virtual

Show the dialogue.

Returns
IDOK when a folder with a file system path was chosen, otherwise IDCANCEL.
Ghidra address:
0x100011c3

◆ GetSelectedFolder()

CString CFolderDialog::GetSelectedFolder ( )

Report the chosen folder, or the initial folder when none was chosen.

Returns
The folder.
Ghidra address:
0x10001272

◆ OnInitialized()

virtual void CFolderDialog::OnInitialized ( )
protectedvirtual

Select the initial folder once the dialogue is open.

Ghidra address:
0x1000142a

◆ OnSelChanged()

virtual void CFolderDialog::OnSelChanged ( LPITEMIDLIST pidl)
protectedvirtual

Record a new selection.

Parameters
pidlThe selected item.
Ghidra address:
0x100014ad

◆ OnBrowseMessage()

virtual void CFolderDialog::OnBrowseMessage ( HWND hwnd,
UINT msg,
LPARAM lParam )
protectedvirtual

Dispatch a message from the dialogue.

Parameters
hwndThe dialogue.
msgThe BFFM_ message.
lParamThe message's argument.
Ghidra address:
0x10001178

◆ EnableOK()

void CFolderDialog::EnableOK ( BOOL enable)
protected

Enable or disable the OK button.

Parameters
enableWhether to enable it.
Ghidra address:
0x100012a3

◆ SetSelection() [1/2]

void CFolderDialog::SetSelection ( LPCTSTR path)
protected

Select a folder by path.

Parameters
pathThe folder.
Ghidra address:
0x100012d1

◆ SetSelection() [2/2]

void CFolderDialog::SetSelection ( LPCITEMIDLIST pidl)
protected

Select a folder by item.

Parameters
pidlThe folder.
Ghidra address:
0x100012f9

◆ SetStatusText()

void CFolderDialog::SetStatusText ( LPCTSTR text)
protected

Show text above the folder tree.

Parameters
textThe text.
Ghidra address:
0x10001321

◆ ShortenPath()

CString CFolderDialog::ShortenPath ( const CString & path)
protected

Shorten a path to fit the status text: its first 35 characters and an ellipsis.

Parameters
pathThe path.
Returns
The path, shortened when longer than 35 characters.
Ghidra address:
0x10001349

The documentation for this class was generated from the following file: