sprint 1-alpha
|
#include <CommonDialog.h>
Inherited by sprint::gtl::BrowseForFile.
Public Member Functions | |
OpenDlg () | |
Default constructor. | |
void | SetInstance (HINSTANCE inst) |
void | SetTitle (const char *title) |
void | SetFilter (const char *filter) |
void | SetDefaultExtension (const char *def) |
void | SetInitialDir (const char *dir) |
void | SetBuffer (char *filename, int lenght) |
const char * | GetFileName () const |
const char * | GetExtension () const |
int | GetFilterIndex () const |
Specifies the index of the currently selected filter in the File Types control. | |
bool | Open (HWND hparent, int flags=OFN_HIDEREADONLY|OFN_EXPLORER|OFN_FILEMUSTEXIST) |
bool | Save (HWND hparent, int flags=OFN_PATHMUSTEXIST|OFN_OVERWRITEPROMPT) |
Implements Save. |
File Save/Open Dialog
m_browse.SetTitle("Save File...");
bool sprint::gtl::OpenDlg::Open | ( | HWND | hparent, |
int | flags = OFN_HIDEREADONLY | OFN_EXPLORER | OFN_FILEMUSTEXIST |
||
) |
Implementes Open
if(m_browse.Open(hWnd)) {
}
void sprint::gtl::OpenDlg::SetDefaultExtension | ( | const char * | def | ) |
a pointer to a buffer that contains the default extension. GetOpenFileName and GetSaveFileName append this extension to the file name if the user fails to type an extension. This string can be any length, but only the first three characters are appended. The string should not contain a period. If this member is NULL and the user fails to type an extension, no extension is appended.
m_browse.SetDefaultExtension("png");
void sprint::gtl::OpenDlg::SetFilter | ( | const char * | filter | ) |
Zero separated filter <title1>\0<filter1>\0<title2>\0<filter2>\0 ... \0\0
m_browse.SetFilter("PNG Files (*.png)\0*.png\0\0\0");
void sprint::gtl::OpenDlg::SetInstance | ( | HINSTANCE | inst | ) |
Set the Instance for resource
void sprint::gtl::OpenDlg::SetTitle | ( | const char * | title | ) |
Set the Dialog title
m_browse.SetTitle("Save File...");