Commit b47de18c authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comdlg32: Use GetPropW() to get to file dialog data.

parent c23a91cb
...@@ -191,8 +191,8 @@ static BOOL COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPCITE ...@@ -191,8 +191,8 @@ static BOOL COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPCITE
*/ */
IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner) IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner)
{ {
FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndOwner);
IShellBrowserImpl *sb; IShellBrowserImpl *sb;
FileOpenDlgInfos *fodInfos = GetPropA(hwndOwner,FileOpenDlgInfosStr);
sb = COMDLG32_SHAlloc(sizeof(IShellBrowserImpl)); sb = COMDLG32_SHAlloc(sizeof(IShellBrowserImpl));
...@@ -352,7 +352,7 @@ static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, ...@@ -352,7 +352,7 @@ static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
TRACE("(%p)(pidl=%p,flags=0x%08x)\n", This, pidl, wFlags); TRACE("(%p)(pidl=%p,flags=0x%08x)\n", This, pidl, wFlags);
COMDLG32_DumpSBSPFlags(wFlags); COMDLG32_DumpSBSPFlags(wFlags);
fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr); fodInfos = get_filedlg_infoptr(This->hwndOwner);
/* Format the pidl according to its parameter's category */ /* Format the pidl according to its parameter's category */
if(wFlags & SBSP_RELATIVE) if(wFlags & SBSP_RELATIVE)
...@@ -561,7 +561,7 @@ static HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *ifac ...@@ -561,7 +561,7 @@ static HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *ifac
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr); fodInfos = get_filedlg_infoptr(This->hwndOwner);
if(!(*ppshv = fodInfos->Shell.FOIShellView)) if(!(*ppshv = fodInfos->Shell.FOIShellView))
{ {
...@@ -765,7 +765,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDl ...@@ -765,7 +765,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDl
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr); fodInfos = get_filedlg_infoptr(This->hwndOwner);
/* If the selected object is not a folder, send an IDOK command to parent window */ /* If the selected object is not a folder, send an IDOK command to parent window */
if((pidl = GetPidlFromDataObject(fodInfos->Shell.FOIDataObject, 1))) if((pidl = GetPidlFromDataObject(fodInfos->Shell.FOIDataObject, 1)))
...@@ -803,7 +803,7 @@ static HRESULT IShellBrowserImpl_OnSelChange(IShellBrowserImpl *This, const IShe ...@@ -803,7 +803,7 @@ static HRESULT IShellBrowserImpl_OnSelChange(IShellBrowserImpl *This, const IShe
{ {
FileOpenDlgInfos *fodInfos; FileOpenDlgInfos *fodInfos;
fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr); fodInfos = get_filedlg_infoptr(This->hwndOwner);
TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView); TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
/* release old selections */ /* release old selections */
...@@ -846,7 +846,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBr ...@@ -846,7 +846,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBr
break; break;
case CDBOSC_KILLFOCUS: case CDBOSC_KILLFOCUS:
{ {
FileOpenDlgInfos *fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr); FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(This->hwndOwner);
if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG) if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
{ {
WCHAR szSave[16]; WCHAR szSave[16];
...@@ -872,7 +872,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBr ...@@ -872,7 +872,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBr
static LRESULT send_includeitem_notification(HWND hwndParentDlg, LPCITEMIDLIST pidl) static LRESULT send_includeitem_notification(HWND hwndParentDlg, LPCITEMIDLIST pidl)
{ {
LRESULT hook_result = 0; LRESULT hook_result = 0;
FileOpenDlgInfos *fodInfos = GetPropA(hwndParentDlg, FileOpenDlgInfosStr); FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndParentDlg);
if(!fodInfos) return 0; if(!fodInfos) return 0;
...@@ -922,7 +922,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBr ...@@ -922,7 +922,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBr
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr); fodInfos = get_filedlg_infoptr(This->hwndOwner);
ulAttr = SFGAO_HIDDEN | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_LINK; ulAttr = SFGAO_HIDDEN | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_LINK;
IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr); IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr);
......
...@@ -147,7 +147,7 @@ void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd) DECLSPEC_HIDDEN; ...@@ -147,7 +147,7 @@ void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd) DECLSPEC_HIDDEN;
/************************************************************************** /**************************************************************************
* External Prototypes * External Prototypes
*/ */
extern const char FileOpenDlgInfosStr[] DECLSPEC_HIDDEN; extern FileOpenDlgInfos *get_filedlg_infoptr(HWND hwnd) DECLSPEC_HIDDEN;
extern IShellFolder* GetShellFolderFromPidl(LPITEMIDLIST pidlAbs) DECLSPEC_HIDDEN; extern IShellFolder* GetShellFolderFromPidl(LPITEMIDLIST pidlAbs) DECLSPEC_HIDDEN;
extern LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl) DECLSPEC_HIDDEN; extern LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment