9#if !defined(OWL_OPENSAVE_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
134 LPCTSTR filter =
nullptr,
135 LPTSTR customFilter =
nullptr,
136 LPCTSTR initialDir =
nullptr,
137 LPCTSTR defExt =
nullptr,
145 LPTSTR customFilter =
nullptr,
146 LPCTSTR initialDir =
nullptr,
147 LPCTSTR defExt =
nullptr,
157 void SetFilter(LPCTSTR filter =
nullptr);
163 auto GetFileNames() const -> std::vector<
tstring>;
169 LPCTSTR title =
nullptr,
180 static
int GetFileTitle(LPCTSTR fileName, LPTSTR fileTitle,
207 void SetOFN(const OPENFILENAME& _ofn);
225 static const
uint ShareViMsgId;
269 LPCTSTR title =
nullptr,
316 LPCTSTR title =
nullptr,
350 return ::GetFileTitle(fileName,
nullptr, 0);
360 return ::GetFileTitle(fileName, fileTitle,
static_cast<WORD
>(fileTitleLen));
TCommonDialog(TWindow *parent, LPCTSTR title=nullptr, TModule *module=nullptr)
Invokes a TWindow constructor, passing the parent window parent, and constructs a common dialog box t...
int DoExecute()
Creates the TFileOpenDialog object.
TFileOpenDialog(TWindow *parent, TData &data, TResId templateId=0, LPCTSTR title=nullptr, TModule *module=nullptr)
Constructs and initializes the TFileOpen object based on information in the TOpenSaveDialog::TData da...
int DoExecute()
Creates the TFileSaveDialog object.
TFileSaveDialog(TWindow *parent, TData &data, TResId templateId=0, LPCTSTR title=nullptr, TModule *module=nullptr)
Constructs and initializes the TFileOpen object based on the TOpenSaveDialog::TData structure,...
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TOpenSaveDialog structure contains information about the user's file open or save selection.
TCHAR * FileName
Holds the name of the file to be saved or opened.
TData(uint32 flags=0, LPCTSTR filter=nullptr, TCHAR *customFilter=nullptr, LPCTSTR initialDir=nullptr, LPCTSTR defExt=nullptr, int maxPath=0, int filterIndex=0, uint32 flagsEx=0)
Constructs a TOpenSaveDialog::TData structure.
int FilterIndex
FilterIndex indicates which filter to use initially when displaying file names.
void SetFilter(const tstring &filter)
LPCTSTR InitialDir
Directory to use initially when displaying file names.
uint32 Flags
Flag contains one or more of the following constants:
TCHAR * Filter
Filter holds the filter to use initially when displaying file names.
uint32 Error
This is the return value from calling CommDlgExtendedError after executing the dialog in the implemen...
LPCTSTR DefExt
Default extension to use when saving file names.
void SetFilter(LPCTSTR filter=nullptr)
Makes a copy of the filter list used to display the file names.
void CmLbSelChanged()
Indicates that the selection state of the file name list box in the GetOpenFileName or GetSaveFileNam...
TOpenSaveDialog(TWindow *parent, TData &data, TResId templateId=0, LPCTSTR title=nullptr, TModule *module=nullptr)
void CmOk()
Responds to a click on the dialog box's OK button (with the identifier IDOK).
auto DoExecute() -> int override=0
auto DialogFunction(TMsgId, TParam1, TParam2) -> INT_PTR override
Handles CDN_SHAREVIOLATION and the older SHAREVISTRING registered message.
virtual int ShareViolation()
If a sharing violation occurs when a file is opened or saved, ShareViolation is called to obtain a re...
void SetOFN(const OPENFILENAME &_ofn)
Sets the OPENFILENAME structure for the dialog.
TData & GetData()
Retrieves the transfer buffer for the dialog.
OPENFILENAME & GetOFN()
Returns the OPENFILENAME structure.
static int GetFileTitleLen(LPCTSTR fileName)
Returns the title length of the dialog.
static uint GetShareViMsgId()
Returns the sharing violation message ID.
void Init(TResId templateId)
Initializes a TOpenSaveDialog object with the current resource ID.
static int GetFileTitle(LPCTSTR fileName, TCHAR *fileTitle, int bufLen)
Returns the title of the dialog.
void SetData(TData &data)
Sets the transfer buffer for the dialog.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
TResult DefaultProcessing()
Handles default processing of events, which includes continued processing of menu/accelerators comman...
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Base class for writing streamable objects.
Definition of Common Dialog abstract base class.
Object Windows Library (OWLNext Core).
UINT TMsgId
Message ID type.
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.