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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef _WINE_DLL_CDLG_H
22 #define _WINE_DLL_CDLG_H
24 #include <wine/config.h>
28 #define WIN32_NO_STATUS
30 #define COM_NO_WINDOWS_H
33 #define NONAMELESSUNION
34 #define NONAMELESSSTRUCT
48 /* RegGetValueW is supported by Win2k3 SP1 but headers need Win Vista */
50 #define _WIN32_WINNT 0x0600
53 #define NO_SHLWAPI_STREAM
56 #include <wine/unicode.h>
58 #include <wine/debug.h>
59 WINE_DEFAULT_DEBUG_CHANNEL(commdlg
);
61 #include "filedlgbrowser.h"
64 /* Common dialogs implementation globals */
65 #define COMDLG32_Atom ((ATOM)0xa000) /* MS uses this one to identify props */
67 extern HINSTANCE COMDLG32_hInstance DECLSPEC_HIDDEN
;
69 void COMDLG32_SetCommDlgExtendedError(DWORD err
) DECLSPEC_HIDDEN
;
70 LPVOID
COMDLG32_AllocMem(int size
) __WINE_ALLOC_SIZE(1) DECLSPEC_HIDDEN
;
72 /* Find/Replace local definitions */
74 #define FR_WINE_UNICODE 0x80000000
75 #define FR_WINE_REPLACE 0x40000000
78 FINDREPLACEA fr
; /* Internally used structure */
80 FINDREPLACEA
*fra
; /* Reference to the user supplied structure */
86 HRESULT
FileOpenDialog_Constructor(IUnknown
*pUnkOuter
, REFIID riid
, void **ppv
) DECLSPEC_HIDDEN
;
87 HRESULT
FileSaveDialog_Constructor(IUnknown
*pUnkOuter
, REFIID riid
, void **ppv
) DECLSPEC_HIDDEN
;
89 /* Shared helper functions */
90 void COMDLG32_GetCanonicalPath(PCIDLIST_ABSOLUTE pidlAbsCurrent
, LPWSTR lpstrFile
, LPWSTR lpstrPathAndFile
) DECLSPEC_HIDDEN
;
91 int FILEDLG95_ValidatePathAction(LPWSTR lpstrPathAndFile
, IShellFolder
**ppsf
,
92 HWND hwnd
, DWORD flags
, BOOL isSaveDlg
, int defAction
) DECLSPEC_HIDDEN
;
93 int COMDLG32_SplitFileNames(LPWSTR lpstrEdit
, UINT nStrLen
, LPWSTR
*lpstrFileList
, UINT
*sizeUsed
) DECLSPEC_HIDDEN
;
94 void FILEDLG95_OnOpenMessage(HWND hwnd
, int idCaption
, int idText
) DECLSPEC_HIDDEN
;
96 extern BOOL
GetFileName31A( OPENFILENAMEA
*lpofn
, UINT dlgType
) DECLSPEC_HIDDEN
;
97 extern BOOL
GetFileName31W( OPENFILENAMEW
*lpofn
, UINT dlgType
) DECLSPEC_HIDDEN
;
101 extern LPITEMIDLIST (WINAPI
*COMDLG32_PIDL_ILClone
) (LPCITEMIDLIST
);
102 extern LPITEMIDLIST (WINAPI
*COMDLG32_PIDL_ILCombine
)(LPCITEMIDLIST
,LPCITEMIDLIST
);
103 extern LPITEMIDLIST (WINAPI
*COMDLG32_PIDL_ILGetNext
)(LPITEMIDLIST
);
104 extern BOOL (WINAPI
*COMDLG32_PIDL_ILRemoveLastID
)(LPCITEMIDLIST
);
105 extern BOOL (WINAPI
*COMDLG32_PIDL_ILIsEqual
)(LPCITEMIDLIST
, LPCITEMIDLIST
);
106 extern UINT (WINAPI
*COMDLG32_PIDL_ILGetSize
)(LPCITEMIDLIST
);
109 extern LPVOID (WINAPI
*COMDLG32_SHAlloc
)(DWORD
);
110 extern DWORD (WINAPI
*COMDLG32_SHFree
)(LPVOID
);
111 extern BOOL (WINAPI
*COMDLG32_SHGetFolderPathW
)(HWND
,int,HANDLE
,DWORD
,LPWSTR
);
112 extern LPITEMIDLIST (WINAPI
*COMDLG32_SHSimpleIDListFromPathAW
)(LPCVOID
);
114 #define ONOPEN_BROWSE 1
115 #define ONOPEN_OPEN 2
116 #define ONOPEN_SEARCH 3
118 #endif /* _WINE_DLL_CDLG_H */