1999-07-27 18:20:36 +02:00
|
|
|
/*
|
|
|
|
* Implementation of IShellBrowser for the File Open common dialog
|
2002-06-01 01:06:46 +02:00
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* Copyright 1999 Francois Boisvert
|
|
|
|
* Copyright 1999, 2000 Juergen Schmied
|
1999-07-27 18:20:36 +02:00
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1999-07-27 18:20:36 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SHBROWSER_H
|
2002-03-10 00:29:33 +01:00
|
|
|
#define SHBROWSER_H
|
1999-07-27 18:20:36 +02:00
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#ifndef RC_INVOKED
|
|
|
|
#include <stdarg.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "windef.h"
|
1999-07-27 18:20:36 +02:00
|
|
|
#include "winbase.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "winuser.h"
|
|
|
|
#include "shlobj.h"
|
1999-07-27 18:20:36 +02:00
|
|
|
#include "objbase.h"
|
|
|
|
#include "commdlg.h"
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* Defines and global variables
|
|
|
|
*/
|
|
|
|
|
1999-09-03 18:46:41 +02:00
|
|
|
/* dialog internal property */
|
|
|
|
|
|
|
|
#define FODPROP_SAVEDLG 0x0001 /* File dialog is a Save file dialog */
|
2002-06-01 01:06:46 +02:00
|
|
|
#define FODPROP_USEVIEW 0x0002 /* Indicates the user selection must be taken
|
1999-09-03 18:46:41 +02:00
|
|
|
from the IShellView */
|
|
|
|
|
1999-07-27 18:20:36 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* Data structure
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2005-01-10 14:22:35 +01:00
|
|
|
LPOPENFILENAMEW ofnInfos;
|
2002-08-17 01:26:22 +02:00
|
|
|
BOOL unicode;
|
|
|
|
LPWSTR initdir;
|
|
|
|
LPWSTR filename;
|
|
|
|
LPCWSTR title;
|
|
|
|
LPCWSTR defext;
|
|
|
|
LPCWSTR filter;
|
|
|
|
LPCWSTR customfilter;
|
2009-04-30 08:06:50 +02:00
|
|
|
SIZE sizedlg; /* remember the size of the dialog */
|
|
|
|
POINT initial_size; /* remember the initial size of the dialog */
|
1999-07-27 18:20:36 +02:00
|
|
|
struct {
|
2002-06-01 01:06:46 +02:00
|
|
|
IShellBrowser *FOIShellBrowser;
|
1999-07-27 18:20:36 +02:00
|
|
|
IShellFolder *FOIShellFolder;
|
|
|
|
IShellView *FOIShellView;
|
2000-06-02 21:36:53 +02:00
|
|
|
IDataObject *FOIDataObject;
|
1999-07-27 18:20:36 +02:00
|
|
|
} Shell;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
HWND hwndOwner;
|
|
|
|
HWND hwndView;
|
|
|
|
FOLDERSETTINGS folderSettings;
|
|
|
|
LPITEMIDLIST pidlAbsCurrent;
|
|
|
|
LPWSTR lpstrCurrentFilter;
|
|
|
|
} ShellInfos;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
HWND hwndFileTypeCB;
|
|
|
|
HWND hwndLookInCB;
|
|
|
|
HWND hwndFileName;
|
1999-11-07 23:41:05 +01:00
|
|
|
HWND hwndTB;
|
2009-04-30 08:06:50 +02:00
|
|
|
HWND hwndGrip;
|
1999-11-07 06:39:24 +01:00
|
|
|
HWND hwndCustomDlg;
|
1999-09-03 18:46:41 +02:00
|
|
|
DWORD dwDlgProp;
|
1999-07-27 18:20:36 +02:00
|
|
|
} DlgInfos;
|
|
|
|
|
2000-11-01 02:50:21 +01:00
|
|
|
struct {
|
|
|
|
UINT fileokstring;
|
|
|
|
UINT lbselchstring;
|
|
|
|
UINT helpmsgstring;
|
|
|
|
UINT sharevistring;
|
|
|
|
} HookMsg;
|
|
|
|
|
2017-02-02 16:10:06 +01:00
|
|
|
BOOL ole_initialized;
|
2018-03-21 06:59:41 +01:00
|
|
|
LPITEMIDLIST places[5];
|
1999-07-27 18:20:36 +02:00
|
|
|
} FileOpenDlgInfos;
|
|
|
|
|
1999-11-12 02:02:27 +01:00
|
|
|
/***********************************************************************
|
2011-07-30 12:03:08 +02:00
|
|
|
* Control IDs
|
1999-11-12 02:02:27 +01:00
|
|
|
*/
|
|
|
|
#define IDS_FILENOTFOUND 114
|
|
|
|
#define IDS_VERIFYFILE 115
|
|
|
|
#define IDS_CREATEFILE 116
|
2004-01-02 02:47:52 +01:00
|
|
|
#define IDS_OVERWRITEFILE 119
|
2000-06-02 21:36:53 +02:00
|
|
|
#define IDS_INVALID_FILENAME_TITLE 120
|
|
|
|
#define IDS_INVALID_FILENAME 121
|
|
|
|
#define IDS_PATHNOTEXISTING 122
|
|
|
|
#define IDS_FILENOTEXISTING 123
|
2014-07-30 20:43:26 +02:00
|
|
|
#define IDS_INVALID_FOLDERNAME 124
|
1999-11-12 02:02:27 +01:00
|
|
|
|
2000-02-20 19:54:04 +01:00
|
|
|
/* File Dialog Tooltips string IDs */
|
|
|
|
|
|
|
|
#define IDS_UPFOLDER 150
|
|
|
|
#define IDS_NEWFOLDER 151
|
|
|
|
#define IDS_LISTVIEW 152
|
|
|
|
#define IDS_REPORTVIEW 153
|
2000-06-24 15:39:53 +02:00
|
|
|
#define IDS_TODESKTOP 154
|
2000-02-20 19:54:04 +01:00
|
|
|
|
1999-11-12 02:02:27 +01:00
|
|
|
#define IDC_OPENREADONLY chx1
|
|
|
|
|
|
|
|
#define IDC_TOOLBARSTATIC stc1
|
|
|
|
#define IDC_FILETYPESTATIC stc2
|
|
|
|
#define IDC_FILENAMESTATIC stc3
|
|
|
|
#define IDC_LOOKINSTATIC stc4
|
|
|
|
|
|
|
|
#define IDC_SHELLSTATIC lst1
|
|
|
|
|
|
|
|
#define IDC_FILETYPE cmb1
|
|
|
|
#define IDC_LOOKIN cmb2
|
|
|
|
|
|
|
|
#define IDC_FILENAME edt1
|
|
|
|
|
2003-07-28 21:14:24 +02:00
|
|
|
#define IDC_TOOLBAR 1
|
2018-03-16 13:55:43 +01:00
|
|
|
#define IDC_TOOLBARPLACES ctl1
|
1999-11-12 02:02:27 +01:00
|
|
|
|
1999-07-27 18:20:36 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* Prototypes for the methods of the IShellBrowserImpl class
|
|
|
|
*/
|
|
|
|
/* Constructor */
|
2011-04-21 11:16:53 +02:00
|
|
|
IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner) DECLSPEC_HIDDEN;
|
1999-07-27 18:20:36 +02:00
|
|
|
|
|
|
|
|
2011-04-21 11:16:53 +02:00
|
|
|
LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex) DECLSPEC_HIDDEN;
|
2000-06-02 21:36:53 +02:00
|
|
|
|
|
|
|
/* Functions used by the EDIT box */
|
2011-04-21 11:16:53 +02:00
|
|
|
void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd) DECLSPEC_HIDDEN;
|
1999-09-03 18:46:41 +02:00
|
|
|
|
2006-11-30 15:15:46 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* External Prototypes
|
|
|
|
*/
|
2017-02-21 13:35:17 +01:00
|
|
|
extern FileOpenDlgInfos *get_filedlg_infoptr(HWND hwnd) DECLSPEC_HIDDEN;
|
2006-11-30 15:15:46 +01:00
|
|
|
|
2011-04-21 11:16:53 +02:00
|
|
|
extern IShellFolder* GetShellFolderFromPidl(LPITEMIDLIST pidlAbs) DECLSPEC_HIDDEN;
|
|
|
|
extern LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl) DECLSPEC_HIDDEN;
|
2006-11-30 15:15:46 +01:00
|
|
|
|
2011-04-21 11:16:53 +02:00
|
|
|
extern int FILEDLG95_LOOKIN_SelectItem(HWND hwnd,LPITEMIDLIST pidl) DECLSPEC_HIDDEN;
|
|
|
|
extern LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode) DECLSPEC_HIDDEN;
|
2006-11-30 15:15:46 +01:00
|
|
|
|
1999-07-27 18:20:36 +02:00
|
|
|
#endif /*SHBROWSER_H*/
|