您的位置:首页 > 其它

CommonDialog Control Constants

2005-10-13 14:46 148 查看

File Open/Save Dialog Box Flags

ConstantValueDescription
cdlOFNAllowMultiselect&H200Specifies that the File Name list box allows multiple selections.
The user can select more than one file at run time by pressing the SHIFT key and using the UP ARROW and DOWN ARROW keys to select the desired files. When this is done, the FileName property returns a string containing the names of all selected files. The names in the string are delimited by spaces.

cdlOFNCreatePrompt&H2000Specifies that the dialog box prompts the user to create a file that doesn't currently exist. This flag automatically sets the cdlOFNPathMustExist and cdlOFNFileMustExist flags.
cdlOFNExplorer&H80000Use the Explorer-like Open A File dialog box template. Common dialogs that use this flag do not work under Windows NT using the Windows 95 shell.
CdlOFNExtensionDifferent&H400Indicates that the extension of the returned filename is different from the extension specified by the DefaultExt property. This flag isn't set if the DefaultExt property is Null, if the extensions match, or if the file has no extension. This flag value can be checked upon closing the dialog box.
cdlOFNFileMustExist&H1000Specifies that the user can enter only names of existing files in the File Name text box. If this flag is set and the user enters an invalid filename, a warning is displayed. This flag automatically sets the cdlOFNPathMustExist flag.
cdlOFNHelpButton&H10Causes the dialog box to display the Help button.
cdlOFNHideReadOnly&H4Hides the Read Only check box.
cdlOFNLongNames&H200000Use long filenames.
cdlOFNNoChangeDir&H8Forces the dialog box to set the current directory to what it was when the dialog box was opened.
CdlOFNNoDereferenceLinks&H100000Do not dereference shell links (also known as shortcuts). By default, choosing a shell link causes it to be dereferenced by the shell.
cdlOFNNoLongNames&H40000Do not use long file names.
CdlOFNNoReadOnlyReturn&H8000 Specifies that the returned file won't have the Read Only attribute set and won't be in a write-protected directory.
cdlOFNNoValidate&H100Specifies that the common dialog box allows invalid characters in the returned filename.
cdlOFNOverwritePrompt&H2Causes the Save As dialog box to generate a message box if the selected file already exists. The user must confirm whether to overwrite the file.
cdlOFNPathMustExist&H800Specifies that the user can enter only valid paths. If this flag is set and the user enters an invalid path, a warning message is displayed.
cdlOFNReadOnly&H1Causes the Read Only check box to be initially checked when the dialog box is created. This flag also indicates the state of the Read Only check box when the dialog box is closed.
CdlOFNShareAware&H4000Specifies that sharing violation errors will be ignored.

Color Dialog Box Flags

ConstantValueDescription
cdlCCFullOpen&H2Entire dialog box is displayed, including the Define Custom Colors section
cdlCCShowHelp&H8Causes the dialog box to display a Help button
cdlCCPreventFullOpen&H4Disables the Define Custom Colors command button and prevents the user from defining custom colors
cdlCCRGBInit&H1Sets the initial color value for the dialog box

Fonts Dialog Box Flags

ConstantValueDescription
cdlCFANSIOnly&H400Specifies that the dialog box allows only a selection of the fonts that use the Windows character set. If this flag is set, the user won't be able to select a font that contains only symbols.
cdlCFApply&H200Enables the Apply button on the dialog box.
cdlCFBoth&H3Causes the dialog box to list the available printer and screen fonts. The hDC property identifies the device context associated with the printer.
cdlCFEffects&H100Specifies that the dialog box enables strikethrough, underline, and color effects.
cdlCFFixedPitchOnly&H4000Specifies that the dialog box selects only fixed-pitch fonts.
cdlCFForceFontExist&H10000Specifies that an error message box is displayed if the user attempts to select a font or style that doesn't exist.
cdlCFHelpButton&H4Causes the dialog box to display a Help button.
cdlCFLimitSize&H2000Specifies that the dialog box selects only font sizes within the range specified by the Min and Max properties.
cdlCFNoFaceSel&H80000No font name selected.
cdlCFNoSimulations&H1000Specifies that the dialog box doesn't allow graphic device interface (GDI) font simulations.
cdlCFNoSizeSel&H200000No font size selected.
cdlCFNoStyleSel&H100000No style was selected.
cdlCFNoVectorFonts&H800Specifies that the dialog box doesn't allow vector-font selections.
cdlCFPrinterFonts&H2Causes the dialog box to list only the fonts supported by the printer, specified by the hDC property.
cdlCFScalableOnly&H20000Specifies that the dialog box allows only the selection of fonts that can be scaled.
cdlCFScreenFonts&H1Causes the dialog box to list only the screen fonts supported by the system.
cdlCFTTOnly&H40000Specifies that the dialog box allows only the selection of TrueType fonts.
cdlCFWYSIWYG&H8000Specifies that the dialog box allows only the selection of fonts that are available on both the printer and on screen. If this flag is set, the cdlCFBoth and cdlCFScalableOnly flags should also be set.

Printer Dialog Box Flags

ConstantValueDescription
cdlPDAllPages&H0Returns or sets the state of the All Pages option button.
cdlPDCollate&H10Returns or sets the state of the Collate check box.
cdlPDDisablePrintToFile&H80000Disables the Print To File check box.
cdlPDHelpButton&H800Causes the dialog box to display the Help button.
cdlPDHidePrintToFile&H100000Hides the Print To File check box.
cdlPDNoPageNums&H8Disables the Pages option button and the associated edit control.
cdlPDNoSelection&H4Disables the Selection option button.
cdlPDNoWarning&H80Prevents a warning message from being displayed when there is no default printer.
cdlPDPageNums&H2Returns or sets the state of the Pages option button.
cdlPDPrintSetup&H40Causes the system to display the Print Setup dialog box rather than the Print dialog box.
cdlPDPrintToFile&H20Returns or sets the state of the Print To File check box.
cdlPDReturnDC&H100Returns a device context for the printer selection made in the dialog box. The device context is returned in the dialog box's hDC property.
cdlPDReturnDefault&H400Returns default printer name.
cdlPDReturnIC&H200Returns an information context for the printer selection made in the dialog box. An information context provides a fast way to get information about the device without creating a device context. The information context is returned in the dialog box's hDC property.
cdlPDSelection&H1Returns or sets the state of the Selection option button. If neither cdlPDPageNums nor cdlPDSelection is specified, the All option button is in the selected state.
cdlPDUseDevModeCopies&H40000If a printer driver doesn't support multiple copies, setting this flag disables the copies edit control. If a driver does support multiple copies, setting this flag indicates that the dialog box stores the requested number of copies in the Copies property.

Help Constants

ConstantValueDescription
cdlHelpCommandHelp&H102Displays Help for a particular command
cdlHelpContents&H3Displays the contents topic in the current Help file
cdlHelpContext&H1Displays Help for a particular topic
cdlHelpContextPopup&H8Displays a topic identified by a context number
cdlHelpForceFile&H9Creates a Help file that displays text in only one font
cdlHelpHelpOnHelp&H4Displays Help for using the Help application itself
cdlHelpIndex&H3Displays the index of the specified Help file
cdlHelpKey&H101Displays Help for a particular keyword
cdlHelpPartialKey&H105Calls the search engine in Windows Help
cdlHelpQuit&H2Notifies the Help application that the specified Help file is no longer in use
cdlHelpSetContents&H5Designates a specific topic as the contents topic
cdlHelpSetIndex&H5Sets the current index for multi-index Help
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: