filedlg31.h 3.02 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Win3.1 style File Dialog interface (32 bit)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 18 19 20 21 22 23 24
 */

#ifndef _WINE_DLL_FILEDLG31_H
#define _WINE_DLL_FILEDLG31_H

#define FD31_OFN_PROP "FILEDLG_OFN"

/* Forward declare */
25
typedef struct tagFD31_DATA FD31_DATA, *PFD31_DATA;
26 27 28 29

typedef struct tagFD31_CALLBACKS
{
    BOOL (CALLBACK *Init)(LPARAM lParam, PFD31_DATA lfs, DWORD data);
30 31 32 33 34 35
    BOOL (CALLBACK *CWP)(const FD31_DATA *lfs, UINT wMsg, WPARAM wParam,
                         LPARAM lParam); /* CWP instead of CallWindowProc to avoid macro expansion */
    void (CALLBACK *UpdateResult)(const FD31_DATA *lfs);
    void (CALLBACK *UpdateFileTitle)(const FD31_DATA *lfs);
    LRESULT (CALLBACK *SendLbGetCurSel)(const FD31_DATA *lfs);
    void (CALLBACK *Destroy)(const FD31_DATA *lfs);
36 37
} FD31_CALLBACKS, *PFD31_CALLBACKS;

38
struct tagFD31_DATA
39 40 41 42 43 44 45 46
{
    HWND hwnd; /* file dialog window handle */
    BOOL hook; /* TRUE if the dialog is hooked */
    UINT lbselchstring; /* registered message id */
    UINT fileokstring; /* registered message id */
    LPARAM lParam; /* save original lparam */
    LPCVOID template; /* template for 32 bits resource */
    BOOL open; /* TRUE if open dialog, FALSE if save dialog */
47 48
    LPOPENFILENAMEW ofnW; /* pointer either to the original structure or
                             a W copy for A/16 API */
49 50
    LPVOID private1632; /* 16/32 bit caller private data */
    PFD31_CALLBACKS callbacks; /* callbacks to handle 16/32 bit differences */
51
};
52 53 54 55 56

extern BOOL FD31_Init(void);
extern PFD31_DATA FD31_AllocPrivate(LPARAM lParam, UINT dlgType,
                                    PFD31_CALLBACKS callbacks, DWORD data);
extern void FD31_DestroyPrivate(PFD31_DATA lfs);
57
extern void FD31_MapOfnStructA(const OPENFILENAMEA *ofnA, LPOPENFILENAMEW ofnW, BOOL open);
58
extern void FD31_FreeOfnW(OPENFILENAMEW *ofnW);
59
extern BOOL FD31_CallWindowProc(const FD31_DATA *lfs, UINT wMsg, WPARAM wParam,
60 61 62
                                LPARAM lParam);
extern LONG FD31_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam);
extern LONG FD31_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam,
63
                            int savedlg, const DRAWITEMSTRUCT *lpdis);
64
extern LRESULT FD31_WMCommand(HWND hWnd, LPARAM lParam, UINT notification,
65
                              UINT control, const FD31_DATA *lfs);
66 67 68
extern int FD31_GetFldrHeight(void);

#endif /* _WINE_DLL_FILEDLG31_H */