GetFDLogBox

 

Description

Open an FDLog dialog box having the enumerated type FDLogDialogType.

Syntax

int GetFDLogBox( StringArray & saFilePaths, FDLogDialogType fdtDialogType, BOOL bUseTemplate = FALSE, LPCSTR lpcszPath = NULL )

Parameters

saFilePaths
[output] Output vector of strings containing path and filename of all selected files
fdtDialogType
[input] Input type of dialog: FDLOG_TYPE_SAVE_AS, FDLOG_TYPE_OPEN_SINGLE, FDLOG_TYPE_OPEN_MULTISEL, and FDLOG_TYPE_MULTI_OPEN
bUseTemplate
[input] use Template or not
lpcszPath
[input]Initial path when dialog opens, default NULL uses FDLog tracking

Return

Returns the number of selected files. 0 if User Cancel

Examples

EX1

bool GetFDLogBox_ex1()
{
        init_fdlog_with_group_name("*.txt","c:\\","abc","please choose");
        
        StringArray saFileNames ;
        if(GetFDLogBox(saFileNames, FDLOG_TYPE_OPEN_SINGLE))
        {
                printf("user choose file:%s\n",saFileNames[0]);
                return TRUE;
                
        }
        else
        {
                printf("user cancel to choose\n");
                return FALSE;
        }
}

Remark

Open an FDLog dialog box having the enumerated type FDLogDialogType with possible values FDLOG_TYPE_SAVE_AS, FDLOG_TYPE_OPEN_SINGLE, FDLOG_TYPE_OPEN_MULTISEL, and FDLOG_TYPE_MULTI_OPEN.

Must use together with init_fdlog_with_group_name to setup LabTalk.FDlog first

See Also

header to Include

origin.h

Reference