(new in Rev4.00)
MQOpenFileDialog is a class for a selection of a file to be loaded. It inherits a MQFileDialogBase class.
Class | |
MQOpenFileDialog | Constructor |
~MQOpenFileDialog | Destructor |
Member functions | |
GetFileMustExist | Get whether only existing files can be selected or not |
SetFileMustExist | Set whether only existing files can be selected or not |
GetMultiSelect | Multiple selection |
SetMultiSelect | Multiple selection |
Execute | Open a file dialog |
GetFileNamesCount | Get a number of selected files |
GetFileNames | Get a filename for multiple selection |
MQOpenFileDialog::MQOpenFileDialog(MQWindowBase& parent);
It is a constructor.
virtual MQOpenFileDialog::~MQOpenFileDialog();
This method is a destructor. It is defined as a virtual function.
bool MQOpenFileDialogy::GetFileMustExist();
It returns whether to select existing files and directories only.
void MQOpenFileDialog::SetFileMustExist(bool val) const;
It specifies whether to select existing files and directories only.
When false is specified, it can select a new file that does not exist yet by inputting a filename directly.
bool MQOpenFileDialog::GetMultiSelect();
It returns whether multiple files can be selected or not.
void MQOpenFileDialog::SetMultiSelect(bool val);
It specifies whether multiple files can be selected or not.
When true is specified, not GetFileName() but GetFileName() is used to get a filename.
bool MQOpenFileDialog::Execute();
It opens a file dialog to input a filename for a user.
It returns 'true' when the user inputted a filename, and it returns 'false' when the user canceled. When true is returned, the filename(s) can be got by MQFileDialogBase::GetFileName() or GetFileNames().
bool MQOpenFileDialog::GetFileNamesCount();
It returns a number of files selected byExecute() when the multiple selection is valid.
std::wstring MQOpenFileDialog::GetFileNames(int index);
It returns a filename selected by Execute() in a full path when the multiple selection is valid.