2.1.27.13 get_open_box_by_file_group


Description

Show a file open dialog using the specified settings.

Syntax

int get_open_box_by_file_group( string & strFile, LPCSTR lpcszGroup, LPCSTR lpcszTitle = NULL, DWORD dwFlags = 0, LPCSTR lpcszDefaultPath = NULL, LPCSTR lpcszDefaultFilename = NULL, LPCSTR lpcszCheckBoxName = NULL, int * lpnCheckBoxState = NULL, LPCSTR lpcszFuncName = NULL )

Parameters

strFile
[output] user selected file names separated by "\r\n"
lpcszGroup
[input] name of file extension group
lpcszTitle
[input] optional dialog title
dwFlags
[input] see OPENBOX_FLAG_* constants
lpcszDefaultPath
[input] default path, NULL will use default path of file extension group, empty will use last used path
lpcszDefaultFilename
[input] default file name
lpcszCheckBoxName
[input] optional check box label
lpnCheckBoxState
[input/output] state of optional check box
lpcszFuncName
[input] optional registry key name to save check box state, if NULL use last XF name

Return

Number of files selected by user.

Examples

EX1

int get_open_box_by_file_group_Ex1()
{
    string    strFiles;
    LPCSTR    strGroup = "CodeBuilder";// the same file group as in Code Builder file dialog
    LPCSTR    strTitle = "OpenFileDlg";
    DWORD    dwFlags = OPENBOX_FLAG_MULTIFILES | OPENBOX_FLAG_USETEMPLATE; //allow multiple files selection and show template column on dialog
    LPCSTR    strDefaultPath = ""; //empty, will use last used path as default path
    
    get_open_box_by_file_group( strFiles, strGroup, strTitle, dwFlags, strDefaultPath);
    out_str( "Files selected :\n" + strFiles );
    return 0;
}

Remark

See Also

get_saveas_box_by_file_group

Header to Include

origin.h

Reference