#define COBJMACROS
#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
/* copied from shell32 to avoid linking to it */
static BOOL COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPCITEMIDLIST pidl)
{
- TRACE("dest=%p len=0x%x strret=%p pidl=%p stub\n",dest,len,src,pidl);
+ TRACE("dest=%p len=0x%x strret=%p pidl=%p\n", dest , len, src, pidl);
switch (src->uType)
{
*/
IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner)
{
+ FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndOwner);
IShellBrowserImpl *sb;
- FileOpenDlgInfos *fodInfos = GetPropA(hwndOwner,FileOpenDlgInfosStr);
sb = COMDLG32_SHAlloc(sizeof(IShellBrowserImpl));
/***************************************************************************
* IShellBrowserImpl_QueryInterface
*/
-static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface,
- REFIID riid,
- LPVOID *ppvObj)
+static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, REFIID riid, void **ppvObj)
{
IShellBrowserImpl *This = impl_from_IShellBrowser(iface);
- TRACE("(%p)\n\t%s\n", This, debugstr_guid(riid));
+ TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObj);
*ppvObj = NULL;
- if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
- { *ppvObj = This;
- }
- else if(IsEqualIID(riid, &IID_IOleWindow)) /*IOleWindow*/
- { *ppvObj = This;
- }
-
- else if(IsEqualIID(riid, &IID_IShellBrowser)) /*IShellBrowser*/
- { *ppvObj = This;
- }
-
- else if(IsEqualIID(riid, &IID_ICommDlgBrowser)) /*ICommDlgBrowser*/
+ if(IsEqualIID(riid, &IID_IUnknown))
+ *ppvObj = &This->IShellBrowser_iface;
+ else if(IsEqualIID(riid, &IID_IOleWindow))
+ *ppvObj = &This->IShellBrowser_iface;
+ else if(IsEqualIID(riid, &IID_IShellBrowser))
+ *ppvObj = &This->IShellBrowser_iface;
+ else if(IsEqualIID(riid, &IID_ICommDlgBrowser))
*ppvObj = &This->ICommDlgBrowser_iface;
- else if(IsEqualIID(riid, &IID_IServiceProvider)) /* IServiceProvider */
+ else if(IsEqualIID(riid, &IID_IServiceProvider))
*ppvObj = &This->IServiceProvider_iface;
- if(*ppvObj)
- { IUnknown_AddRef( (IShellBrowser*) *ppvObj);
- return S_OK;
+ if(*ppvObj) {
+ IUnknown_AddRef((IUnknown*)*ppvObj);
+ return S_OK;
}
- FIXME("Unknown interface requested\n");
+
+ FIXME("unsupported interface, %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
}
{
COMDLG32_SHFree(This);
TRACE("-- destroyed\n");
- return 0;
}
return ref;
}
TRACE("(%p)(pidl=%p,flags=0x%08x)\n", This, pidl, wFlags);
COMDLG32_DumpSBSPFlags(wFlags);
- fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
+ fodInfos = get_filedlg_infoptr(This->hwndOwner);
/* Format the pidl according to its parameter's category */
if(wFlags & SBSP_RELATIVE)
/* Set view window control id to 5002 */
SetWindowLongPtrW(hwndView, GWLP_ID, lst2);
+ SendMessageW( hwndView, WM_SETFONT, SendMessageW( GetParent(hwndView), WM_GETFONT, 0, 0 ), FALSE );
/* Select the new folder in the Look In combo box of the Open file dialog */
FILEDLG95_LOOKIN_SelectItem(fodInfos->DlgInfos.hwndLookInCB,fodInfos->ShellInfos.pidlAbsCurrent);
TRACE("(%p)\n", This);
- fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
+ fodInfos = get_filedlg_infoptr(This->hwndOwner);
if(!(*ppshv = fodInfos->Shell.FOIShellView))
{
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((pidl = GetPidlFromDataObject(fodInfos->Shell.FOIDataObject, 1)))
{
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);
/* release old selections */
break;
case CDBOSC_KILLFOCUS:
{
- FileOpenDlgInfos *fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
+ FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(This->hwndOwner);
if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
{
WCHAR szSave[16];
static LRESULT send_includeitem_notification(HWND hwndParentDlg, LPCITEMIDLIST pidl)
{
LRESULT hook_result = 0;
- FileOpenDlgInfos *fodInfos = GetPropA(hwndParentDlg, FileOpenDlgInfosStr);
+ FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndParentDlg);
if(!fodInfos) return 0;
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;
IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr);
return S_OK;
/* Check if there is a mask to apply if not */
- if(!fodInfos->ShellInfos.lpstrCurrentFilter || !lstrlenW(fodInfos->ShellInfos.lpstrCurrentFilter))
+ if(!fodInfos->ShellInfos.lpstrCurrentFilter || !fodInfos->ShellInfos.lpstrCurrentFilter[0])
return S_OK;
if (SUCCEEDED(IShellFolder_GetDisplayNameOf(fodInfos->Shell.FOIShellFolder, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING, &str)))