- Do not modify pointers in the OPENFILENAME structure passed to

GetFileDialog95A/W.
- Use Unicode as default for strings from the OPENFILENAME structures.
- Fill out the OPENFILENAME structure before sending the FILEOK
  notification.
- Send a CDN_FOLDERCHANGE notification on OPENFILENAME dialog init.
- Fix miscalculation of the size of Explorer style file dialog boxes
  with templates.
- Remove redundant MapHModuleLS and MapHModuleSL calls that also cause
  hInstance to be trashed when it holds a template pointer instead of a
  real hInstance (when OFN_ENABLETEMPLATEPOINTER is specified).
This commit is contained in:
Mike McCormack 2002-08-16 23:26:22 +00:00 committed by Alexandre Julliard
parent d376e64c35
commit 9e4c409b7c
4 changed files with 443 additions and 391 deletions

View File

@ -118,6 +118,7 @@ extern BOOL (WINAPI *COMDLG32_PIDL_ILIsEqual)(LPCITEMIDLIST, LPCITEMIDLIST);
extern LPVOID (WINAPI *COMDLG32_SHAlloc)(DWORD);
extern DWORD (WINAPI *COMDLG32_SHFree)(LPVOID);
extern BOOL (WINAPI *COMDLG32_SHGetFolderPathA)(HWND,int,HANDLE,DWORD,LPSTR);
extern BOOL (WINAPI *COMDLG32_SHGetFolderPathW)(HWND,int,HANDLE,DWORD,LPWSTR);
extern BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType);
extern BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType);
@ -245,4 +246,3 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16);
#include "poppack.h"
#endif /* _WINE_DLL_CDLG_H */

View File

@ -49,6 +49,7 @@ BOOL (WINAPI *COMDLG32_PIDL_ILIsEqual)(LPCITEMIDLIST, LPCITEMIDLIST);
LPVOID (WINAPI *COMDLG32_SHAlloc)(DWORD);
DWORD (WINAPI *COMDLG32_SHFree)(LPVOID);
BOOL (WINAPI *COMDLG32_SHGetFolderPathA)(HWND,int,HANDLE,DWORD,LPSTR);
BOOL (WINAPI *COMDLG32_SHGetFolderPathW)(HWND,int,HANDLE,DWORD,LPWSTR);
/***********************************************************************
* COMDLG32_DllEntryPoint (COMDLG32.init)
@ -115,6 +116,14 @@ BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Res
GPA(COMDLG32_SHGetFolderPathA, SHFOLDER_hInstance,"SHGetFolderPathA");
}
/* for the first versions of shell32 SHGetFolderPathW is in SHFOLDER.DLL */
COMDLG32_SHGetFolderPathW = (void*)GetProcAddress(SHELL32_hInstance,"SHGetFolderPathW");
if (!COMDLG32_SHGetFolderPathW)
{
SHFOLDER_hInstance = LoadLibraryA("SHFOLDER.DLL");
GPA(COMDLG32_SHGetFolderPathW, SHFOLDER_hInstance,"SHGetFolderPathW");
}
break;
case DLL_PROCESS_DETACH:

File diff suppressed because it is too large Load Diff

View File

@ -49,8 +49,14 @@
typedef struct
{
LPOPENFILENAMEA ofnInfos;
BOOL unicode;
LPWSTR initdir;
LPWSTR filename;
LPCWSTR title;
LPCWSTR defext;
LPCWSTR filter;
LPCWSTR customfilter;
struct {
IShellBrowser *FOIShellBrowser;
IShellFolder *FOIShellFolder;
@ -149,6 +155,6 @@ BOOL IsPidlFolder (LPSHELLFOLDER psf, LPITEMIDLIST pidl);
/* Functions used by the EDIT box */
void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd);
int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPSTR * lpstrFileList, UINT * sizeUsed);
int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPWSTR * lpstrFileList, UINT * sizeUsed);
#endif /*SHBROWSER_H*/