ReactOS  0.4.14-dev-50-g13bb5e2
filedlgbrowser.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "shlwapi.h"
#include "filedlgbrowser.h"
#include "cdlg.h"
#include "shlguid.h"
#include "servprov.h"
#include "wine/debug.h"
#include "wine/heap.h"
Include dependency graph for filedlgbrowser.c:

Go to the source code of this file.

Classes

struct  IShellBrowserImpl
 Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellBrowserChild) More...
 

Macros

#define COBJMACROS
 
#define NONAMELESSUNION
 
#define NO_SHLWAPI_STREAM
 
#define add_flag(a)   if (flags & a) {strcat(str, #a );strcat(str," ");}
 
#define FE(x)   { x, #x}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (commdlg)
 
static IShellBrowserImplimpl_from_IShellBrowser (IShellBrowser *iface)
 
static IShellBrowserImplimpl_from_ICommDlgBrowser (ICommDlgBrowser *iface)
 
static IShellBrowserImplimpl_from_IServiceProvider (IServiceProvider *iface)
 
static void COMDLG32_DumpSBSPFlags (UINT uflags)
 
static void COMDLG32_UpdateCurrentDir (const FileOpenDlgInfos *fodInfos)
 
static BOOL COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPCITEMIDLIST pidl)
 
IShellBrowserIShellBrowserImpl_Construct (HWND hwndOwner)
 
static HRESULT WINAPI IShellBrowserImpl_QueryInterface (IShellBrowser *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI IShellBrowserImpl_AddRef (IShellBrowser *iface)
 
static ULONG WINAPI IShellBrowserImpl_Release (IShellBrowser *iface)
 
static HRESULT WINAPI IShellBrowserImpl_GetWindow (IShellBrowser *iface, HWND *phwnd)
 
static HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp (IShellBrowser *iface, BOOL fEnterMode)
 
static HRESULT WINAPI IShellBrowserImpl_BrowseObject (IShellBrowser *iface, LPCITEMIDLIST pidl, UINT wFlags)
 
static HRESULT WINAPI IShellBrowserImpl_EnableModelessSB (IShellBrowser *iface, BOOL fEnable)
 
static HRESULT WINAPI IShellBrowserImpl_GetControlWindow (IShellBrowser *iface, UINT id, HWND *lphwnd)
 
static HRESULT WINAPI IShellBrowserImpl_GetViewStateStream (IShellBrowser *iface, DWORD grfMode, LPSTREAM *ppStrm)
 
static HRESULT WINAPI IShellBrowserImpl_InsertMenusSB (IShellBrowser *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
 
static HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive (IShellBrowser *iface, IShellView *ppshv)
 
static HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView (IShellBrowser *iface, IShellView **ppshv)
 
static HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB (IShellBrowser *iface, HMENU hmenuShared)
 
static HRESULT WINAPI IShellBrowserImpl_SendControlMsg (IShellBrowser *iface, UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
 
static HRESULT WINAPI IShellBrowserImpl_SetMenuSB (IShellBrowser *iface, HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject)
 
static HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB (IShellBrowser *iface, LPCOLESTR lpszStatusText)
 
static HRESULT WINAPI IShellBrowserImpl_SetToolbarItems (IShellBrowser *iface, LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags)
 
static HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB (IShellBrowser *iface, LPMSG lpmsg, WORD wID)
 
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface (ICommDlgBrowser *iface, REFIID riid, LPVOID *ppvObj)
 
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef (ICommDlgBrowser *iface)
 
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release (ICommDlgBrowser *iface)
 
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand (ICommDlgBrowser *iface, IShellView *ppshv)
 
static HRESULT IShellBrowserImpl_OnSelChange (IShellBrowserImpl *This, const IShellView *ppshv)
 
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange (ICommDlgBrowser *iface, IShellView *ppshv, ULONG uChange)
 
static LRESULT send_includeitem_notification (HWND hwndParentDlg, LPCITEMIDLIST pidl)
 
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject (ICommDlgBrowser *iface, IShellView *ppshv, LPCITEMIDLIST pidl)
 
static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryInterface (IServiceProvider *iface, REFIID riid, LPVOID *ppvObj)
 
static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef (IServiceProvider *iface)
 
static ULONG WINAPI IShellBrowserImpl_IServiceProvider_Release (IServiceProvider *iface)
 
static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryService (IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
 

Variables

static const IShellBrowserVtbl IShellBrowserImpl_Vtbl
 
static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl
 
static const IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl
 

Macro Definition Documentation

◆ add_flag

#define add_flag (   a)    if (flags & a) {strcat(str, #a );strcat(str," ");}

Definition at line 84 of file filedlgbrowser.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 26 of file filedlgbrowser.c.

◆ FE

#define FE (   x)    { x, #x}

◆ NO_SHLWAPI_STREAM

#define NO_SHLWAPI_STREAM

Definition at line 36 of file filedlgbrowser.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 27 of file filedlgbrowser.c.

Function Documentation

◆ COMDLG32_DumpSBSPFlags()

static void COMDLG32_DumpSBSPFlags ( UINT  uflags)
static

Definition at line 85 of file filedlgbrowser.c.

86 {
87  if (TRACE_ON(commdlg))
88  {
89  unsigned int i;
90  static const struct {
91  DWORD mask;
92  const char *name;
93  } flags[] = {
94 #define FE(x) { x, #x}
95  /* SBSP_DEFBROWSER == 0 */
96  FE(SBSP_SAMEBROWSER),
97  FE(SBSP_NEWBROWSER),
98 
99  /* SBSP_DEFMODE == 0 */
100  FE(SBSP_OPENMODE),
101  FE(SBSP_EXPLOREMODE),
102  FE(SBSP_HELPMODE),
103  FE(SBSP_NOTRANSFERHIST),
104 
105  /* SBSP_ABSOLUTE == 0 */
106  FE(SBSP_RELATIVE),
107  FE(SBSP_PARENT),
108  FE(SBSP_NAVIGATEBACK),
109  FE(SBSP_NAVIGATEFORWARD),
110  FE(SBSP_ALLOW_AUTONAVIGATE),
111 
112  FE(SBSP_NOAUTOSELECT),
113  FE(SBSP_WRITENOHISTORY),
114 
115  FE(SBSP_REDIRECT),
116  FE(SBSP_INITIATEDBYHLINKFRAME),
117  };
118 #undef FE
119  TRACE("SBSP Flags: %08x =", uflags);
120  for (i = 0; i < ARRAY_SIZE(flags); i++)
121  if (flags[i].mask & uflags)
122  TRACE("%s ", flags[i].name);
123  TRACE("\n");
124  }
125 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLenum GLint GLuint mask
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
#define ARRAY_SIZE(a)
Definition: main.h:24
#define FE(x)
Definition: name.c:36
#define TRACE_ON(x)
Definition: compat.h:65
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by IShellBrowserImpl_BrowseObject().

◆ COMDLG32_StrRetToStrNW()

static BOOL COMDLG32_StrRetToStrNW ( LPVOID  dest,
DWORD  len,
LPSTRRET  src,
LPCITEMIDLIST  pidl 
)
static

Definition at line 151 of file filedlgbrowser.c.

152 {
153  TRACE("dest=%p len=0x%x strret=%p pidl=%p\n", dest , len, src, pidl);
154 
155  switch (src->uType)
156  {
157  case STRRET_WSTR:
158  lstrcpynW(dest, src->u.pOleStr, len);
159  CoTaskMemFree(src->u.pOleStr);
160  break;
161 
162  case STRRET_CSTR:
163  if (len && !MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ))
164  ((LPWSTR)dest)[len-1] = 0;
165  break;
166 
167  case STRRET_OFFSET:
168  if (pidl)
169  {
170  if (len && !MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset,
171  -1, dest, len ))
172  ((LPWSTR)dest)[len-1] = 0;
173  }
174  break;
175 
176  default:
177  FIXME("unknown type!\n");
178  if (len)
179  { *(LPWSTR)dest = '\0';
180  }
181  return(FALSE);
182  }
183  return TRUE;
184 }
#define TRUE
Definition: types.h:120
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
#define CP_ACP
Definition: compat.h:99
#define lstrcpynW
Definition: compat.h:397
#define FIXME(fmt,...)
Definition: debug.h:110
const char * LPCSTR
Definition: xmlstorage.h:183
#define TRACE(s)
Definition: solgame.cpp:4
GLenum GLsizei len
Definition: glext.h:6722
GLenum src
Definition: glext.h:6340
#define MultiByteToWideChar
Definition: compat.h:100
static char * dest
Definition: rtl.c:135
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by IShellBrowserImpl_ICommDlgBrowser_IncludeObject().

◆ COMDLG32_UpdateCurrentDir()

static void COMDLG32_UpdateCurrentDir ( const FileOpenDlgInfos fodInfos)
static

Definition at line 127 of file filedlgbrowser.c.

128 {
129  LPSHELLFOLDER psfDesktop;
130  STRRET strret;
131  HRESULT res;
132 
133  res = SHGetDesktopFolder(&psfDesktop);
134  if (FAILED(res))
135  return;
136 
137  res = IShellFolder_GetDisplayNameOf(psfDesktop, fodInfos->ShellInfos.pidlAbsCurrent,
138  SHGDN_FORPARSING, &strret);
139  if (SUCCEEDED(res)) {
140  WCHAR wszCurrentDir[MAX_PATH];
141 
142  res = StrRetToBufW(&strret, fodInfos->ShellInfos.pidlAbsCurrent, wszCurrentDir, MAX_PATH);
143  if (SUCCEEDED(res))
144  SetCurrentDirectoryW(wszCurrentDir);
145  }
146 
147  IShellFolder_Release(psfDesktop);
148 }
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
Definition: string.c:1522
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
Definition: path.c:2248
struct FileOpenDlgInfos::@328 ShellInfos
GLuint res
Definition: glext.h:9613
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by IShellBrowserImpl_BrowseObject().

◆ impl_from_ICommDlgBrowser()

static IShellBrowserImpl* impl_from_ICommDlgBrowser ( ICommDlgBrowser iface)
inlinestatic

Definition at line 63 of file filedlgbrowser.c.

64 {
65  return CONTAINING_RECORD(iface, IShellBrowserImpl, ICommDlgBrowser_iface);
66 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IShellBrowserImpl_ICommDlgBrowser_AddRef(), IShellBrowserImpl_ICommDlgBrowser_IncludeObject(), IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(), IShellBrowserImpl_ICommDlgBrowser_OnStateChange(), IShellBrowserImpl_ICommDlgBrowser_QueryInterface(), and IShellBrowserImpl_ICommDlgBrowser_Release().

◆ impl_from_IServiceProvider()

static IShellBrowserImpl* impl_from_IServiceProvider ( IServiceProvider iface)
inlinestatic

Definition at line 68 of file filedlgbrowser.c.

69 {
70  return CONTAINING_RECORD(iface, IShellBrowserImpl, IServiceProvider_iface);
71 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IShellBrowserImpl_IServiceProvider_AddRef(), IShellBrowserImpl_IServiceProvider_QueryInterface(), IShellBrowserImpl_IServiceProvider_QueryService(), and IShellBrowserImpl_IServiceProvider_Release().

◆ impl_from_IShellBrowser()

static IShellBrowserImpl* impl_from_IShellBrowser ( IShellBrowser iface)
inlinestatic

◆ IShellBrowserImpl_AddRef()

static ULONG WINAPI IShellBrowserImpl_AddRef ( IShellBrowser iface)
static

Definition at line 250 of file filedlgbrowser.c.

251 {
254 
255  TRACE("(%p,%u)\n", This, ref - 1);
256 
257  return ref;
258 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

Referenced by IShellBrowserImpl_ICommDlgBrowser_AddRef(), and IShellBrowserImpl_IServiceProvider_AddRef().

◆ IShellBrowserImpl_BrowseObject()

static HRESULT WINAPI IShellBrowserImpl_BrowseObject ( IShellBrowser iface,
LPCITEMIDLIST  pidl,
UINT  wFlags 
)
static

Definition at line 332 of file filedlgbrowser.c.

335 {
336  HRESULT hRes;
338  IShellView *psvTmp;
339  FileOpenDlgInfos *fodInfos;
340  LPITEMIDLIST pidlTmp;
341  HWND hwndView;
342  HWND hDlgWnd;
343  BOOL bViewHasFocus;
344  RECT rectView;
345 
347 
348  TRACE("(%p)(pidl=%p,flags=0x%08x)\n", This, pidl, wFlags);
350 
351  fodInfos = get_filedlg_infoptr(This->hwndOwner);
352 
353  /* Format the pidl according to its parameter's category */
354  if(wFlags & SBSP_RELATIVE)
355  {
356 
357  /* SBSP_RELATIVE A relative pidl (relative from the current folder) */
358  if (FAILED(hRes = IShellFolder_BindToObject(fodInfos->Shell.FOIShellFolder,
359  pidl, NULL, &IID_IShellFolder, (void **)&folder)))
360  {
361  ERR("bind to object failed\n");
362  return hRes;
363  }
364  /* create an absolute pidl */
365  pidlTmp = ILCombine(fodInfos->ShellInfos.pidlAbsCurrent, pidl);
366  }
367  else if(wFlags & SBSP_PARENT)
368  {
369  /* Browse the parent folder (ignores the pidl) */
370  pidlTmp = GetParentPidl(fodInfos->ShellInfos.pidlAbsCurrent);
371  folder = GetShellFolderFromPidl(pidlTmp);
372  }
373  else /* SBSP_ABSOLUTE is 0x0000 */
374  {
375  /* An absolute pidl (relative from the desktop) */
376  pidlTmp = ILClone(pidl);
377  folder = GetShellFolderFromPidl(pidlTmp);
378  }
379 
380  if (!folder)
381  {
382  ERR("could not browse to folder\n");
383  ILFree(pidlTmp);
384  return E_FAIL;
385  }
386 
387  /* If the pidl to browse to is equal to the actual pidl ...
388  do nothing and pretend you did it*/
389  if (ILIsEqual(pidlTmp, fodInfos->ShellInfos.pidlAbsCurrent))
390  {
391  IShellFolder_Release(folder);
392  ILFree(pidlTmp);
393  TRACE("keep current folder\n");
394  return S_OK;
395  }
396 
397  /* Release the current DataObject */
398  if (fodInfos->Shell.FOIDataObject)
399  {
400  IDataObject_Release(fodInfos->Shell.FOIDataObject);
401  fodInfos->Shell.FOIDataObject = NULL;
402  }
403 
404  /* Create the associated view */
405  TRACE("create view object\n");
406  if (FAILED(hRes = IShellFolder_CreateViewObject(folder, fodInfos->ShellInfos.hwndOwner,
407  &IID_IShellView, (void **)&psvTmp)))
408  {
409  IShellFolder_Release(folder);
410  ILFree(pidlTmp);
411  return hRes;
412  }
413 
414  /* Check if listview has focus */
415  bViewHasFocus = IsChild(fodInfos->ShellInfos.hwndView,GetFocus());
416 
417  /* Get the foldersettings from the old view */
418  if(fodInfos->Shell.FOIShellView)
419  IShellView_GetCurrentInfo(fodInfos->Shell.FOIShellView, &fodInfos->ShellInfos.folderSettings);
420 
421  /* Release the old fodInfos->Shell.FOIShellView and update its value.
422  We have to update this early since ShellView_CreateViewWindow of native
423  shell32 calls OnStateChange and needs the correct view here.*/
424  if(fodInfos->Shell.FOIShellView)
425  {
426  IShellView_DestroyViewWindow(fodInfos->Shell.FOIShellView);
427  IShellView_Release(fodInfos->Shell.FOIShellView);
428  }
429  fodInfos->Shell.FOIShellView = psvTmp;
430 
431  /* Release old FOIShellFolder and update its value */
432  if (fodInfos->Shell.FOIShellFolder)
433  IShellFolder_Release(fodInfos->Shell.FOIShellFolder);
434  fodInfos->Shell.FOIShellFolder = folder;
435 
436  /* Release old pidlAbsCurrent and update its value */
437  ILFree(fodInfos->ShellInfos.pidlAbsCurrent);
438  fodInfos->ShellInfos.pidlAbsCurrent = pidlTmp;
439 
440  COMDLG32_UpdateCurrentDir(fodInfos);
441 
442  GetWindowRect(GetDlgItem(This->hwndOwner, IDC_SHELLSTATIC), &rectView);
443  MapWindowPoints(0, This->hwndOwner, (LPPOINT)&rectView, 2);
444 
445  /* Create the window */
446  TRACE("create view window\n");
447  if (FAILED(hRes = IShellView_CreateViewWindow(psvTmp, NULL,
448  &fodInfos->ShellInfos.folderSettings, fodInfos->Shell.FOIShellBrowser,
449  &rectView, &hwndView)))
450  {
451  WARN("Failed to create view window, hr %#x.\n", hRes);
452  return hRes;
453  }
454 
455  fodInfos->ShellInfos.hwndView = hwndView;
456 
457  /* Set view window control id to 5002 */
458  SetWindowLongPtrW(hwndView, GWLP_ID, lst2);
459  SendMessageW( hwndView, WM_SETFONT, SendMessageW( GetParent(hwndView), WM_GETFONT, 0, 0 ), FALSE );
460 
461  /* Select the new folder in the Look In combo box of the Open file dialog */
462  FILEDLG95_LOOKIN_SelectItem(fodInfos->DlgInfos.hwndLookInCB,fodInfos->ShellInfos.pidlAbsCurrent);
463 
464  /* changes the tab order of the ListView to reflect the window's File Dialog */
465  hDlgWnd = GetDlgItem(GetParent(hwndView), IDC_LOOKIN);
466  SetWindowPos(hwndView, hDlgWnd, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
467 
468  /* Since we destroyed the old view if it had focus set focus to the newly created view */
469  if (bViewHasFocus)
470  SetFocus(fodInfos->ShellInfos.hwndView);
471 
472  return hRes;
473 }
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
Definition: fci.c:115
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
struct FileOpenDlgInfos::@327 Shell
#define WARN(fmt,...)
Definition: debug.h:111
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:699
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:535
#define E_FAIL
Definition: ddrawi.h:102
static void COMDLG32_UpdateCurrentDir(const FileOpenDlgInfos *fodInfos)
unsigned int BOOL
Definition: ntddk_ex.h:94
LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl)
Definition: filedlg.c:4412
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
int FILEDLG95_LOOKIN_SelectItem(HWND hwnd, LPITEMIDLIST pidl)
Definition: filedlg.c:3977
smooth NULL
Definition: ftsmooth.c:416
#define WM_GETFONT
Definition: winuser.h:1633
struct CFFOLDER folder
Definition: fdi.c:110
#define TRACE(s)
Definition: solgame.cpp:4
struct FileOpenDlgInfos::@329 DlgInfos
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDC_LOOKIN
LONG HRESULT
Definition: typedefs.h:77
#define SWP_NOSIZE
Definition: winuser.h:1230
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define ERR(fmt,...)
Definition: debug.h:109
HWND WINAPI GetParent(_In_ HWND)
#define S_OK
Definition: intsafe.h:59
#define lst2
Definition: dlgs.h:96
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
struct FileOpenDlgInfos::@328 ShellInfos
static void COMDLG32_DumpSBSPFlags(UINT uflags)
#define WM_SETFONT
Definition: winuser.h:1632
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
HWND WINAPI GetFocus(void)
Definition: window.c:1905
IShellFolder * GetShellFolderFromPidl(LPITEMIDLIST pidlAbs)
Definition: filedlg.c:4384
#define SWP_NOMOVE
Definition: winuser.h:1229
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define IDC_SHELLSTATIC
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SetWindowLongPtrW
Definition: winuser.h:5247
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define GWLP_ID
Definition: winuser.h:854
FileOpenDlgInfos * get_filedlg_infoptr(HWND hwnd)
Definition: filedlg.c:156

◆ IShellBrowserImpl_Construct()

IShellBrowser* IShellBrowserImpl_Construct ( HWND  hwndOwner)

Definition at line 193 of file filedlgbrowser.c.

194 {
195  FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndOwner);
197 
198  sb = heap_alloc(sizeof(*sb));
199 
200  /* Initialisation of the member variables */
201  sb->ref=1;
202  sb->hwndOwner = hwndOwner;
203 
204  /* Initialisation of the vTables */
205  sb->IShellBrowser_iface.lpVtbl = &IShellBrowserImpl_Vtbl;
206  sb->ICommDlgBrowser_iface.lpVtbl = &IShellBrowserImpl_ICommDlgBrowser_Vtbl;
207  sb->IServiceProvider_iface.lpVtbl = &IShellBrowserImpl_IServiceProvider_Vtbl;
209  &fodInfos->ShellInfos.pidlAbsCurrent);
210 
211  TRACE("%p\n", sb);
212 
213  return &sb->IShellBrowser_iface;
214 }
superblock * sb
Definition: btrfs.c:4162
#define CSIDL_DESKTOP
Definition: shlobj.h:2003
static const IShellBrowserVtbl IShellBrowserImpl_Vtbl
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:2687
static const IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl
struct FileOpenDlgInfos::@328 ShellInfos
static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl
FileOpenDlgInfos * get_filedlg_infoptr(HWND hwnd)
Definition: filedlg.c:156

Referenced by FILEDLG95_SHELL_Init().

◆ IShellBrowserImpl_ContextSensitiveHelp()

static HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp ( IShellBrowser iface,
BOOL  fEnterMode 
)
static

Definition at line 309 of file filedlgbrowser.c.

311 {
313 
314  TRACE("(%p)\n", This);
315 
316  /* Feature not implemented */
317  return E_NOTIMPL;
318 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IShellBrowserImpl_EnableModelessSB()

static HRESULT WINAPI IShellBrowserImpl_EnableModelessSB ( IShellBrowser iface,
BOOL  fEnable 
)
static

Definition at line 478 of file filedlgbrowser.c.

481 {
483 
484  TRACE("(%p)\n", This);
485 
486  /* Feature not implemented */
487  return E_NOTIMPL;
488 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IShellBrowserImpl_GetControlWindow()

static HRESULT WINAPI IShellBrowserImpl_GetControlWindow ( IShellBrowser iface,
UINT  id,
HWND lphwnd 
)
static

Definition at line 493 of file filedlgbrowser.c.

497 {
499 
500  TRACE("(%p)\n", This);
501 
502  /* Feature not implemented */
503  return E_NOTIMPL;
504 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IShellBrowserImpl_GetViewStateStream()

static HRESULT WINAPI IShellBrowserImpl_GetViewStateStream ( IShellBrowser iface,
DWORD  grfMode,
LPSTREAM ppStrm 
)
static

Definition at line 509 of file filedlgbrowser.c.

513 {
515 
516  FIXME("(%p 0x%08x %p)\n", This, grfMode, ppStrm);
517 
518  /* Feature not implemented */
519  return E_NOTIMPL;
520 }
#define FIXME(fmt,...)
Definition: debug.h:110
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IShellBrowserImpl_GetWindow()

static HRESULT WINAPI IShellBrowserImpl_GetWindow ( IShellBrowser iface,
HWND phwnd 
)
static

Definition at line 290 of file filedlgbrowser.c.

292 {
294 
295  TRACE("(%p)\n", This);
296 
297  if(!This->hwndOwner)
298  return E_FAIL;
299 
300  *phwnd = This->hwndOwner;
301 
302  return (*phwnd) ? S_OK : E_UNEXPECTED;
303 
304 }
#define E_FAIL
Definition: ddrawi.h:102
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ IShellBrowserImpl_ICommDlgBrowser_AddRef()

static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef ( ICommDlgBrowser iface)
static

Definition at line 734 of file filedlgbrowser.c.

735 {
737 
738  TRACE("(%p)\n", This);
739 
740  return IShellBrowserImpl_AddRef(&This->IShellBrowser_iface);
741 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static IShellBrowserImpl * impl_from_ICommDlgBrowser(ICommDlgBrowser *iface)

◆ IShellBrowserImpl_ICommDlgBrowser_IncludeObject()

static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject ( ICommDlgBrowser iface,
IShellView ppshv,
LPCITEMIDLIST  pidl 
)
static

Definition at line 913 of file filedlgbrowser.c.

916 {
917  FileOpenDlgInfos *fodInfos;
918  ULONG ulAttr;
919  STRRET str;
920  WCHAR szPathW[MAX_PATH];
921 
923 
924  TRACE("(%p)\n", This);
925 
926  fodInfos = get_filedlg_infoptr(This->hwndOwner);
927 
928  ulAttr = SFGAO_HIDDEN | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_LINK;
929  IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr);
930 
931  if( (ulAttr & SFGAO_HIDDEN) || /* hidden */
932  !(ulAttr & (SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR))) /* special folder */
933  return S_FALSE;
934 
935  /* always include directories and links */
936  if(ulAttr & (SFGAO_FOLDER | SFGAO_LINK))
937  return S_OK;
938 
939  /* if the application takes care of including the item we are done */
940  if(fodInfos->ofnInfos->Flags & OFN_ENABLEINCLUDENOTIFY &&
941  send_includeitem_notification(This->hwndOwner, pidl))
942  return S_OK;
943 
944  /* Check if there is a mask to apply if not */
945  if(!fodInfos->ShellInfos.lpstrCurrentFilter || !fodInfos->ShellInfos.lpstrCurrentFilter[0])
946  return S_OK;
947 
948  if (SUCCEEDED(IShellFolder_GetDisplayNameOf(fodInfos->Shell.FOIShellFolder, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING, &str)))
949  {
950  if (COMDLG32_StrRetToStrNW(szPathW, MAX_PATH, &str, pidl))
951  {
952  if (PathMatchSpecW(szPathW, fodInfos->ShellInfos.lpstrCurrentFilter))
953  return S_OK;
954  }
955  }
956  return S_FALSE;
957 
958 }
DWORD Flags
Definition: commdlg.h:373
struct FileOpenDlgInfos::@327 Shell
#define S_FALSE
Definition: winerror.h:2357
const WCHAR * str
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
LPOPENFILENAMEW ofnInfos
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
static LRESULT send_includeitem_notification(HWND hwndParentDlg, LPCITEMIDLIST pidl)
static BOOL COMDLG32_StrRetToStrNW(LPVOID dest, DWORD len, LPSTRRET src, LPCITEMIDLIST pidl)
static IShellBrowserImpl * impl_from_ICommDlgBrowser(ICommDlgBrowser *iface)
#define S_OK
Definition: intsafe.h:59
struct FileOpenDlgInfos::@328 ShellInfos
#define OFN_ENABLEINCLUDENOTIFY
Definition: commdlg.h:100
BOOL WINAPI PathMatchSpecW(LPCWSTR lpszPath, LPCWSTR lpszMask)
Definition: path.c:1943
unsigned int ULONG
Definition: retypes.h:1
#define SUCCEEDED(hr)
Definition: intsafe.h:57
FileOpenDlgInfos * get_filedlg_infoptr(HWND hwnd)
Definition: filedlg.c:156

◆ IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand()

static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand ( ICommDlgBrowser iface,
IShellView ppshv 
)
static

Definition at line 760 of file filedlgbrowser.c.

762 {
763  LPITEMIDLIST pidl;
764  FileOpenDlgInfos *fodInfos;
765 
767 
768  TRACE("(%p)\n", This);
769 
770  fodInfos = get_filedlg_infoptr(This->hwndOwner);
771 
772  /* If the selected object is not a folder, send an IDOK command to parent window */
773  if((pidl = GetPidlFromDataObject(fodInfos->Shell.FOIDataObject, 1)))
774  {
775  HRESULT hRes;
776 
777  ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER;
778  IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, (LPCITEMIDLIST *)&pidl, &ulAttr);
779  if (ulAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER) )
780  {
781  hRes = IShellBrowser_BrowseObject(&This->IShellBrowser_iface,pidl,SBSP_RELATIVE);
782  if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
784  }
785  else
786  {
787  /* Tell the dialog that the user selected a file */
788  PostMessageA(This->hwndOwner, WM_COMMAND, IDOK, 0L);
789  hRes = S_OK;
790  }
791 
792  ILFree(pidl);
793 
794  return hRes;
795  }
796 
797  return E_FAIL;
798 }
#define OFN_EXPLORER
Definition: commdlg.h:104
DWORD Flags
Definition: commdlg.h:373
#define CDN_FOLDERCHANGE
Definition: commdlg.h:35
#define IDOK
Definition: winuser.h:824
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
struct FileOpenDlgInfos::@327 Shell
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPITEMIDLIST GetPidlFromDataObject(IDataObject *doSelected, UINT nPidlIndex)
Definition: filedlg.c:4289
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define E_FAIL
Definition: ddrawi.h:102
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
LPOPENFILENAMEW ofnInfos
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR L[]
Definition: oid.c:1250
#define WM_COMMAND
Definition: winuser.h:1722
static IShellBrowserImpl * impl_from_ICommDlgBrowser(ICommDlgBrowser *iface)
#define S_OK
Definition: intsafe.h:59
LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode)
Definition: filedlg.c:989
unsigned int ULONG
Definition: retypes.h:1
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
FileOpenDlgInfos * get_filedlg_infoptr(HWND hwnd)
Definition: filedlg.c:156

◆ IShellBrowserImpl_ICommDlgBrowser_OnStateChange()

static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange ( ICommDlgBrowser iface,
IShellView ppshv,
ULONG  uChange 
)
static

Definition at line 829 of file filedlgbrowser.c.

832 {
833 
835 
836  TRACE("(%p shv=%p)\n", This, ppshv);
837 
838  switch (uChange)
839  {
840  case CDBOSC_SETFOCUS:
841  /* FIXME: Reset the default button.
842  This should be taken care of by defdlg. If control
843  other than button receives focus the default button
844  should be restored. */
845  SendMessageA(This->hwndOwner, DM_SETDEFID, IDOK, 0);
846 
847  break;
848  case CDBOSC_KILLFOCUS:
849  {
850  FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(This->hwndOwner);
851  if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
852  {
853  WCHAR szSave[16];
855  SetDlgItemTextW(fodInfos->ShellInfos.hwndOwner, IDOK, szSave);
856  }
857  }
858  break;
859  case CDBOSC_SELCHANGE:
860  return IShellBrowserImpl_OnSelChange(This, ppshv);
861  case CDBOSC_RENAME:
862  /* nothing to do */
863  break;
864  }
865 
866  return NOERROR;
867 }
#define IDOK
Definition: winuser.h:824
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
#define NOERROR
Definition: winerror.h:2354
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define DM_SETDEFID
Definition: winuser.h:2081
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define IDS_SAVE_BUTTON
Definition: cdlg.h:174
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
static HRESULT IShellBrowserImpl_OnSelChange(IShellBrowserImpl *This, const IShellView *ppshv)
#define FODPROP_SAVEDLG
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
#define TRACE(s)
Definition: solgame.cpp:4
struct FileOpenDlgInfos::@329 DlgInfos
__wchar_t WCHAR
Definition: xmlstorage.h:180
static IShellBrowserImpl * impl_from_ICommDlgBrowser(ICommDlgBrowser *iface)
#define ARRAY_SIZE(a)
Definition: main.h:24
struct FileOpenDlgInfos::@328 ShellInfos
FileOpenDlgInfos * get_filedlg_infoptr(HWND hwnd)
Definition: filedlg.c:156

◆ IShellBrowserImpl_ICommDlgBrowser_QueryInterface()

static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface ( ICommDlgBrowser iface,
REFIID  riid,
LPVOID ppvObj 
)
static

Definition at line 719 of file filedlgbrowser.c.

723 {
725 
726  TRACE("(%p)\n", This);
727 
728  return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppvObj);
729 }
static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, REFIID riid, void **ppvObj)
REFIID riid
Definition: precomp.h:44
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
#define TRACE(s)
Definition: solgame.cpp:4
static IShellBrowserImpl * impl_from_ICommDlgBrowser(ICommDlgBrowser *iface)

◆ IShellBrowserImpl_ICommDlgBrowser_Release()

static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release ( ICommDlgBrowser iface)
static

Definition at line 746 of file filedlgbrowser.c.

747 {
749 
750  TRACE("(%p)\n", This);
751 
752  return IShellBrowserImpl_Release(&This->IShellBrowser_iface);
753 }
static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser *iface)
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
#define TRACE(s)
Definition: solgame.cpp:4
static IShellBrowserImpl * impl_from_ICommDlgBrowser(ICommDlgBrowser *iface)

◆ IShellBrowserImpl_InsertMenusSB()

static HRESULT WINAPI IShellBrowserImpl_InsertMenusSB ( IShellBrowser iface,
HMENU  hmenuShared,
LPOLEMENUGROUPWIDTHS  lpMenuWidths 
)
static

Definition at line 525 of file filedlgbrowser.c.

529 {
531 
532  TRACE("(%p)\n", This);
533 
534  /* Feature not implemented */
535  return E_NOTIMPL;
536 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IShellBrowserImpl_IServiceProvider_AddRef()

static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef ( IServiceProvider iface)
static

Definition at line 997 of file filedlgbrowser.c.

998 {
1000 
1001  FIXME("(%p)\n", This);
1002 
1003  return IShellBrowserImpl_AddRef(&This->IShellBrowser_iface);
1004 }
#define FIXME(fmt,...)
Definition: debug.h:110
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser *iface)
static IShellBrowserImpl * impl_from_IServiceProvider(IServiceProvider *iface)

◆ IShellBrowserImpl_IServiceProvider_QueryInterface()

static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryInterface ( IServiceProvider iface,
REFIID  riid,
LPVOID ppvObj 
)
static

Definition at line 982 of file filedlgbrowser.c.

986 {
988 
989  FIXME("(%p)\n", This);
990 
991  return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppvObj);
992 }
static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, REFIID riid, void **ppvObj)
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IServiceProvider(IServiceProvider *iface)

◆ IShellBrowserImpl_IServiceProvider_QueryService()

static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryService ( IServiceProvider iface,
REFGUID  guidService,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1029 of file filedlgbrowser.c.

1034 {
1036 
1037  FIXME("(%p)\n\t%s\n\t%s\n", This,debugstr_guid(guidService), debugstr_guid(riid) );
1038 
1039  *ppv = NULL;
1040  if(guidService && IsEqualIID(guidService, &SID_STopLevelBrowser))
1041  return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppv);
1042 
1043  FIXME("(%p) unknown interface requested\n", This);
1044  return E_NOINTERFACE;
1045 
1046 }
#define E_NOINTERFACE
Definition: winerror.h:2364
static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, REFIID riid, void **ppvObj)
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define FIXME(fmt,...)
Definition: debug.h:110
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
static IShellBrowserImpl * impl_from_IServiceProvider(IServiceProvider *iface)
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ IShellBrowserImpl_IServiceProvider_Release()

static ULONG WINAPI IShellBrowserImpl_IServiceProvider_Release ( IServiceProvider iface)
static

Definition at line 1009 of file filedlgbrowser.c.

1010 {
1012 
1013  FIXME("(%p)\n", This);
1014 
1015  return IShellBrowserImpl_Release(&This->IShellBrowser_iface);
1016 }
static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser *iface)
#define FIXME(fmt,...)
Definition: debug.h:110
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IServiceProvider(IServiceProvider *iface)

◆ IShellBrowserImpl_OnSelChange()

static HRESULT IShellBrowserImpl_OnSelChange ( IShellBrowserImpl This,
const IShellView ppshv 
)
static

Definition at line 803 of file filedlgbrowser.c.

804 {
805  FileOpenDlgInfos *fodInfos;
806 
807  fodInfos = get_filedlg_infoptr(This->hwndOwner);
808  TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
809 
810  /* release old selections */
811  if (fodInfos->Shell.FOIDataObject)
812  IDataObject_Release(fodInfos->Shell.FOIDataObject);
813 
814  /* get a new DataObject from the ShellView */
815  if(FAILED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView, SVGIO_SELECTION,
816  &IID_IDataObject, (void**)&fodInfos->Shell.FOIDataObject)))
817  return E_FAIL;
818 
820 
821  if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
823  return S_OK;
824 }
#define OFN_EXPLORER
Definition: commdlg.h:104
DWORD Flags
Definition: commdlg.h:373
struct FileOpenDlgInfos::@327 Shell
const GUID IID_IDataObject
#define E_FAIL
Definition: ddrawi.h:102
#define CDN_SELCHANGE
Definition: commdlg.h:34
LPOPENFILENAMEW ofnInfos
#define TRACE(s)
Definition: solgame.cpp:4
void FILEDLG95_FILENAME_FillFromSelection(HWND hwnd)
Definition: filedlg.c:4131
#define S_OK
Definition: intsafe.h:59
LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode)
Definition: filedlg.c:989
FileOpenDlgInfos * get_filedlg_infoptr(HWND hwnd)
Definition: filedlg.c:156

Referenced by IShellBrowserImpl_ICommDlgBrowser_OnStateChange().

◆ IShellBrowserImpl_OnViewWindowActive()

static HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive ( IShellBrowser iface,
IShellView ppshv 
)
static

Definition at line 541 of file filedlgbrowser.c.

544 {
546 
547  TRACE("(%p)\n", This);
548 
549  /* Feature not implemented */
550  return E_NOTIMPL;
551 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IShellBrowserImpl_QueryActiveShellView()

static HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView ( IShellBrowser iface,
IShellView **  ppshv 
)
static

Definition at line 556 of file filedlgbrowser.c.

559 {
561 
562  FileOpenDlgInfos *fodInfos;
563 
564  TRACE("(%p)\n", This);
565 
566  fodInfos = get_filedlg_infoptr(This->hwndOwner);
567 
568  if(!(*ppshv = fodInfos->Shell.FOIShellView))
569  {
570  return E_FAIL;
571  }
572  IShellView_AddRef(fodInfos->Shell.FOIShellView);
573  return NOERROR;
574 }
#define NOERROR
Definition: winerror.h:2354
struct FileOpenDlgInfos::@327 Shell
#define E_FAIL
Definition: ddrawi.h:102
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
FileOpenDlgInfos * get_filedlg_infoptr(HWND hwnd)
Definition: filedlg.c:156

◆ IShellBrowserImpl_QueryInterface()

static HRESULT WINAPI IShellBrowserImpl_QueryInterface ( IShellBrowser iface,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 219 of file filedlgbrowser.c.

220 {
222 
223  TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObj);
224 
225  *ppvObj = NULL;
226 
228  *ppvObj = &This->IShellBrowser_iface;
229  else if(IsEqualIID(riid, &IID_IOleWindow))
230  *ppvObj = &This->IShellBrowser_iface;
231  else if(IsEqualIID(riid, &IID_IShellBrowser))
232  *ppvObj = &This->IShellBrowser_iface;
233  else if(IsEqualIID(riid, &IID_ICommDlgBrowser))
234  *ppvObj = &This->ICommDlgBrowser_iface;
235  else if(IsEqualIID(riid, &IID_IServiceProvider))
236  *ppvObj = &This->IServiceProvider_iface;
237 
238  if(*ppvObj) {
239  IUnknown_AddRef((IUnknown*)*ppvObj);
240  return S_OK;
241  }
242 
243  FIXME("unsupported interface, %s\n", debugstr_guid(riid));
244  return E_NOINTERFACE;
245 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
const GUID IID_IOleWindow
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

Referenced by IShellBrowserImpl_ICommDlgBrowser_QueryInterface(), IShellBrowserImpl_IServiceProvider_QueryInterface(), and IShellBrowserImpl_IServiceProvider_QueryService().

◆ IShellBrowserImpl_Release()

static ULONG WINAPI IShellBrowserImpl_Release ( IShellBrowser iface)
static

Definition at line 263 of file filedlgbrowser.c.

264 {
267 
268  TRACE("(%p,%u)\n", This, ref + 1);
269 
270  if (!ref)
271  heap_free(This);
272 
273  return ref;
274 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by IShellBrowserImpl_ICommDlgBrowser_Release(), and IShellBrowserImpl_IServiceProvider_Release().

◆ IShellBrowserImpl_RemoveMenusSB()

static HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB ( IShellBrowser iface,
HMENU  hmenuShared 
)
static

Definition at line 579 of file filedlgbrowser.c.

582 {
584 
585  TRACE("(%p)\n", This);
586 
587  /* Feature not implemented */
588  return E_NOTIMPL;
589 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IShellBrowserImpl_SendControlMsg()

static HRESULT WINAPI IShellBrowserImpl_SendControlMsg ( IShellBrowser iface,
UINT  id,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
LRESULT pret 
)
static

Definition at line 594 of file filedlgbrowser.c.

601 {
603  LRESULT lres;
604 
605  TRACE("(%p)->(0x%08x 0x%08x 0x%08lx 0x%08lx %p)\n", This, id, uMsg, wParam, lParam, pret);
606 
607  switch (id)
608  {
609  case FCW_TOOLBAR:
610  lres = SendDlgItemMessageA( This->hwndOwner, IDC_TOOLBAR, uMsg, wParam, lParam);
611  break;
612  default:
613  FIXME("ctrl id: %x\n", id);
614  return E_NOTIMPL;
615  }
616  if (pret) *pret = lres;
617  return S_OK;
618 }
WPARAM wParam
Definition: combotst.c:138
#define FIXME(fmt,...)
Definition: debug.h:110
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define IDC_TOOLBAR
Definition: wordpad.h:157
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
LRESULT WINAPI SendDlgItemMessageA(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139

◆ IShellBrowserImpl_SetMenuSB()

static HRESULT WINAPI IShellBrowserImpl_SetMenuSB ( IShellBrowser iface,
HMENU  hmenuShared,
HOLEMENU  holemenuReserved,
HWND  hwndActiveObject 
)
static

Definition at line 623 of file filedlgbrowser.c.

628 {
630 
631  TRACE("(%p)\n", This);
632 
633  /* Feature not implemented */
634  return E_NOTIMPL;
635 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IShellBrowserImpl_SetStatusTextSB()

static HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB ( IShellBrowser iface,
LPCOLESTR  lpszStatusText 
)
static

Definition at line 640 of file filedlgbrowser.c.

643 {
645 
646  TRACE("(%p)\n", This);
647 
648  /* Feature not implemented */
649  return E_NOTIMPL;
650 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IShellBrowserImpl_SetToolbarItems()

static HRESULT WINAPI IShellBrowserImpl_SetToolbarItems ( IShellBrowser iface,
LPTBBUTTON  lpButtons,
UINT  nButtons,
UINT  uFlags 
)
static

Definition at line 655 of file filedlgbrowser.c.

660 {
662 
663  TRACE("(%p)\n", This);
664 
665  /* Feature not implemented */
666  return E_NOTIMPL;
667 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IShellBrowserImpl_TranslateAcceleratorSB()

static HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB ( IShellBrowser iface,
LPMSG  lpmsg,
WORD  wID 
)
static

Definition at line 672 of file filedlgbrowser.c.

676 {
678 
679  TRACE("(%p)\n", This);
680 
681  /* Feature not implemented */
682  return E_NOTIMPL;
683 }
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ send_includeitem_notification()

static LRESULT send_includeitem_notification ( HWND  hwndParentDlg,
LPCITEMIDLIST  pidl 
)
static

Definition at line 873 of file filedlgbrowser.c.

874 {
875  LRESULT hook_result = 0;
876  FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndParentDlg);
877 
878  if(!fodInfos) return 0;
879 
880  if(fodInfos->DlgInfos.hwndCustomDlg)
881  {
882  TRACE("call notify CDN_INCLUDEITEM for pidl=%p\n", pidl);
883  if(fodInfos->unicode)
884  {
885  OFNOTIFYEXW ofnNotify;
886  ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
887  ofnNotify.pidl = (LPITEMIDLIST)pidl;
888  ofnNotify.hdr.hwndFrom = hwndParentDlg;
889  ofnNotify.hdr.idFrom = 0;
890  ofnNotify.hdr.code = CDN_INCLUDEITEM;
891  ofnNotify.lpOFN = fodInfos->ofnInfos;
892  hook_result = SendMessageW(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
893  }
894  else
895  {
896  OFNOTIFYEXA ofnNotify;
897  ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
898  ofnNotify.pidl = (LPITEMIDLIST)pidl;
899  ofnNotify.hdr.hwndFrom = hwndParentDlg;
900  ofnNotify.hdr.idFrom = 0;
901  ofnNotify.hdr.code = CDN_INCLUDEITEM;
902  ofnNotify.lpOFN = (LPOPENFILENAMEA)fodInfos->ofnInfos;
903  hook_result = SendMessageA(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
904  }
905  }
906  TRACE("Retval: 0x%08lx\n", hook_result);
907  return hook_result;
908 }
struct FileOpenDlgInfos::@327 Shell
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPVOID pidl
Definition: commdlg.h:429
UINT code
Definition: winuser.h:3133
UINT_PTR idFrom
Definition: winuser.h:3132
#define CDN_INCLUDEITEM
Definition: commdlg.h:40
LPVOID pidl
Definition: commdlg.h:421
NMHDR hdr
Definition: commdlg.h:418
LONG_PTR LPARAM
Definition: windef.h:208
LPOPENFILENAMEW ofnInfos
#define TRACE(s)
Definition: solgame.cpp:4
struct FileOpenDlgInfos::@329 DlgInfos
HWND hwndFrom
Definition: winuser.h:3131
LPVOID psf
Definition: commdlg.h:420
NMHDR hdr
Definition: commdlg.h:426
LPVOID psf
Definition: commdlg.h:428
LPOPENFILENAMEW lpOFN
Definition: commdlg.h:427
LPOPENFILENAMEA lpOFN
Definition: commdlg.h:419
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LONG_PTR LRESULT
Definition: windef.h:209
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
struct tagOFNA * LPOPENFILENAMEA
#define WM_NOTIFY
Definition: richedit.h:61
FileOpenDlgInfos * get_filedlg_infoptr(HWND hwnd)
Definition: filedlg.c:156

Referenced by IShellBrowserImpl_ICommDlgBrowser_IncludeObject().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( commdlg  )

Variable Documentation

◆ IShellBrowserImpl_ICommDlgBrowser_Vtbl

static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl
static
Initial value:
=
{
}
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser *iface)
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser *iface)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface, IShellView *ppshv, LPCITEMIDLIST pidl)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(ICommDlgBrowser *iface, REFIID riid, LPVOID *ppvObj)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBrowser *iface, IShellView *ppshv, ULONG uChange)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowser *iface, IShellView *ppshv)

Definition at line 77 of file filedlgbrowser.c.

Referenced by IShellBrowserImpl_Construct().

◆ IShellBrowserImpl_IServiceProvider_Vtbl

static const IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
static ULONG WINAPI IShellBrowserImpl_IServiceProvider_Release(IServiceProvider *iface)
static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef(IServiceProvider *iface)
static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppvObj)

Definition at line 78 of file filedlgbrowser.c.

Referenced by IShellBrowserImpl_Construct().

◆ IShellBrowserImpl_Vtbl

static const IShellBrowserVtbl IShellBrowserImpl_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI IShellBrowserImpl_SetToolbarItems(IShellBrowser *iface, LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags)
static HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface, UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
static HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface, UINT id, HWND *lphwnd)
static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, REFIID riid, void **ppvObj)
static HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface, DWORD grfMode, LPSTREAM *ppStrm)
static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, LPCITEMIDLIST pidl, UINT wFlags)
static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser *iface)
static HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface, LPCOLESTR lpszStatusText)
static ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser *iface)
static HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface, IShellView *ppshv)
static HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface, BOOL fEnable)
static HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser *iface, HWND *phwnd)
static HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface, IShellView **ppshv)
static HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface, HMENU hmenuShared)
static HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
static HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface, LPMSG lpmsg, WORD wID)
static HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface, HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject)
static HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser *iface, BOOL fEnterMode)

Definition at line 76 of file filedlgbrowser.c.

Referenced by IShellBrowserImpl_Construct().