2 * COMMDLG - File Dialogs
4 * Copyright 1994 Martin Ayotte
5 * Copyright 1996 Albrecht Kleine
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef _WINE_FINDDLG_H
23 #define _WINE_FINDDLG_H
26 #define BUFFILEALLOC 512 * sizeof(WCHAR)
30 HWND hwnd
; /* file dialog window handle */
31 BOOL hook
; /* TRUE if the dialog is hooked */
32 UINT lbselchstring
; /* registered message id */
33 UINT fileokstring
; /* registered message id */
34 LPARAM lParam
; /* save original lparam */
35 HANDLE16 hDlgTmpl16
; /* handle for resource 16 */
36 HANDLE16 hResource16
; /* handle for allocated resource 16 */
37 HANDLE16 hGlobal16
; /* 16 bits mem block (resources) */
38 LPCVOID
template; /* template for 32 bits resource */
39 BOOL open
; /* TRUE if open dialog, FALSE if save dialog */
40 OPENFILENAMEW
*ofnW
; /* original structure or work struct */
41 OPENFILENAMEA
*ofnA
; /* original structure if 32bits ansi dialog */
42 OPENFILENAME16
*ofn16
; /* original structure if 16 bits dialog */
45 #define LFSPRIVATE struct FSPRIVATE *
49 #define OFN_PROP "FILEDLG_OFN"
51 static const WCHAR FILE_star
[] = {'*','.','*', 0};
52 static const WCHAR FILE_bslash
[] = {'\\', 0};
53 static const WCHAR FILE_specc
[] = {'%','c',':', 0};
54 static const int fldrHeight
= 16;
55 static const int fldrWidth
= 20;
58 * Do not Export to other applications or dlls
61 LPWSTR
FILEDLG_GetFileType(LPWSTR cfptr
, LPWSTR fptr
, WORD index
);
62 void FILEDLG_MapDrawItemStruct(LPDRAWITEMSTRUCT16 lpdis16
, LPDRAWITEMSTRUCT lpdis
);
63 BOOL
FILEDLG_ScanDir(HWND hWnd
, LPWSTR newPath
);
64 LONG
FILEDLG_WMDrawItem(HWND hWnd
, WPARAM wParam
, LPARAM lParam
,
65 int savedlg
, LPDRAWITEMSTRUCT lpdis
);
66 LRESULT
FILEDLG_WMCommand(HWND hWnd
, LPARAM lParam
, UINT notification
,
67 UINT control
, LFSPRIVATE lfs
);
68 BOOL
FileDlg_Init(void);
69 void FILEDLG_DestroyPrivate(LFSPRIVATE lfs
);
70 LFSPRIVATE
FILEDLG_AllocPrivate(LPARAM lParam
, int type
, UINT dlgType
);
72 #endif /* _WINE_FINDDLG_H */