commdlg.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  1. /*
  2. * COMMDLG - Common Wine Dialog ... :-)
  3. *
  4. * Copyright (C) the Wine project
  5. *
  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.
  10. *
  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.
  15. *
  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
  19. */
  20. #ifndef __WINE_COMMDLG_H
  21. #define __WINE_COMMDLG_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #include <prsht.h>
  26. #include <pshpack1.h>
  27. #ifndef SNDMSG
  28. #ifdef __cplusplus
  29. #define SNDMSG ::SendMessage
  30. #else /* __cplusplus */
  31. #define SNDMSG SendMessage
  32. #endif /* __cplusplus */
  33. #endif /* SNDMSG */
  34. #define OFN_READONLY 0x00000001
  35. #define OFN_OVERWRITEPROMPT 0x00000002
  36. #define OFN_HIDEREADONLY 0x00000004
  37. #define OFN_NOCHANGEDIR 0x00000008
  38. #define OFN_SHOWHELP 0x00000010
  39. #define OFN_ENABLEHOOK 0x00000020
  40. #define OFN_ENABLETEMPLATE 0x00000040
  41. #define OFN_ENABLETEMPLATEHANDLE 0x00000080
  42. #define OFN_NOVALIDATE 0x00000100
  43. #define OFN_ALLOWMULTISELECT 0x00000200
  44. #define OFN_EXTENSIONDIFFERENT 0x00000400
  45. #define OFN_PATHMUSTEXIST 0x00000800
  46. #define OFN_FILEMUSTEXIST 0x00001000
  47. #define OFN_CREATEPROMPT 0x00002000
  48. #define OFN_SHAREAWARE 0x00004000
  49. #define OFN_NOREADONLYRETURN 0x00008000
  50. #define OFN_NOTESTFILECREATE 0x00010000
  51. #define OFN_NONETWORKBUTTON 0x00020000
  52. #define OFN_NOLONGNAMES 0x00040000
  53. #define OFN_EXPLORER 0x00080000
  54. #define OFN_NODEREFERENCELINKS 0x00100000
  55. #define OFN_LONGNAMES 0x00200000
  56. #define OFN_ENABLEINCLUDENOTIFY 0x00400000
  57. #define OFN_ENABLESIZING 0x00800000
  58. #define OFN_DONTADDTORECENT 0x02000000
  59. #define OFN_FORCESHOWHIDDEN 0x10000000
  60. #define OFN_SHAREFALLTHROUGH 2
  61. #define OFN_SHARENOWARN 1
  62. #define OFN_SHAREWARN 0
  63. #define SAVE_DIALOG 1
  64. #define OPEN_DIALOG 2
  65. typedef UINT (CALLBACK *LPOFNHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
  66. typedef struct tagOFNA {
  67. DWORD lStructSize;
  68. HWND hwndOwner;
  69. HINSTANCE hInstance;
  70. LPCSTR lpstrFilter;
  71. LPSTR lpstrCustomFilter;
  72. DWORD nMaxCustFilter;
  73. DWORD nFilterIndex;
  74. LPSTR lpstrFile;
  75. DWORD nMaxFile;
  76. LPSTR lpstrFileTitle;
  77. DWORD nMaxFileTitle;
  78. LPCSTR lpstrInitialDir;
  79. LPCSTR lpstrTitle;
  80. DWORD Flags;
  81. WORD nFileOffset;
  82. WORD nFileExtension;
  83. LPCSTR lpstrDefExt;
  84. LPARAM lCustData;
  85. LPOFNHOOKPROC lpfnHook;
  86. LPCSTR lpTemplateName;
  87. } OPENFILENAMEA,*LPOPENFILENAMEA;
  88. typedef struct tagOFNW {
  89. DWORD lStructSize;
  90. HWND hwndOwner;
  91. HINSTANCE hInstance;
  92. LPCWSTR lpstrFilter;
  93. LPWSTR lpstrCustomFilter;
  94. DWORD nMaxCustFilter;
  95. DWORD nFilterIndex;
  96. LPWSTR lpstrFile;
  97. DWORD nMaxFile;
  98. LPWSTR lpstrFileTitle;
  99. DWORD nMaxFileTitle;
  100. LPCWSTR lpstrInitialDir;
  101. LPCWSTR lpstrTitle;
  102. DWORD Flags;
  103. WORD nFileOffset;
  104. WORD nFileExtension;
  105. LPCWSTR lpstrDefExt;
  106. LPARAM lCustData;
  107. LPOFNHOOKPROC lpfnHook;
  108. LPCWSTR lpTemplateName;
  109. } OPENFILENAMEW,*LPOPENFILENAMEW;
  110. DECL_WINELIB_TYPE_AW(OPENFILENAME)
  111. DECL_WINELIB_TYPE_AW(LPOPENFILENAME)
  112. #ifndef CDSIZEOF_STRUCT
  113. #define CDSIZEOF_STRUCT(type,field) ((int)&(((type *)0)->field) + sizeof(((type*)0)->field))
  114. #endif
  115. #define OPENFILENAME_SIZE_VERSION_400A CDSIZEOF_STRUCT(OPENFILENAMEA,lpTemplateName)
  116. #define OPENFILENAME_SIZE_VERSION_400W CDSIZEOF_STRUCT(OPENFILENAMEW,lpTemplateName)
  117. #define OPENFILENAME_SIZE_VERSION_400 WINELIB_NAME_AW(OPENFILENAME_SIZE_VERSION_400)
  118. typedef struct
  119. {
  120. NMHDR hdr;
  121. LPOPENFILENAMEA lpOFN;
  122. LPSTR pszFile;
  123. } OFNOTIFYA, *LPOFNOTIFYA;
  124. typedef struct
  125. {
  126. NMHDR hdr;
  127. LPOPENFILENAMEW lpOFN;
  128. LPWSTR pszFile;
  129. } OFNOTIFYW, *LPOFNOTIFYW;
  130. DECL_WINELIB_TYPE_AW(OFNOTIFY)
  131. DECL_WINELIB_TYPE_AW(LPOFNOTIFY)
  132. typedef UINT (CALLBACK *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  133. typedef struct {
  134. DWORD lStructSize;
  135. HWND hwndOwner;
  136. HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
  137. DWORD rgbResult;
  138. LPDWORD lpCustColors;
  139. DWORD Flags;
  140. DWORD lCustData;
  141. LPCCHOOKPROC lpfnHook;
  142. LPCSTR lpTemplateName;
  143. } CHOOSECOLORA;
  144. typedef CHOOSECOLORA *LPCHOOSECOLORA;
  145. typedef struct {
  146. DWORD lStructSize;
  147. HWND hwndOwner;
  148. HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
  149. DWORD rgbResult;
  150. LPDWORD lpCustColors;
  151. DWORD Flags;
  152. DWORD lCustData;
  153. LPCCHOOKPROC lpfnHook;
  154. LPCWSTR lpTemplateName;
  155. } CHOOSECOLORW;
  156. typedef CHOOSECOLORW *LPCHOOSECOLORW;
  157. DECL_WINELIB_TYPE_AW(CHOOSECOLOR)
  158. DECL_WINELIB_TYPE_AW(LPCHOOSECOLOR)
  159. #define CC_RGBINIT 0x00000001
  160. #define CC_FULLOPEN 0x00000002
  161. #define CC_PREVENTFULLOPEN 0x00000004
  162. #define CC_SHOWHELP 0x00000008
  163. #define CC_ENABLEHOOK 0x00000010
  164. #define CC_ENABLETEMPLATE 0x00000020
  165. #define CC_ENABLETEMPLATEHANDLE 0x00000040
  166. #define CC_SOLIDCOLOR 0x00000080
  167. #define CC_ANYCOLOR 0x00000100
  168. typedef UINT (CALLBACK *LPFRHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
  169. typedef struct {
  170. DWORD lStructSize;
  171. HWND hwndOwner;
  172. HINSTANCE hInstance;
  173. DWORD Flags;
  174. LPSTR lpstrFindWhat;
  175. LPSTR lpstrReplaceWith;
  176. WORD wFindWhatLen;
  177. WORD wReplaceWithLen;
  178. LPARAM lCustData;
  179. LPFRHOOKPROC lpfnHook;
  180. LPCSTR lpTemplateName;
  181. } FINDREPLACEA, *LPFINDREPLACEA;
  182. typedef struct {
  183. DWORD lStructSize;
  184. HWND hwndOwner;
  185. HINSTANCE hInstance;
  186. DWORD Flags;
  187. LPWSTR lpstrFindWhat;
  188. LPWSTR lpstrReplaceWith;
  189. WORD wFindWhatLen;
  190. WORD wReplaceWithLen;
  191. LPARAM lCustData;
  192. LPFRHOOKPROC lpfnHook;
  193. LPCWSTR lpTemplateName;
  194. } FINDREPLACEW, *LPFINDREPLACEW;
  195. DECL_WINELIB_TYPE_AW(FINDREPLACE)
  196. DECL_WINELIB_TYPE_AW(LPFINDREPLACE)
  197. #define FR_DOWN 0x00000001
  198. #define FR_WHOLEWORD 0x00000002
  199. #define FR_MATCHCASE 0x00000004
  200. #define FR_FINDNEXT 0x00000008
  201. #define FR_REPLACE 0x00000010
  202. #define FR_REPLACEALL 0x00000020
  203. #define FR_DIALOGTERM 0x00000040
  204. #define FR_SHOWHELP 0x00000080
  205. #define FR_ENABLEHOOK 0x00000100
  206. #define FR_ENABLETEMPLATE 0x00000200
  207. #define FR_NOUPDOWN 0x00000400
  208. #define FR_NOMATCHCASE 0x00000800
  209. #define FR_NOWHOLEWORD 0x00001000
  210. #define FR_ENABLETEMPLATEHANDLE 0x00002000
  211. #define FR_HIDEUPDOWN 0x00004000
  212. #define FR_HIDEMATCHCASE 0x00008000
  213. #define FR_HIDEWHOLEWORD 0x00010000
  214. #define FR_MATCHDIAC 0x20000000
  215. #define FR_MATCHKASHIDA 0x40000000
  216. #define FR_MATCHALEFHAMZA 0x80000000
  217. typedef UINT (CALLBACK *LPCFHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
  218. typedef struct tagCHOOSEFONTA
  219. {
  220. UINT lStructSize;
  221. HWND hwndOwner;
  222. HDC hDC;
  223. LPLOGFONTA lpLogFont;
  224. INT iPointSize;
  225. DWORD Flags;
  226. COLORREF rgbColors;
  227. LPARAM lCustData;
  228. LPCFHOOKPROC lpfnHook;
  229. LPCSTR lpTemplateName;
  230. HINSTANCE hInstance;
  231. LPSTR lpszStyle;
  232. WORD nFontType;
  233. WORD ___MISSING_ALIGNMENT__;
  234. INT nSizeMin;
  235. INT nSizeMax;
  236. } CHOOSEFONTA, *LPCHOOSEFONTA;
  237. typedef struct tagCHOOSEFONTW
  238. {
  239. UINT lStructSize;
  240. HWND hwndOwner;
  241. HDC hDC;
  242. LPLOGFONTW lpLogFont;
  243. INT iPointSize;
  244. DWORD Flags;
  245. COLORREF rgbColors;
  246. LPARAM lCustData;
  247. LPCFHOOKPROC lpfnHook;
  248. LPCWSTR lpTemplateName;
  249. HINSTANCE hInstance;
  250. LPWSTR lpszStyle;
  251. WORD nFontType;
  252. WORD ___MISSING_ALIGNMENT__;
  253. INT nSizeMin;
  254. INT nSizeMax;
  255. } CHOOSEFONTW, *LPCHOOSEFONTW;
  256. DECL_WINELIB_TYPE_AW(CHOOSEFONT)
  257. DECL_WINELIB_TYPE_AW(LPCHOOSEFONT)
  258. #define CF_SCREENFONTS 0x00000001
  259. #define CF_PRINTERFONTS 0x00000002
  260. #define CF_BOTH (CF_SCREENFONTS | CF_PRINTERFONTS)
  261. #define CF_SHOWHELP 0x00000004L
  262. #define CF_ENABLEHOOK 0x00000008L
  263. #define CF_ENABLETEMPLATE 0x00000010L
  264. #define CF_ENABLETEMPLATEHANDLE 0x00000020L
  265. #define CF_INITTOLOGFONTSTRUCT 0x00000040L
  266. #define CF_USESTYLE 0x00000080L
  267. #define CF_EFFECTS 0x00000100L
  268. #define CF_APPLY 0x00000200L
  269. #define CF_ANSIONLY 0x00000400L
  270. #define CF_SCRIPTSONLY CF_ANSIONLY
  271. #define CF_NOVECTORFONTS 0x00000800L
  272. #define CF_NOOEMFONTS CF_NOVECTORFONTS
  273. #define CF_NOSIMULATIONS 0x00001000L
  274. #define CF_LIMITSIZE 0x00002000L
  275. #define CF_FIXEDPITCHONLY 0x00004000L
  276. #define CF_WYSIWYG 0x00008000L /* use with CF_SCREENFONTS & CF_PRINTERFONTS */
  277. #define CF_FORCEFONTEXIST 0x00010000L
  278. #define CF_SCALABLEONLY 0x00020000L
  279. #define CF_TTONLY 0x00040000L
  280. #define CF_NOFACESEL 0x00080000L
  281. #define CF_NOSTYLESEL 0x00100000L
  282. #define CF_NOSIZESEL 0x00200000L
  283. #define CF_SELECTSCRIPT 0x00400000L
  284. #define CF_NOSCRIPTSEL 0x00800000L
  285. #define CF_NOVERTFONTS 0x01000000L
  286. #define SIMULATED_FONTTYPE 0x8000
  287. #define PRINTER_FONTTYPE 0x4000
  288. #define SCREEN_FONTTYPE 0x2000
  289. #define BOLD_FONTTYPE 0x0100
  290. #define ITALIC_FONTTYPE 0x0200
  291. #define REGULAR_FONTTYPE 0x0400
  292. #define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1)
  293. #define WM_CHOOSEFONT_SETLOGFONT (WM_USER + 101)
  294. #define WM_CHOOSEFONT_SETFLAGS (WM_USER + 102)
  295. #define LBSELCHSTRINGA "commdlg_LBSelChangedNotify"
  296. #if defined(__GNUC__)
  297. # define LBSELCHSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
  298. 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 }
  299. #elif defined(_MSC_VER)
  300. # define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify"
  301. #else
  302. static const WCHAR LBSELCHSTRINGW[] = { 'c','o','m','m','d','l','g','_',
  303. 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 };
  304. #endif
  305. #define LBSELCHSTRING WINELIB_NAME_AW(LBSELCHSTRING)
  306. #define SHAREVISTRINGA "commdlg_ShareViolation"
  307. #if defined(__GNUC__)
  308. # define SHAREVISTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
  309. 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 }
  310. #elif defined(_MSC_VER)
  311. # define SHAREVISTRINGW L"commdlg_ShareViolation"
  312. #else
  313. static const WCHAR SHAREVISTRINGW[] = { 'c','o','m','m','d','l','g','_',
  314. 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 };
  315. #endif
  316. #define SHAREVISTRING WINELIB_NAME_AW(SHAREVISTRING)
  317. #define FILEOKSTRINGA "commdlg_FileNameOK"
  318. #if defined(__GNUC__)
  319. # define FILEOKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
  320. 'F','i','l','e','N','a','m','e','O','K',0 }
  321. #elif defined(_MSC_VER)
  322. # define FILEOKSTRINGW L"commdlg_FileNameOK"
  323. #else
  324. static const WCHAR FILEOKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
  325. 'F','i','l','e','N','a','m','e','O','K',0 };
  326. #endif
  327. #define FILEOKSTRING WINELIB_NAME_AW(FILEOKSTRING)
  328. #define COLOROKSTRINGA "commdlg_ColorOK"
  329. #if defined(__GNUC__)
  330. # define COLOROKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
  331. 'C','o','l','o','r','O','K',0 }
  332. #elif defined(_MSC_VER)
  333. # define COLOROKSTRINGW L"commdlg_ColorOK"
  334. #else
  335. static const WCHAR COLOROKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
  336. 'C','o','l','o','r','O','K',0 };
  337. #endif
  338. #define COLOROKSTRING WINELIB_NAME_AW(COLOROKSTRING)
  339. #define SETRGBSTRINGA "commdlg_SetRGBColor"
  340. #if defined(__GNUC__)
  341. # define SETRGBSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
  342. 'S','e','t','R','G','B','C','o','l','o','r',0 }
  343. #elif defined(_MSC_VER)
  344. # define SETRGBSTRINGW L"commdlg_SetRGBColor"
  345. #else
  346. static const WCHAR SETRGBSTRINGW[] = { 'c','o','m','m','d','l','g','_',
  347. 'S','e','t','R','G','B','C','o','l','o','r',0 };
  348. #endif
  349. #define SETRGBSTRING WINELIB_NAME_AW(SETRGBSTRING)
  350. #define FINDMSGSTRINGA "commdlg_FindReplace"
  351. #if defined(__GNUC__)
  352. # define FINDMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
  353. 'F','i','n','d','R','e','p','l','a','c','e',0 }
  354. #elif defined(_MSC_VER)
  355. # define FINDMSGSTRINGW L"commdlg_FindReplace"
  356. #else
  357. static const WCHAR FINDMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
  358. 'F','i','n','d','R','e','p','l','a','c','e',0 };
  359. #endif
  360. #define FINDMSGSTRING WINELIB_NAME_AW(FINDMSGSTRING)
  361. #define HELPMSGSTRINGA "commdlg_help"
  362. #if defined(__GNUC__)
  363. # define HELPMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
  364. 'H','e','l','p',0 }
  365. #elif defined(_MSC_VER)
  366. # define HELPMSGSTRINGW L"commdlg_help"
  367. #else
  368. static const WCHAR HELPMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
  369. 'H','e','l','p',0 };
  370. #endif
  371. #define HELPMSGSTRING WINELIB_NAME_AW(HELPMSGSTRING)
  372. #define CD_LBSELNOITEMS -1
  373. #define CD_LBSELCHANGE 0
  374. #define CD_LBSELSUB 1
  375. #define CD_LBSELADD 2
  376. #define CDN_FIRST (0U-601U)
  377. #define CDN_LAST (0U-699U)
  378. #define CDN_INITDONE (CDN_FIRST - 0x0000)
  379. #define CDN_SELCHANGE (CDN_FIRST - 0x0001)
  380. #define CDN_FOLDERCHANGE (CDN_FIRST - 0x0002)
  381. #define CDN_SHAREVIOLATION (CDN_FIRST - 0x0003)
  382. #define CDN_HELP (CDN_FIRST - 0x0004)
  383. #define CDN_FILEOK (CDN_FIRST - 0x0005)
  384. #define CDN_TYPECHANGE (CDN_FIRST - 0x0006)
  385. #define CDM_FIRST (WM_USER + 100)
  386. #define CDM_LAST (WM_USER + 200)
  387. #define CDM_GETSPEC (CDM_FIRST + 0x0000)
  388. #define CDM_GETFILEPATH (CDM_FIRST + 0x0001)
  389. #define CDM_GETFOLDERPATH (CDM_FIRST + 0x0002)
  390. #define CDM_GETFOLDERLIST (CDM_FIRST + 0x0003)
  391. #define CDM_SETCONTROLTEXT (CDM_FIRST + 0x0004)
  392. #define CDM_HIDECONTROL (CDM_FIRST + 0x0005)
  393. #define CDM_SETDEFEXT (CDM_FIRST + 0x0006)
  394. /* Messages to query information from the open or save dialogs */
  395. #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
  396. (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
  397. #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
  398. (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
  399. #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
  400. #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
  401. (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
  402. #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
  403. (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
  404. #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
  405. #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
  406. (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
  407. #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
  408. (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
  409. #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
  410. #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
  411. (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
  412. #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
  413. (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
  414. #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
  415. (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
  416. #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
  417. (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
  418. #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
  419. (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
  420. #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
  421. (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
  422. #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
  423. #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
  424. (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
  425. #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
  426. (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
  427. #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
  428. #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
  429. (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
  430. #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
  431. (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
  432. #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
  433. #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
  434. (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
  435. #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
  436. (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
  437. #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
  438. (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
  439. #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
  440. (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
  441. typedef UINT (CALLBACK *LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  442. typedef UINT (CALLBACK *LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  443. typedef struct tagPDA
  444. {
  445. DWORD lStructSize;
  446. HWND hwndOwner;
  447. HGLOBAL hDevMode;
  448. HGLOBAL hDevNames;
  449. HDC hDC;
  450. DWORD Flags;
  451. WORD nFromPage;
  452. WORD nToPage;
  453. WORD nMinPage;
  454. WORD nMaxPage;
  455. WORD nCopies;
  456. HINSTANCE hInstance;
  457. LPARAM lCustData;
  458. LPPRINTHOOKPROC lpfnPrintHook;
  459. LPSETUPHOOKPROC lpfnSetupHook;
  460. LPCSTR lpPrintTemplateName;
  461. LPCSTR lpSetupTemplateName;
  462. HGLOBAL hPrintTemplate;
  463. HGLOBAL hSetupTemplate;
  464. } PRINTDLGA, *LPPRINTDLGA;
  465. typedef struct tagPDW
  466. {
  467. DWORD lStructSize;
  468. HWND hwndOwner;
  469. HGLOBAL hDevMode;
  470. HGLOBAL hDevNames;
  471. HDC hDC;
  472. DWORD Flags;
  473. WORD nFromPage;
  474. WORD nToPage;
  475. WORD nMinPage;
  476. WORD nMaxPage;
  477. WORD nCopies;
  478. HINSTANCE hInstance;
  479. LPARAM lCustData;
  480. LPPRINTHOOKPROC lpfnPrintHook;
  481. LPSETUPHOOKPROC lpfnSetupHook;
  482. LPCWSTR lpPrintTemplateName;
  483. LPCWSTR lpSetupTemplateName;
  484. HGLOBAL hPrintTemplate;
  485. HGLOBAL hSetupTemplate;
  486. } PRINTDLGW, *LPPRINTDLGW;
  487. DECL_WINELIB_TYPE_AW(PRINTDLG)
  488. DECL_WINELIB_TYPE_AW(LPPRINTDLG)
  489. #define PD_ALLPAGES 0x00000000
  490. #define PD_SELECTION 0x00000001
  491. #define PD_PAGENUMS 0x00000002
  492. #define PD_NOSELECTION 0x00000004
  493. #define PD_NOPAGENUMS 0x00000008
  494. #define PD_COLLATE 0x00000010
  495. #define PD_PRINTTOFILE 0x00000020
  496. #define PD_PRINTSETUP 0x00000040
  497. #define PD_NOWARNING 0x00000080
  498. #define PD_RETURNDC 0x00000100
  499. #define PD_RETURNIC 0x00000200
  500. #define PD_RETURNDEFAULT 0x00000400
  501. #define PD_SHOWHELP 0x00000800
  502. #define PD_ENABLEPRINTHOOK 0x00001000
  503. #define PD_ENABLESETUPHOOK 0x00002000
  504. #define PD_ENABLEPRINTTEMPLATE 0x00004000
  505. #define PD_ENABLESETUPTEMPLATE 0x00008000
  506. #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
  507. #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
  508. #define PD_USEDEVMODECOPIES 0x00040000
  509. #define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
  510. #define PD_DISABLEPRINTTOFILE 0x00080000
  511. #define PD_HIDEPRINTTOFILE 0x00100000
  512. #define PD_NONETWORKBUTTON 0x00200000
  513. typedef struct
  514. {
  515. WORD wDriverOffset;
  516. WORD wDeviceOffset;
  517. WORD wOutputOffset;
  518. WORD wDefault;
  519. } DEVNAMES;
  520. typedef DEVNAMES * LPDEVNAMES;
  521. #define DN_DEFAULTPRN 0x0001
  522. /* PageSetupDlg stuff ... */
  523. #define WM_PSD_PAGESETUPDLG (WM_USER )
  524. #define WM_PSD_FULLPAGERECT (WM_USER+1)
  525. #define WM_PSD_MINMARGINRECT (WM_USER+2)
  526. #define WM_PSD_MARGINRECT (WM_USER+3)
  527. #define WM_PSD_GREEKTEXTRECT (WM_USER+4)
  528. #define WM_PSD_ENVSTAMPRECT (WM_USER+5)
  529. #define WM_PSD_YAFULLPAGERECT (WM_USER+6)
  530. typedef UINT (CALLBACK *LPPAGEPAINTHOOK)( HWND, UINT, WPARAM, LPARAM );
  531. typedef UINT (CALLBACK *LPPAGESETUPHOOK)( HWND, UINT, WPARAM, LPARAM );
  532. typedef struct tagPSDA
  533. {
  534. DWORD lStructSize;
  535. HWND hwndOwner;
  536. HGLOBAL hDevMode;
  537. HGLOBAL hDevNames;
  538. DWORD Flags;
  539. POINT ptPaperSize;
  540. RECT rtMinMargin;
  541. RECT rtMargin;
  542. HINSTANCE hInstance;
  543. LPARAM lCustData;
  544. LPPAGESETUPHOOK lpfnPageSetupHook;
  545. LPPAGEPAINTHOOK lpfnPagePaintHook;
  546. LPCSTR lpPageSetupTemplateName;
  547. HGLOBAL hPageSetupTemplate;
  548. } PAGESETUPDLGA,*LPPAGESETUPDLGA;
  549. typedef struct tagPSDW
  550. {
  551. DWORD lStructSize;
  552. HWND hwndOwner;
  553. HGLOBAL hDevMode;
  554. HGLOBAL hDevNames;
  555. DWORD Flags;
  556. POINT ptPaperSize;
  557. RECT rtMinMargin;
  558. RECT rtMargin;
  559. HINSTANCE hInstance;
  560. LPARAM lCustData;
  561. LPPAGESETUPHOOK lpfnPageSetupHook;
  562. LPPAGEPAINTHOOK lpfnPagePaintHook;
  563. LPCWSTR lpPageSetupTemplateName;
  564. HGLOBAL hPageSetupTemplate;
  565. } PAGESETUPDLGW,*LPPAGESETUPDLGW;
  566. DECL_WINELIB_TYPE_AW(PAGESETUPDLG)
  567. DECL_WINELIB_TYPE_AW(LPPAGESETUPDLG)
  568. #define PSD_DEFAULTMINMARGINS 0x00000000
  569. #define PSD_INWININIINTLMEASURE 0x00000000
  570. #define PSD_MINMARGINS 0x00000001
  571. #define PSD_MARGINS 0x00000002
  572. #define PSD_INTHOUSANDTHSOFINCHES 0x00000004
  573. #define PSD_INHUNDREDTHSOFMILLIMETERS 0x00000008
  574. #define PSD_DISABLEMARGINS 0x00000010
  575. #define PSD_DISABLEPRINTER 0x00000020
  576. #define PSD_NOWARNING 0x00000080
  577. #define PSD_DISABLEORIENTATION 0x00000100
  578. #define PSD_RETURNDEFAULT 0x00000400
  579. #define PSD_DISABLEPAPER 0x00000200
  580. #define PSD_SHOWHELP 0x00000800
  581. #define PSD_ENABLEPAGESETUPHOOK 0x00002000
  582. #define PSD_ENABLEPAGESETUPTEMPLATE 0x00008000
  583. #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000
  584. #define PSD_ENABLEPAGEPAINTHOOK 0x00040000
  585. #define PSD_DISABLEPAGEPAINTING 0x00080000
  586. BOOL WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol);
  587. BOOL WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol);
  588. #define ChooseColor WINELIB_NAME_AW(ChooseColor)
  589. DWORD WINAPI CommDlgExtendedError(void);
  590. HWND WINAPI FindTextA(LPFINDREPLACEA lpFind);
  591. HWND WINAPI FindTextW(LPFINDREPLACEW lpFind);
  592. #define FindText WINELIB_NAME_AW(FindText)
  593. short WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, WORD cbBuf);
  594. short WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, WORD cbBuf);
  595. #define GetFileTitle WINELIB_NAME_AW(GetFileTitle)
  596. BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA ofn);
  597. BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW ofn);
  598. #define GetOpenFileName WINELIB_NAME_AW(GetOpenFileName)
  599. BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA ofn);
  600. BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn);
  601. #define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
  602. BOOL WINAPI PageSetupDlgA( LPPAGESETUPDLGA );
  603. BOOL WINAPI PageSetupDlgW( LPPAGESETUPDLGW );
  604. #define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
  605. BOOL WINAPI PrintDlgA( LPPRINTDLGA printdlg);
  606. BOOL WINAPI PrintDlgW( LPPRINTDLGW printdlg);
  607. #define PrintDlg WINELIB_NAME_AW(PrintDlg)
  608. HWND WINAPI ReplaceTextA( LPFINDREPLACEA lpFind);
  609. HWND WINAPI ReplaceTextW( LPFINDREPLACEW lpFind);
  610. #define ReplaceText WINELIB_NAME_AW(ReplaceText)
  611. BOOL WINAPI ChooseFontA(LPCHOOSEFONTA);
  612. BOOL WINAPI ChooseFontW(LPCHOOSEFONTW);
  613. #define ChooseFont WINELIB_NAME_AW(ChooseFont)
  614. void COMDLG32_SetCommDlgExtendedError(DWORD err);
  615. #include <poppack.h>
  616. #ifdef __cplusplus
  617. }
  618. #endif
  619. #endif /* __WINE_COMMDLG_H */