|
|
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
53:
54: /* Return values for the registered message sent to the hook function
55: * when a sharing violation occurs. OFN_SHAREFALLTHROUGH allows the
56: * filename to be accepted, OFN_SHARENOWARN rejects the name but puts
57: * up no warning (returned when the app has already put up a warning
58: * message), and OFN_SHAREWARN puts up the default warning message
59: * for sharing violations.
60: *
61: * Note: Undefined return values map to OFN_SHAREWARN.
62: */
63: #define OFN_SHAREFALLTHROUGH 2
64: #define OFN_SHARENOWARN 1
65: #define OFN_SHAREWARN 0
66:
67: /* Avoids sharing violations. Defined 21 Jan 1991 clarkc */
68: #define SHARE_EXIST (OF_EXIST | OF_SHARE_DENY_NONE)
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: {
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 */
113: } FINDREPLACE;
114:
115: typedef FINDREPLACE FAR *LPFINDREPLACE;
116:
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
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: {
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. */
151: LPCFHOOKPROC lpfnHook; /* ptr. to hook function */
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
157: * must be LF_FACESIZE or bigger */
158: WORD nFontType; /* same value reported to the EnumFonts
159: * call back with the extra FONTTYPE_
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:
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
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
182: #define CF_NOSIMULATIONS 0x00001000L
183: #define CF_LIMITSIZE 0x00002000L
184: #define CF_FIXEDPITCHONLY 0x00004000L
185: #define CF_WYSIWYG 0x00008000L /* must also have CF_SCREENFONTS & CF_PRINTERFONTS */
186: #define CF_FORCEFONTEXIST 0x00010000L
187: #define CF_SCALABLEONLY 0x00020000L
188: #define CF_TTONLY 0x00040000L
189: #define CF_NOFACESEL 0x00080000L
190: #define CF_NOSTYLESEL 0x00100000L
191: #define CF_NOSIZESEL 0x00200000L
192:
193: /* these are extra nFontType bits that are added to what is returned to the
194: * EnumFonts callback routine */
195:
196: #define SIMULATED_FONTTYPE 0x8000
197: #define PRINTER_FONTTYPE 0x4000
198: #define SCREEN_FONTTYPE 0x2000
199: #define BOLD_FONTTYPE 0x0100
200: #define ITALIC_FONTTYPE 0x0200
201: #define REGULAR_FONTTYPE 0x0400
202:
203: #define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1)
204:
205:
206: /* strings used to obtain unique window message for communication
207: * between dialog and caller
208: */
209: #define LBSELCHSTRING "commdlg_LBSelChangedNotify"
210: #define SHAREVISTRING "commdlg_ShareViolation"
211: #define FINDMSGSTRING "commdlg_FindReplace"
212: #define HELPMSGSTRING "commdlg_help"
213:
214:
215: typedef int (APIENTRY *LPPRINTHOOKPROC) (HWND, UINT, DWORD, LONG);
216: typedef int (APIENTRY *LPSETUPHOOKPROC) (HWND, UINT, DWORD, LONG);
217:
218: typedef struct tagPD
219: {
220: DWORD lStructSize;
221: HWND hwndOwner;
222: HANDLE hDevMode;
223: HANDLE hDevNames;
224: HDC hDC;
225: DWORD Flags;
226: WORD nFromPage;
227: WORD nToPage;
228: WORD nMinPage;
229: WORD nMaxPage;
230: WORD nCopies;
231: HANDLE hInstance;
232: DWORD lCustData;
233: LPPRINTHOOKPROC lpfnPrintHook;
234: LPSETUPHOOKPROC lpfnSetupHook;
235: LPSTR lpPrintTemplateName;
236: LPSTR lpSetupTemplateName;
237: HANDLE hPrintTemplate;
238: HANDLE hSetupTemplate;
239: } PRINTDLG;
240: typedef PRINTDLG FAR * LPPRINTDLG;
241:
242: BOOL APIENTRY PrintDlg(LPPRINTDLG);
243:
244: #define PD_ALLPAGES 0x00000000
245: #define PD_SELECTION 0x00000001
246: #define PD_PAGENUMS 0x00000002
247: #define PD_NOSELECTION 0x00000004
248: #define PD_NOPAGENUMS 0x00000008
249: #define PD_COLLATE 0x00000010
250: #define PD_PRINTTOFILE 0x00000020
251: #define PD_PRINTSETUP 0x00000040
252: #define PD_NOWARNING 0x00000080
253: #define PD_RETURNDC 0x00000100
254: #define PD_RETURNIC 0x00000200
255: #define PD_RETURNDEFAULT 0x00000400
256: #define PD_SHOWHELP 0x00000800
257: #define PD_ENABLEPRINTHOOK 0x00001000
258: #define PD_ENABLESETUPHOOK 0x00002000
259: #define PD_ENABLEPRINTTEMPLATE 0x00004000
260: #define PD_ENABLESETUPTEMPLATE 0x00008000
261: #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
262: #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
263: #define PD_USEDEVMODECOPIES 0x00040000
264: #define PD_DISABLEPRINTTOFILE 0x00080000
265:
266: typedef struct tagDEVNAMES
267: {
268: WORD wDriverOffset;
269: WORD wDeviceOffset;
270: WORD wOutputOffset;
271: WORD wDefault;
272: } DEVNAMES;
273: typedef DEVNAMES FAR * LPDEVNAMES;
274:
275: #define DN_DEFAULTPRN 0x0001
276:
277:
278: DWORD APIENTRY CommDlgExtendedError(VOID);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.