Author Topic: Microsoft Windows CommonDialog Flags and Show Methods  (Read 13279 times)

Rahul Gera

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 88
    • View Profile
Microsoft Windows CommonDialog Flags and Show Methods
« on: July 09, 2019, 04:11:02 PM »
var dialog = new ActiveXObject('MsComDlg.CommonDialog');
dialog.Flags=0x200|0x80000|0x800|0x4|0x200000

File Open/Save Dialog Box Flags:

Constant                                      Value                                            Description
cdlOFNReadOnly                             0x1                           Checks Read-Only check box for Open and Save As dialog boxes.
cdlOFNOverwritePrompt                 0x2                           Causes the Save As dialog box to generate a message box if the selected file already exists.
cdlOFNHideReadOnly                      0x4                           Hides the Read-Only check box.
cdlOFNNoChangeDir                       0x8                           Sets the current directory to what it was when the dialog box was invoked.
cdlOFNHelpButton                          0x10                         Causes the dialog box to display the Help button.
cdlOFNNoValidate                           0x100                       Allows invalid characters in the returned filename.
cdlOFNAllowMultiselect                   0x200                       Allows the File Name list box to have multiple selections.
cdlOFNExtensionDifferent               0x400                       The extension of the returned filename is different from the extension set by the DefaultExt property.
cdlOFNPathMustExist                      0x800                       User can enter only valid path names.
cdlOFNFileMustExist                        0x1000                     User can enter only names of existing files.
cdlOFNCreatePrompt                      0x2000                     Sets the dialog box to ask if the user wants to create a file that doesn't currently exist.
cdlOFNShareAware                         0x4000                     Sharing violation errors will be ignored.
cdlOFNNoReadOnlyReturn              0x8000                     The returned file doesn't have the Read-Only attribute set and won't be in a write-protected directory.
cdlOFNExplorer                               0x0008000               Use the Explorer-like Open A File dialog box template.  (Windows 95 only.)
cdlOFNNoDereferenceLinks            0x00100000              Do not dereference shortcuts (shell links) default, choosing a shortcut causes it to be dereferenced by the shell.  (Windows 95 only.)
cdlOFNLongNames                         0x00200000              Use Long filenames.  (Windows 95 only.)


Different Show Methods available for Common Dialog:
dialog.ShowOpen();     // Common Dialog Open Box
dialog.ShowSave();      // Common Dialog Save As window
dialog.ShowFont();       // Common Dialog Font window
dialog.ShowPrinter();    // Common Dialog Printer window
dialog.ShowColor();      // Common Dialog Color window
dialog.ShowHelp();       // Common Dialog Help window
« Last Edit: July 09, 2019, 04:48:08 PM by Rahul Gera »