API Reference > OdDb Classes > OdDbHostAppServices Class > OdDbHostAppServices Methods > OdDbHostAppServices::fileDialog Method
OdDbHostAppServices::fileDialog Method
Syntax
C++
virtual OdString fileDialog(int flags, const OdString& dialogCaption = OdString::kEmpty, const OdString& defExt = OdString::kEmpty, const OdString& defFilename = OdString::kEmpty, const OdString& filter = OdString::kEmpty);
Parameters 
Description 
int flags 
[in] Dialog behavior.  
const OdString& dialogCaption = OdString::kEmpty 
[in] Dialog caption.  
const OdString& defExt = OdString::kEmpty 
[in] Default file extension without "."  
const OdString& defFilename = OdString::kEmpty 
[in] Default filename.  
const OdString& filter = OdString::kEmpty 
[in] Filter pattern. 

Prompts the user for a filename, and returns their response. 

 

flags must be one of the following: 

 

Name 
Value 
Description 
kGfpForOpen 
For Open. 
kGfpForSave 
For Save. 
kGfpOverwritePrompt 
Enable overwrite prompt displaying when exist file selected for saving. 

 

This function is intended for the selection of filenames via dialog boxes, although other methods may be used. 

 

  • Returns "canceled" if the user cancels the request.
  • Returns "unsupported" if the application does not support this user input.

 

The default implementation of this function does nothing but return "unsupported".

Copyright © 2002–2020. Open Design Alliance. All rights reserved.