2 * Common Dialog Boxes interface (32 bit)
4 * Copyright 1998 Bertho A. Stultiens
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef _WINE_DLL_CDLG_H
22 #define _WINE_DLL_CDLG_H
25 #include "wine/windef16.h"
27 /* handle conversions */
28 #define HWND_16(h32) (LOWORD(h32))
29 #define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
31 /*---------------- 16-bit ----------------*/
32 extern HINSTANCE16 COMMDLG_hInstance
;
33 extern HINSTANCE COMMDLG_hInstance32
;
35 /*---------------- 32-bit ----------------*/
37 /* Common dialogs implementation globals */
38 #define COMDLG32_Atom ((ATOM)0xa000) /* MS uses this one to identify props */
40 extern HINSTANCE COMDLG32_hInstance
;
42 void COMDLG32_SetCommDlgExtendedError(DWORD err
);
43 LPVOID
COMDLG32_AllocMem(int size
);
47 /* Find/Replace local definitions */
49 #define FR_WINE_UNICODE 0x80000000
50 #define FR_WINE_REPLACE 0x40000000
53 FINDREPLACEA fr
; /* Internally used structure */
55 FINDREPLACEA
*fra
; /* Reference to the user supplied structure */
60 #define PD32_PRINT_TITLE 7000
62 #define PD32_VALUE_UREADABLE 1104
63 #define PD32_INVALID_PAGE_RANGE 1105
64 #define PD32_FROM_NOT_ABOVE_TO 1106
65 #define PD32_MARGINS_OVERLAP 1107
66 #define PD32_NR_OF_COPIES_EMPTY 1108
67 #define PD32_TOO_LARGE_COPIES 1109
68 #define PD32_PRINT_ERROR 1110
69 #define PD32_NO_DEFAULT_PRINTER 1111
70 #define PD32_CANT_FIND_PRINTER 1112
71 #define PD32_OUT_OF_MEMORY 1113
72 #define PD32_GENERIC_ERROR 1114
73 #define PD32_DRIVER_UNKNOWN 1115
75 #define PD32_PRINTER_STATUS_READY 1536
76 #define PD32_PRINTER_STATUS_PAUSED 1537
77 #define PD32_PRINTER_STATUS_ERROR 1538
78 #define PD32_PRINTER_STATUS_PENDING_DELETION 1539
79 #define PD32_PRINTER_STATUS_PAPER_JAM 1540
80 #define PD32_PRINTER_STATUS_PAPER_OUT 1541
81 #define PD32_PRINTER_STATUS_MANUAL_FEED 1542
82 #define PD32_PRINTER_STATUS_PAPER_PROBLEM 1543
83 #define PD32_PRINTER_STATUS_OFFLINE 1544
84 #define PD32_PRINTER_STATUS_IO_ACTIVE 1545
85 #define PD32_PRINTER_STATUS_BUSY 1546
86 #define PD32_PRINTER_STATUS_PRINTING 1547
87 #define PD32_PRINTER_STATUS_OUTPUT_BIN_FULL 1548
88 #define PD32_PRINTER_STATUS_NOT_AVAILABLE 1549
89 #define PD32_PRINTER_STATUS_WAITING 1550
90 #define PD32_PRINTER_STATUS_PROCESSING 1551
91 #define PD32_PRINTER_STATUS_INITIALIZING 1552
92 #define PD32_PRINTER_STATUS_WARMING_UP 1553
93 #define PD32_PRINTER_STATUS_TONER_LOW 1554
94 #define PD32_PRINTER_STATUS_NO_TONER 1555
95 #define PD32_PRINTER_STATUS_PAGE_PUNT 1556
96 #define PD32_PRINTER_STATUS_USER_INTERVENTION 1557
97 #define PD32_PRINTER_STATUS_OUT_OF_MEMORY 1558
98 #define PD32_PRINTER_STATUS_DOOR_OPEN 1559
99 #define PD32_PRINTER_STATUS_SERVER_UNKNOWN 1560
100 #define PD32_PRINTER_STATUS_POWER_SAVE 1561
102 #define PD32_DEFAULT_PRINTER 1582
103 #define PD32_NR_OF_DOCUMENTS_IN_QUEUE 1583
104 #define PD32_PRINT_ALL_X_PAGES 1584
105 #define PD32_MARGINS_IN_INCHES 1585
106 #define PD32_MARGINS_IN_MILIMETERS 1586
107 #define PD32_MILIMETERS 1587
109 #include "commctrl.h"
111 #include "shellapi.h"
115 extern LPITEMIDLIST (WINAPI
*COMDLG32_PIDL_ILClone
) (LPCITEMIDLIST
);
116 extern LPITEMIDLIST (WINAPI
*COMDLG32_PIDL_ILCombine
)(LPCITEMIDLIST
,LPCITEMIDLIST
);
117 extern LPITEMIDLIST (WINAPI
*COMDLG32_PIDL_ILGetNext
)(LPITEMIDLIST
);
118 extern BOOL (WINAPI
*COMDLG32_PIDL_ILRemoveLastID
)(LPCITEMIDLIST
);
119 extern BOOL (WINAPI
*COMDLG32_PIDL_ILIsEqual
)(LPCITEMIDLIST
, LPCITEMIDLIST
);
122 extern LPVOID (WINAPI
*COMDLG32_SHAlloc
)(DWORD
);
123 extern DWORD (WINAPI
*COMDLG32_SHFree
)(LPVOID
);
124 extern BOOL (WINAPI
*COMDLG32_SHGetFolderPathA
)(HWND
,int,HANDLE
,DWORD
,LPSTR
);
125 extern BOOL (WINAPI
*COMDLG32_SHGetFolderPathW
)(HWND
,int,HANDLE
,DWORD
,LPWSTR
);
127 extern BOOL WINAPI
GetFileDialog95A(LPOPENFILENAMEA ofn
,UINT iDlgType
);
128 extern BOOL WINAPI
GetFileDialog95W(LPOPENFILENAMEW ofn
,UINT iDlgType
);
132 #include "pshpack1.h"
134 typedef UINT16 (CALLBACK
*LPOFNHOOKPROC16
)(HWND16
,UINT16
,WPARAM16
,LPARAM
);
139 HINSTANCE16 hInstance
;
141 SEGPTR lpstrCustomFilter
;
142 DWORD nMaxCustFilter
;
146 SEGPTR lpstrFileTitle
;
148 SEGPTR lpstrInitialDir
;
152 UINT16 nFileExtension
;
155 LPOFNHOOKPROC16 lpfnHook
;
156 SEGPTR lpTemplateName
;
157 } OPENFILENAME16
,*LPOPENFILENAME16
;
159 typedef UINT16 (CALLBACK
*LPCCHOOKPROC16
) (HWND16
, UINT16
, WPARAM16
, LPARAM
);
169 LPCCHOOKPROC16 lpfnHook
;
170 SEGPTR lpTemplateName
;
172 typedef CHOOSECOLOR16
*LPCHOOSECOLOR16
;
174 typedef UINT16 (CALLBACK
*LPFRHOOKPROC16
)(HWND16
,UINT16
,WPARAM16
,LPARAM
);
176 DWORD lStructSize
; /* size of this struct 0x20 */
177 HWND16 hwndOwner
; /* handle to owner's window */
178 HINSTANCE16 hInstance
; /* instance handle of.EXE that */
179 /* contains cust. dlg. template */
180 DWORD Flags
; /* one or more of the FR_?? */
181 SEGPTR lpstrFindWhat
; /* ptr. to search string */
182 SEGPTR lpstrReplaceWith
; /* ptr. to replace string */
183 UINT16 wFindWhatLen
; /* size of find buffer */
184 UINT16 wReplaceWithLen
; /* size of replace buffer */
185 LPARAM lCustData
; /* data passed to hook fn. */
186 LPFRHOOKPROC16 lpfnHook
;
187 SEGPTR lpTemplateName
; /* custom template name */
188 } FINDREPLACE16
, *LPFINDREPLACE16
;
190 typedef UINT16 (CALLBACK
*LPCFHOOKPROC16
)(HWND16
,UINT16
,WPARAM16
,LPARAM
);
194 HWND16 hwndOwner
; /* caller's window handle */
195 HDC16 hDC
; /* printer DC/IC or NULL */
196 SEGPTR lpLogFont
; /* ptr. to a LOGFONT struct */
197 short iPointSize
; /* 10 * size in points of selected font */
198 DWORD Flags
; /* enum. type flags */
199 COLORREF rgbColors
; /* returned text color */
200 LPARAM lCustData
; /* data passed to hook fn. */
201 LPCFHOOKPROC16 lpfnHook
;
202 SEGPTR lpTemplateName
; /* custom template name */
203 HINSTANCE16 hInstance
; /* instance handle of.EXE that */
204 /* contains cust. dlg. template */
205 SEGPTR lpszStyle
; /* return the style field here */
206 /* must be LF_FACESIZE or bigger */
207 UINT16 nFontType
; /* same value reported to the */
208 /* EnumFonts callback with the */
209 /* extra FONTTYPE_ bits added */
210 short nSizeMin
; /* minimum pt size allowed & */
211 short nSizeMax
; /* max pt size allowed if */
212 /* CF_LIMITSIZE is used */
213 } CHOOSEFONT16
, *LPCHOOSEFONT16
;
216 typedef UINT16 (CALLBACK
*LPPRINTHOOKPROC16
) (HWND16
, UINT16
, WPARAM16
, LPARAM
);
217 typedef UINT16 (CALLBACK
*LPSETUPHOOKPROC16
) (HWND16
, UINT16
, WPARAM16
, LPARAM
);
231 HINSTANCE16 hInstance
;
233 LPPRINTHOOKPROC16 lpfnPrintHook
;
234 LPSETUPHOOKPROC16 lpfnSetupHook
;
235 SEGPTR lpPrintTemplateName
;
236 SEGPTR lpSetupTemplateName
;
237 HGLOBAL16 hPrintTemplate
;
238 HGLOBAL16 hSetupTemplate
;
239 } PRINTDLG16
, *LPPRINTDLG16
;
241 BOOL16 WINAPI
ChooseColor16(LPCHOOSECOLOR16 lpChCol
);
242 HWND16 WINAPI
FindText16( SEGPTR find
);
243 INT16 WINAPI
GetFileTitle16(LPCSTR lpFile
, LPSTR lpTitle
, UINT16 cbBuf
);
244 BOOL16 WINAPI
GetOpenFileName16(SEGPTR ofn
);
245 BOOL16 WINAPI
GetSaveFileName16(SEGPTR ofn
);
246 BOOL16 WINAPI
PrintDlg16( LPPRINTDLG16 print
);
247 HWND16 WINAPI
ReplaceText16( SEGPTR find
);
248 BOOL16 WINAPI
ChooseFont16(LPCHOOSEFONT16
);
252 #endif /* _WINE_DLL_CDLG_H */