Annotation of mstools/mfc/include/commdlg.h, revision 1.1.1.1

1.1       root        1: /*---------------------------------------------------------------------------
                      2:  *  commdlg.h -- Common dialog definitions.
                      3:  *---------------------------------------------------------------------------
                      4:  */
                      5: 
                      6: #ifndef _COMMDLG_INCLUDED_
                      7: #define _COMMDLG_INCLUDED_
                      8: 
                      9: typedef UINT (APIENTRY *LPOFNHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
                     10: 
                     11: typedef struct tagOFN
                     12:     {
                     13:     DWORD   lStructSize;
                     14:     HWND    hwndOwner;
                     15:     HINSTANCE hInstance;
                     16:     LPCSTR   lpstrFilter;
                     17:     LPSTR   lpstrCustomFilter;
                     18:     DWORD   nMaxCustFilter;
                     19:     DWORD   nFilterIndex;
                     20:     LPSTR   lpstrFile;
                     21:     DWORD   nMaxFile;
                     22:     LPSTR   lpstrFileTitle;
                     23:     DWORD   nMaxFileTitle;
                     24:     LPCSTR   lpstrInitialDir;
                     25:     LPCSTR   lpstrTitle;
                     26:     DWORD   Flags;
                     27:     WORD    nFileOffset;
                     28:     WORD    nFileExtension;
                     29:     LPCSTR   lpstrDefExt;
                     30:     DWORD   lCustData;
                     31:     LPOFNHOOKPROC lpfnHook;
                     32:     LPCSTR   lpTemplateName;
                     33:     }   OPENFILENAME;
                     34: typedef OPENFILENAME  FAR * LPOPENFILENAME;
                     35: 
                     36: BOOL  APIENTRY     GetOpenFileName(LPOPENFILENAME);
                     37: BOOL  APIENTRY     GetSaveFileName(LPOPENFILENAME);
                     38: short APIENTRY     GetFileTitle(LPSTR, LPSTR, WORD);
                     39: 
                     40: #define OFN_READONLY                 0x00000001
                     41: #define OFN_OVERWRITEPROMPT          0x00000002
                     42: #define OFN_HIDEREADONLY             0x00000004
                     43: #define OFN_NOCHANGEDIR              0x00000008
                     44: #define OFN_SHOWHELP                 0x00000010
                     45: #define OFN_ENABLEHOOK               0x00000020
                     46: #define OFN_ENABLETEMPLATE           0x00000040
                     47: #define OFN_ENABLETEMPLATEHANDLE     0x00000080
                     48: #define OFN_NOVALIDATE               0x00000100
                     49: #define OFN_ALLOWMULTISELECT         0x00000200
                     50: #define OFN_EXTENSIONDIFFERENT       0x00000400
                     51: #define OFN_PATHMUSTEXIST            0x00000800
                     52: #define OFN_FILEMUSTEXIST            0x00001000
                     53: #define OFN_CREATEPROMPT             0x00002000
                     54: #define OFN_SHAREAWARE               0x00004000
                     55: #define OFN_NOREADONLYRETURN         0x00008000
                     56: #define OFN_NOTESTFILECREATE         0x00010000
                     57: 
                     58: /* Return values for the registered message sent to the hook function
                     59:  * when a sharing violation occurs.  OFN_SHAREFALLTHROUGH allows the
                     60:  * filename to be accepted, OFN_SHARENOWARN rejects the name but puts
                     61:  * up no warning (returned when the app has already put up a warning
                     62:  * message), and OFN_SHAREWARN puts up the default warning message
                     63:  * for sharing violations.
                     64:  *
                     65:  * Note:  Undefined return values map to OFN_SHAREWARN, but are
                     66:  *        reserved for future use.
                     67:  */
                     68: 
                     69: #define OFN_SHAREFALLTHROUGH     2
                     70: #define OFN_SHARENOWARN          1
                     71: #define OFN_SHAREWARN            0
                     72: 
                     73: typedef UINT (APIENTRY *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
                     74: 
                     75: typedef struct
                     76:   {
                     77:     DWORD   lStructSize;
                     78:     HWND    hwndOwner;
                     79:     HWND    hInstance;
                     80:     DWORD   rgbResult;
                     81:     LPDWORD lpCustColors;
                     82:     DWORD   Flags;
                     83:     DWORD   lCustData;
                     84:     LPCCHOOKPROC lpfnHook;
                     85:     LPCSTR   lpTemplateName;
                     86:   } CHOOSECOLOR;
                     87: typedef CHOOSECOLOR FAR *LPCHOOSECOLOR;
                     88: 
                     89: BOOL  APIENTRY ChooseColor(LPCHOOSECOLOR);
                     90: 
                     91: #define CC_RGBINIT               0x00000001
                     92: #define CC_FULLOPEN              0x00000002
                     93: #define CC_PREVENTFULLOPEN       0x00000004
                     94: #define CC_SHOWHELP              0x00000008
                     95: #define CC_ENABLEHOOK            0x00000010
                     96: #define CC_ENABLETEMPLATE        0x00000020
                     97: #define CC_ENABLETEMPLATEHANDLE  0x00000040
                     98: 
                     99: typedef UINT (APIENTRY *LPFRHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
                    100: 
                    101: typedef struct
                    102:   {
                    103:         DWORD    lStructSize;            /* size of this struct 0x20 */
                    104:         HWND     hwndOwner;                  /* handle to owner's window */
                    105:         HINSTANCE   hInstance;                  /* instance handle of.EXE that
                    106:                                                       * contains cust. dlg. template
                    107:                                                       */
                    108:         DWORD    Flags;                      /* one or more of the FR_?? */
                    109:         LPSTR    lpstrFindWhat;          /* ptr. to search string    */
                    110:         LPSTR    lpstrReplaceWith;       /* ptr. to replace string   */
                    111:         WORD     wFindWhatLen;           /* size of find buffer      */
                    112:         WORD     wReplaceWithLen;        /* size of replace buffer   */
                    113:         DWORD    lCustData;                  /* data passed to hook fn.  */
                    114:         LPFRHOOKPROC lpfnHook;       /* ptr. to hook fn. or NULL */
                    115:         LPCSTR    lpTemplateName;         /* custom template name     */
                    116:   } FINDREPLACE;
                    117: 
                    118: typedef FINDREPLACE FAR *LPFINDREPLACE;
                    119: 
                    120: #define FR_DOWN                         0x00000001
                    121: #define FR_WHOLEWORD            0x00000002
                    122: #define FR_MATCHCASE            0x00000004
                    123: #define FR_FINDNEXT                     0x00000008
                    124: #define FR_REPLACE                      0x00000010
                    125: #define FR_REPLACEALL           0x00000020
                    126: #define FR_DIALOGTERM           0x00000040
                    127: #define FR_SHOWHELP                     0x00000080
                    128: #define FR_ENABLEHOOK           0x00000100
                    129: #define FR_ENABLETEMPLATE       0x00000200
                    130: #define FR_NOUPDOWN                     0x00000400
                    131: #define FR_NOMATCHCASE          0x00000800
                    132: #define FR_NOWHOLEWORD          0x00001000
                    133: #define FR_ENABLETEMPLATEHANDLE         0x00002000
                    134: #define FR_HIDEUPDOWN       0x00004000
                    135: #define FR_HIDEMATCHCASE    0x00008000
                    136: #define FR_HIDEWHOLEWORD    0x00010000
                    137: 
                    138: 
                    139: HWND  APIENTRY    FindText(LPFINDREPLACE);
                    140: HWND  APIENTRY    ReplaceText(LPFINDREPLACE);
                    141: 
                    142: typedef UINT (APIENTRY *LPCFHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
                    143: 
                    144: typedef struct
                    145:   {
                    146:     DWORD           lStructSize;        /* */
                    147:     HWND            hwndOwner;          /* caller's window handle   */
                    148:     HDC             hDC;                    /* printer DC/IC or NULL    */
                    149:     LPLOGFONT       lpLogFont;  /* ptr. to a LOGFONT struct */
                    150:     int             iPointSize;         /* 10 * size in points of selected font */
                    151:     DWORD           Flags;              /* enum. type flags         */
                    152:     DWORD           rgbColors;          /* returned text color      */
                    153:     DWORD           lCustData;          /* data passed to hook fn.  */
                    154:     LPCFHOOKPROC lpfnHook;      /* ptr. to hook function    */
                    155:     LPCSTR           lpTemplateName;     /* custom template name     */
                    156:     HINSTANCE       hInstance;          /* instance handle of.EXE that
                    157:                                                  * contains cust. dlg. template
                    158:                                                  */
                    159:     LPSTR       lpszStyle;      /* return the style field here
                    160:                                  * must be LF_FACESIZE or bigger */
                    161:     WORD        nFontType;      /* same value reported to the EnumFonts
                    162:                                  * call back with the extra FONTTYPE_
                    163:                                  * bits added */
                    164:     int         nSizeMin;       /* minimum pt size allowed & */
                    165:     int         nSizeMax;       /* max pt size allowed if    */
                    166:                                 /* CF_LIMITSIZE is used      */
                    167:   } CHOOSEFONT;
                    168:  typedef CHOOSEFONT FAR *LPCHOOSEFONT;
                    169: 
                    170: BOOL APIENTRY ChooseFont(LPCHOOSEFONT);
                    171: 
                    172: #define CF_SCREENFONTS                 0x00000001
                    173: #define CF_PRINTERFONTS                0x00000002
                    174: #define CF_BOTH                      (CF_SCREENFONTS | CF_PRINTERFONTS)
                    175: #define CF_SHOWHELP                        0x00000004L
                    176: #define CF_ENABLEHOOK                  0x00000008L
                    177: #define CF_ENABLETEMPLATE              0x00000010L
                    178: #define CF_ENABLETEMPLATEHANDLE    0x00000020L
                    179: #define CF_INITTOLOGFONTSTRUCT     0x00000040L
                    180: #define CF_USESTYLE                0x00000080L
                    181: #define CF_EFFECTS                 0x00000100L
                    182: #define CF_APPLY                   0x00000200L
                    183: #define CF_ANSIONLY                0x00000400L
                    184: #define CF_NOVECTORFONTS           0x00000800L
                    185: #define CF_NOOEMFONTS                 CF_NOVECTORFONTS
                    186: #define CF_NOSIMULATIONS           0x00001000L
                    187: #define CF_LIMITSIZE               0x00002000L
                    188: #define CF_FIXEDPITCHONLY          0x00004000L
                    189: #define CF_WYSIWYG                 0x00008000L /* must also have CF_SCREENFONTS & CF_PRINTERFONTS */
                    190: #define CF_FORCEFONTEXIST          0x00010000L
                    191: #define CF_SCALABLEONLY            0x00020000L
                    192: #define CF_TTONLY                  0x00040000L
                    193: #define CF_NOFACESEL               0x00080000L
                    194: #define CF_NOSTYLESEL              0x00100000L
                    195: #define CF_NOSIZESEL               0x00200000L
                    196: 
                    197: /* these are extra nFontType bits that are added to what is returned to the
                    198:  * EnumFonts callback routine */
                    199: 
                    200: #define SIMULATED_FONTTYPE    0x8000
                    201: #define PRINTER_FONTTYPE      0x4000
                    202: #define SCREEN_FONTTYPE       0x2000
                    203: #define BOLD_FONTTYPE         0x0100
                    204: #define ITALIC_FONTTYPE       0x0200
                    205: #define REGULAR_FONTTYPE      0x0400
                    206: 
                    207: #define WM_CHOOSEFONT_GETLOGFONT      (WM_USER + 1)
                    208: 
                    209: 
                    210: /* strings used to obtain unique window message for communication
                    211:  * between dialog and caller
                    212:  */
                    213: #define LBSELCHSTRING  "commdlg_LBSelChangedNotify"
                    214: #define SHAREVISTRING  "commdlg_ShareViolation"
                    215: #define FILEOKSTRING   "commdlg_FileNameOK"
                    216: #define COLOROKSTRING  "commdlg_ColorOK"
                    217: #define SETRGBSTRING   "commdlg_SetRGBColor"
                    218: #define FINDMSGSTRING  "commdlg_FindReplace"
                    219: #define HELPMSGSTRING  "commdlg_help"
                    220: 
                    221: /* HIWORD values for lParam of commdlg_LBSelChangeNotify message */
                    222: #define CD_LBSELNOITEMS -1
                    223: #define CD_LBSELCHANGE   0
                    224: #define CD_LBSELSUB      1
                    225: #define CD_LBSELADD      2
                    226: 
                    227: typedef UINT (APIENTRY *LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
                    228: typedef UINT (APIENTRY *LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
                    229: 
                    230: typedef struct tagPD
                    231:     {
                    232:     DWORD   lStructSize;
                    233:     HWND    hwndOwner;
                    234:     HANDLE  hDevMode;
                    235:     HANDLE  hDevNames;
                    236:     HDC     hDC;
                    237:     DWORD   Flags;
                    238:     WORD    nFromPage;
                    239:     WORD    nToPage;
                    240:     WORD    nMinPage;
                    241:     WORD    nMaxPage;
                    242:     WORD    nCopies;
                    243:     HINSTANCE  hInstance;
                    244:     DWORD   lCustData;
                    245:     LPPRINTHOOKPROC lpfnPrintHook;
                    246:     LPSETUPHOOKPROC lpfnSetupHook;
                    247:     LPCSTR   lpPrintTemplateName;
                    248:     LPCSTR   lpSetupTemplateName;
                    249:     HANDLE  hPrintTemplate;
                    250:     HANDLE  hSetupTemplate;
                    251:     }   PRINTDLG;
                    252: typedef PRINTDLG  FAR * LPPRINTDLG;
                    253: 
                    254: BOOL  APIENTRY     PrintDlg(LPPRINTDLG);
                    255: 
                    256: #define PD_ALLPAGES                  0x00000000
                    257: #define PD_SELECTION                 0x00000001
                    258: #define PD_PAGENUMS                  0x00000002
                    259: #define PD_NOSELECTION               0x00000004
                    260: #define PD_NOPAGENUMS                0x00000008
                    261: #define PD_COLLATE                   0x00000010
                    262: #define PD_PRINTTOFILE               0x00000020
                    263: #define PD_PRINTSETUP                0x00000040
                    264: #define PD_NOWARNING                 0x00000080
                    265: #define PD_RETURNDC                  0x00000100
                    266: #define PD_RETURNIC                  0x00000200
                    267: #define PD_RETURNDEFAULT             0x00000400
                    268: #define PD_SHOWHELP                  0x00000800
                    269: #define PD_ENABLEPRINTHOOK           0x00001000
                    270: #define PD_ENABLESETUPHOOK           0x00002000
                    271: #define PD_ENABLEPRINTTEMPLATE       0x00004000
                    272: #define PD_ENABLESETUPTEMPLATE       0x00008000
                    273: #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
                    274: #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
                    275: #define PD_USEDEVMODECOPIES          0x00040000
                    276: #define PD_DISABLEPRINTTOFILE        0x00080000
                    277: #define PD_HIDEPRINTTOFILE           0x00100000
                    278: 
                    279: typedef struct tagDEVNAMES
                    280:     {
                    281:     WORD wDriverOffset;
                    282:     WORD wDeviceOffset;
                    283:     WORD wOutputOffset;
                    284:     WORD wDefault;
                    285:     }   DEVNAMES;
                    286: typedef DEVNAMES  FAR * LPDEVNAMES;
                    287: 
                    288: #define DN_DEFAULTPRN      0x0001
                    289: 
                    290: 
                    291: DWORD APIENTRY     CommDlgExtendedError(VOID);
                    292: 
                    293: 
                    294: #endif // _COMMDLG_INCLUDED_

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.