Annotation of mstools/h/commdlg.h, revision 1.1.1.2

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

unix.superglobalmegacorp.com

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