ReactOS 0.4.17-dev-934-g091855f
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
 

Macros

#define COBJMACROS
 
#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 IShellBrowserImpl * impl_from_IShellBrowser (IShellBrowser *iface)
 
static IShellBrowserImpl * impl_from_ICommDlgBrowser (ICommDlgBrowser *iface)
 
static IShellBrowserImpl * impl_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)
 
IShellBrowser * IShellBrowserImpl_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 85 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 34 of file filedlgbrowser.c.

Function Documentation

◆ COMDLG32_DumpSBSPFlags()

static void COMDLG32_DumpSBSPFlags ( UINT  uflags)
static

Definition at line 86 of file filedlgbrowser.c.

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

Referenced by IShellBrowserImpl_BrowseObject().

◆ COMDLG32_StrRetToStrNW()

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

Definition at line 155 of file filedlgbrowser.c.

156{
157 TRACE("dest=%p len=0x%lx strret=%p pidl=%p\n", dest , len, src, pidl);
158
159 switch (src->uType)
160 {
161 case STRRET_WSTR:
162 lstrcpynW(dest, src->pOleStr, len);
163 CoTaskMemFree(src->pOleStr);
164 break;
165
166 case STRRET_CSTR:
167 if (len && !MultiByteToWideChar( CP_ACP, 0, src->cStr, -1, dest, len ))
168 ((LPWSTR)dest)[len-1] = 0;
169 break;
170
171 case STRRET_OFFSET:
172 if (pidl)
173 {
174 if (len && !MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->uOffset,
175 -1, dest, len ))
176 ((LPWSTR)dest)[len-1] = 0;
177 }
178 break;
179
180 default:
181 FIXME("unknown type!\n");
182 if (len)
183 { *(LPWSTR)dest = '\0';
184 }
185 return(FALSE);
186 }
187 return TRUE;
188}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
#define lstrcpynW
Definition: compat.h:738
GLenum src
Definition: glext.h:6340
GLenum GLsizei len
Definition: glext.h:6722
static char * dest
Definition: rtl.c:149
@ STRRET_CSTR
Definition: shtypes.idl:87
@ STRRET_OFFSET
Definition: shtypes.idl:86
@ STRRET_WSTR
Definition: shtypes.idl:85
const char * LPCSTR
Definition: typedefs.h:52
uint16_t * LPWSTR
Definition: typedefs.h:56

Referenced by IShellBrowserImpl_ICommDlgBrowser_IncludeObject().

◆ COMDLG32_UpdateCurrentDir()

static void COMDLG32_UpdateCurrentDir ( const FileOpenDlgInfos *  fodInfos)
static

Definition at line 128 of file filedlgbrowser.c.

129{
130 LPSHELLFOLDER psfDesktop;
131 STRRET strret;
132 HRESULT res;
133
134 res = SHGetDesktopFolder(&psfDesktop);
135 if (FAILED(res))
136 return;
137
138 res = IShellFolder_GetDisplayNameOf(psfDesktop, fodInfos->ShellInfos.pidlAbsCurrent,
139 SHGDN_FORPARSING, &strret);
140 if (SUCCEEDED(res)) {
141 WCHAR wszCurrentDir[MAX_PATH];
142
143 res = StrRetToBufW(&strret, fodInfos->ShellInfos.pidlAbsCurrent, wszCurrentDir, MAX_PATH);
144 if (SUCCEEDED(res))
145 SetCurrentDirectoryW(wszCurrentDir);
146 }
147#ifdef __REACTOS__
148 DoUpdateAutoCompleteWithCWD(fodInfos, fodInfos->ShellInfos.pidlAbsCurrent);
149#endif
150
151 IShellFolder_Release(psfDesktop);
152}
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
EXTERN_C HRESULT DoUpdateAutoCompleteWithCWD(const FileOpenDlgInfos *info, LPCITEMIDLIST pidl)
Definition: autocomp.cpp:63
#define MAX_PATH
Definition: compat.h:34
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
Definition: path.c:2267
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
Definition: string.c:248
#define IShellFolder_GetDisplayNameOf
Definition: utils.cpp:13
GLuint res
Definition: glext.h:9613
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
short WCHAR
Definition: pedump.c:58
struct FileOpenDlgInfos::@432 ShellInfos

Referenced by IShellBrowserImpl_BrowseObject().

◆ impl_from_ICommDlgBrowser()

◆ impl_from_IServiceProvider()

◆ impl_from_IShellBrowser()

◆ IShellBrowserImpl_AddRef()

static ULONG WINAPI IShellBrowserImpl_AddRef ( IShellBrowser *  iface)
static

Definition at line 258 of file filedlgbrowser.c.

259{
262
263 TRACE("(%p,%lu)\n", This, ref - 1);
264
265 return ref;
266}
#define InterlockedIncrement
Definition: armddk.h:53
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

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 340 of file filedlgbrowser.c.

343{
344 HRESULT hRes;
346 IShellView *psvTmp;
347 FileOpenDlgInfos *fodInfos;
348 LPITEMIDLIST pidlTmp;
349 HWND hwndView;
350 HWND hDlgWnd;
351 BOOL bViewHasFocus;
352 RECT rectView;
353
355
356 TRACE("(%p)(pidl=%p,flags=0x%08x)\n", This, pidl, wFlags);
358
359 fodInfos = get_filedlg_infoptr(This->hwndOwner);
360
361 /* Format the pidl according to its parameter's category */
362 if(wFlags & SBSP_RELATIVE)
363 {
364
365 /* SBSP_RELATIVE A relative pidl (relative from the current folder) */
366 if (FAILED(hRes = IShellFolder_BindToObject(fodInfos->Shell.FOIShellFolder,
367 pidl, NULL, &IID_IShellFolder, (void **)&folder)))
368 {
369 ERR("bind to object failed\n");
370 return hRes;
371 }
372 /* create an absolute pidl */
373 pidlTmp = ILCombine(fodInfos->ShellInfos.pidlAbsCurrent, pidl);
374 }
375 else if(wFlags & SBSP_PARENT)
376 {
377 /* Browse the parent folder (ignores the pidl) */
378 pidlTmp = GetParentPidl(fodInfos->ShellInfos.pidlAbsCurrent);
380 }
381 else /* SBSP_ABSOLUTE is 0x0000 */
382 {
383 /* An absolute pidl (relative from the desktop) */
384 pidlTmp = ILClone(pidl);
386 }
387
388 if (!folder)
389 {
390 ERR("could not browse to folder\n");
391 ILFree(pidlTmp);
392 return E_FAIL;
393 }
394
395 /* If the pidl to browse to is equal to the actual pidl ...
396 do nothing and pretend you did it*/
397 if (ILIsEqual(pidlTmp, fodInfos->ShellInfos.pidlAbsCurrent))
398 {
399 IShellFolder_Release(folder);
400 ILFree(pidlTmp);
401 TRACE("keep current folder\n");
402 return S_OK;
403 }
404
405 /* Release the current DataObject */
406 if (fodInfos->Shell.FOIDataObject)
407 {
408 IDataObject_Release(fodInfos->Shell.FOIDataObject);
409 fodInfos->Shell.FOIDataObject = NULL;
410 }
411
412 /* Create the associated view */
413 TRACE("create view object\n");
414 if (FAILED(hRes = IShellFolder_CreateViewObject(folder, fodInfos->ShellInfos.hwndOwner,
415 &IID_IShellView, (void **)&psvTmp)))
416 {
417 IShellFolder_Release(folder);
418 ILFree(pidlTmp);
419 return hRes;
420 }
421
422 /* Check if listview has focus */
423 bViewHasFocus = IsChild(fodInfos->ShellInfos.hwndView,GetFocus());
424
425 /* Get the foldersettings from the old view */
426 if(fodInfos->Shell.FOIShellView)
427 IShellView_GetCurrentInfo(fodInfos->Shell.FOIShellView, &fodInfos->ShellInfos.folderSettings);
428
429 /* Release the old fodInfos->Shell.FOIShellView and update its value.
430 We have to update this early since ShellView_CreateViewWindow of native
431 shell32 calls OnStateChange and needs the correct view here.*/
432 if(fodInfos->Shell.FOIShellView)
433 {
434 IShellView_DestroyViewWindow(fodInfos->Shell.FOIShellView);
435 IShellView_Release(fodInfos->Shell.FOIShellView);
436 }
437 fodInfos->Shell.FOIShellView = psvTmp;
438
439 /* Release old FOIShellFolder and update its value */
440 if (fodInfos->Shell.FOIShellFolder)
441 IShellFolder_Release(fodInfos->Shell.FOIShellFolder);
442 fodInfos->Shell.FOIShellFolder = folder;
443
444 /* Release old pidlAbsCurrent and update its value */
445 ILFree(fodInfos->ShellInfos.pidlAbsCurrent);
446 fodInfos->ShellInfos.pidlAbsCurrent = pidlTmp;
447
449
450 GetWindowRect(GetDlgItem(This->hwndOwner, IDC_SHELLSTATIC), &rectView);
451 MapWindowPoints(0, This->hwndOwner, (LPPOINT)&rectView, 2);
452
453 /* Create the window */
454 TRACE("create view window\n");
455 if (FAILED(hRes = IShellView_CreateViewWindow(psvTmp, NULL,
456 &fodInfos->ShellInfos.folderSettings, fodInfos->Shell.FOIShellBrowser,
457 &rectView, &hwndView)))
458 {
459 WARN("Failed to create view window, hr %#lx.\n", hRes);
460 return hRes;
461 }
462
463 fodInfos->ShellInfos.hwndView = hwndView;
464
465 /* Set view window control id to 5002 */
466 SetWindowLongPtrW(hwndView, GWLP_ID, lst2);
467 SendMessageW( hwndView, WM_SETFONT, SendMessageW( GetParent(hwndView), WM_GETFONT, 0, 0 ), FALSE );
468
469 /* Select the new folder in the Look In combo box of the Open file dialog */
470 FILEDLG95_LOOKIN_SelectItem(fodInfos->DlgInfos.hwndLookInCB,fodInfos->ShellInfos.pidlAbsCurrent);
471
472 /* changes the tab order of the ListView to reflect the window's File Dialog */
473 hDlgWnd = GetDlgItem(GetParent(hwndView), IDC_LOOKIN);
474 SetWindowPos(hwndView, hDlgWnd, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
475
476 /* Since we destroyed the old view if it had focus set focus to the newly created view */
477 if (bViewHasFocus)
478 SetFocus(fodInfos->ShellInfos.hwndView);
479
480 return hRes;
481}
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define E_FAIL
Definition: ddrawi.h:102
#define lst2
Definition: dlgs.h:101
#define NULL
Definition: types.h:112
LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl)
Definition: filedlg.c:4600
FileOpenDlgInfos * get_filedlg_infoptr(HWND hwnd)
Definition: filedlg.c:218
IShellFolder * GetShellFolderFromPidl(LPITEMIDLIST pidlAbs)
Definition: filedlg.c:4572
int FILEDLG95_LOOKIN_SelectItem(HWND hwnd, LPITEMIDLIST pidl)
Definition: filedlg.c:4165
static void COMDLG32_UpdateCurrentDir(const FileOpenDlgInfos *fodInfos)
static void COMDLG32_DumpSBSPFlags(UINT uflags)
#define IDC_SHELLSTATIC
#define IDC_LOOKIN
unsigned int BOOL
Definition: ntddk_ex.h:94
#define S_OK
Definition: intsafe.h:52
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:238
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:1051
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:817
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:583
HWND WINAPI GetFocus(void)
Definition: window.c:1887
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOMOVE
Definition: winuser.h:1255
#define SWP_NOSIZE
Definition: winuser.h:1256
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define WM_GETFONT
Definition: winuser.h:1679
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
#define WM_SETFONT
Definition: winuser.h:1678
HWND WINAPI GetParent(_In_ HWND)
#define GWLP_ID
Definition: winuser.h:871
#define SetWindowLongPtrW
Definition: winuser.h:5512
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
struct FileOpenDlgInfos::@433 DlgInfos
struct FileOpenDlgInfos::@431 Shell
Definition: dcommon.idl:28
Definition: fci.c:112
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337

◆ IShellBrowserImpl_Construct()

IShellBrowser * IShellBrowserImpl_Construct ( HWND  hwndOwner)

Definition at line 197 of file filedlgbrowser.c.

198{
199 FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndOwner);
201
202 sb = heap_alloc(sizeof(*sb));
203
204 /* Initialisation of the member variables */
205 sb->ref=1;
206 sb->hwndOwner = hwndOwner;
207
208 /* Initialisation of the vTables */
209 sb->IShellBrowser_iface.lpVtbl = &IShellBrowserImpl_Vtbl;
210 sb->ICommDlgBrowser_iface.lpVtbl = &IShellBrowserImpl_ICommDlgBrowser_Vtbl;
211 sb->IServiceProvider_iface.lpVtbl = &IShellBrowserImpl_IServiceProvider_Vtbl;
213 &fodInfos->ShellInfos.pidlAbsCurrent);
214
215 TRACE("%p\n", sb);
216
217 return &sb->IShellBrowser_iface;
218}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:3385
superblock * sb
Definition: btrfs.c:4261
static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl
static const IShellBrowserVtbl IShellBrowserImpl_Vtbl
static const IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl
#define CSIDL_DESKTOP
Definition: shlobj.h:2191

◆ IShellBrowserImpl_ContextSensitiveHelp()

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

Definition at line 317 of file filedlgbrowser.c.

319{
321
322 TRACE("(%p)\n", This);
323
324 /* Feature not implemented */
325 return E_NOTIMPL;
326}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IShellBrowserImpl_EnableModelessSB()

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

Definition at line 486 of file filedlgbrowser.c.

489{
491
492 TRACE("(%p)\n", This);
493
494 /* Feature not implemented */
495 return E_NOTIMPL;
496}

◆ IShellBrowserImpl_GetControlWindow()

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

Definition at line 501 of file filedlgbrowser.c.

505{
507
508 TRACE("(%p)\n", This);
509
510 /* Feature not implemented */
511 return E_NOTIMPL;
512}

◆ IShellBrowserImpl_GetViewStateStream()

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

Definition at line 517 of file filedlgbrowser.c.

521{
523
524 FIXME("(%p 0x%08lx %p)\n", This, grfMode, ppStrm);
525
526 /* Feature not implemented */
527 return E_NOTIMPL;
528}

◆ IShellBrowserImpl_GetWindow()

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

Definition at line 298 of file filedlgbrowser.c.

300{
302
303 TRACE("(%p)\n", This);
304
305 if(!This->hwndOwner)
306 return E_FAIL;
307
308 *phwnd = This->hwndOwner;
309
310 return (*phwnd) ? S_OK : E_UNEXPECTED;
311
312}
#define E_UNEXPECTED
Definition: winerror.h:3528

◆ IShellBrowserImpl_ICommDlgBrowser_AddRef()

static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef ( ICommDlgBrowser *  iface)
static

Definition at line 746 of file filedlgbrowser.c.

747{
749
750 TRACE("(%p)\n", This);
751
752 return IShellBrowserImpl_AddRef(&This->IShellBrowser_iface);
753}
static ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser *iface)
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 933 of file filedlgbrowser.c.

936{
937 FileOpenDlgInfos *fodInfos;
938 ULONG ulAttr;
939 STRRET str;
940 WCHAR szPathW[MAX_PATH];
941
943
944 TRACE("(%p)\n", This);
945
946 fodInfos = get_filedlg_infoptr(This->hwndOwner);
947
948 ulAttr = SFGAO_HIDDEN | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_LINK;
949 IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr);
950
951 if( (ulAttr & SFGAO_HIDDEN) || /* hidden */
952 !(ulAttr & (SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR))) /* special folder */
953 return S_FALSE;
954
955 /* always include directories and links */
956 if(ulAttr & (SFGAO_FOLDER | SFGAO_LINK))
957 return S_OK;
958
959 /* if the application takes care of including the item we are done */
960 if(fodInfos->ofnInfos->Flags & OFN_ENABLEINCLUDENOTIFY &&
961 send_includeitem_notification(This->hwndOwner, pidl))
962 return S_OK;
963
964 /* Check if there is a mask to apply if not */
965 if(!fodInfos->ShellInfos.lpstrCurrentFilter || !fodInfos->ShellInfos.lpstrCurrentFilter[0])
966 return S_OK;
967
968 if (SUCCEEDED(IShellFolder_GetDisplayNameOf(fodInfos->Shell.FOIShellFolder, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING, &str)))
969 {
970 if (COMDLG32_StrRetToStrNW(szPathW, MAX_PATH, &str, pidl))
971 {
972 if (PathMatchSpecW(szPathW, fodInfos->ShellInfos.lpstrCurrentFilter))
973 return S_OK;
974 }
975 }
976 return S_FALSE;
977
978}
#define OFN_ENABLEINCLUDENOTIFY
Definition: commdlg.h:100
BOOL WINAPI PathMatchSpecW(const WCHAR *path, const WCHAR *mask)
Definition: path.c:2497
static LRESULT send_includeitem_notification(HWND hwndParentDlg, LPCITEMIDLIST pidl)
static BOOL COMDLG32_StrRetToStrNW(LPVOID dest, DWORD len, LPSTRRET src, LPCITEMIDLIST pidl)
const WCHAR * str
LPOPENFILENAMEW ofnInfos
DWORD Flags
Definition: commdlg.h:373
#define S_FALSE
Definition: winerror.h:3451

◆ IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand()

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

Definition at line 772 of file filedlgbrowser.c.

774{
775 LPITEMIDLIST pidl;
776 FileOpenDlgInfos *fodInfos;
777
779
780 TRACE("(%p)\n", This);
781
782 fodInfos = get_filedlg_infoptr(This->hwndOwner);
783
784 /* If the selected object is not a folder, send an IDOK command to parent window */
785 if((pidl = GetPidlFromDataObject(fodInfos->Shell.FOIDataObject, 1)))
786 {
787 HRESULT hRes;
788
789#ifdef __REACTOS__
790 ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
791#else
792 ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER;
793#endif
794 IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, (LPCITEMIDLIST *)&pidl, &ulAttr);
795#ifdef __REACTOS__
796 if ((ulAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER)) && (ulAttr & SFGAO_FILESYSANCESTOR))
797#else
798 if (ulAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER) )
799#endif
800 {
801 hRes = IShellBrowser_BrowseObject(&This->IShellBrowser_iface,pidl,SBSP_RELATIVE);
802 if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
804 }
805 else
806 {
807 /* Tell the dialog that the user selected a file */
808 PostMessageA(This->hwndOwner, WM_COMMAND, IDOK, 0L);
809 hRes = S_OK;
810 }
811
812 ILFree(pidl);
813
814 return hRes;
815 }
816
817 return E_FAIL;
818}
#define OFN_EXPLORER
Definition: commdlg.h:104
#define CDN_FOLDERCHANGE
Definition: commdlg.h:35
LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode)
Definition: filedlg.c:1074
LPITEMIDLIST GetPidlFromDataObject(IDataObject *doSelected, UINT nPidlIndex)
Definition: filedlg.c:4477
#define L(x)
Definition: resources.c:13
#define WM_COMMAND
Definition: winuser.h:1768
#define IDOK
Definition: winuser.h:841
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42

◆ IShellBrowserImpl_ICommDlgBrowser_OnStateChange()

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

Definition at line 849 of file filedlgbrowser.c.

852{
853
855
856 TRACE("(%p shv=%p)\n", This, ppshv);
857
858 switch (uChange)
859 {
860 case CDBOSC_SETFOCUS:
861 /* FIXME: Reset the default button.
862 This should be taken care of by defdlg. If control
863 other than button receives focus the default button
864 should be restored. */
865 SendMessageA(This->hwndOwner, DM_SETDEFID, IDOK, 0);
866
867 break;
868 case CDBOSC_KILLFOCUS:
869 {
870 FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(This->hwndOwner);
871 if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
872 {
873 WCHAR szSave[16];
875 SetDlgItemTextW(fodInfos->ShellInfos.hwndOwner, IDOK, szSave);
876 }
877 }
878 break;
879 case CDBOSC_SELCHANGE:
880 return IShellBrowserImpl_OnSelChange(This, ppshv);
881 case CDBOSC_RENAME:
882 /* nothing to do */
883 break;
884 }
885
886 return NOERROR;
887}
HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
#define IDS_SAVE_BUTTON
Definition: cdlg.h:156
static HRESULT IShellBrowserImpl_OnSelChange(IShellBrowserImpl *This, const IShellView *ppshv)
#define FODPROP_SAVEDLG
#define DM_SETDEFID
Definition: winuser.h:2135
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define LoadStringW
Definition: utils.h:64
#define NOERROR
Definition: winerror.h:3448

◆ IShellBrowserImpl_ICommDlgBrowser_QueryInterface()

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

Definition at line 731 of file filedlgbrowser.c.

735{
737
738 TRACE("(%p)\n", This);
739
740 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppvObj);
741}
static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, REFIID riid, void **ppvObj)
REFIID riid
Definition: atlbase.h:39

◆ IShellBrowserImpl_ICommDlgBrowser_Release()

static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release ( ICommDlgBrowser *  iface)
static

Definition at line 758 of file filedlgbrowser.c.

759{
761
762 TRACE("(%p)\n", This);
763
764 return IShellBrowserImpl_Release(&This->IShellBrowser_iface);
765}
static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser *iface)

◆ IShellBrowserImpl_InsertMenusSB()

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

Definition at line 533 of file filedlgbrowser.c.

537{
539
540 TRACE("(%p)\n", This);
541
542 /* Feature not implemented */
543 return E_NOTIMPL;
544}

◆ IShellBrowserImpl_IServiceProvider_AddRef()

static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef ( IServiceProvider *  iface)
static

Definition at line 1017 of file filedlgbrowser.c.

1018{
1020
1021 FIXME("(%p)\n", This);
1022
1023 return IShellBrowserImpl_AddRef(&This->IShellBrowser_iface);
1024}
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 1002 of file filedlgbrowser.c.

1006{
1008
1009 FIXME("(%p)\n", This);
1010
1011 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppvObj);
1012}

◆ IShellBrowserImpl_IServiceProvider_QueryService()

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

Definition at line 1049 of file filedlgbrowser.c.

1054{
1056
1057 FIXME("(%p)\n\t%s\n\t%s\n", This,debugstr_guid(guidService), debugstr_guid(riid) );
1058
1059 *ppv = NULL;
1060 if(guidService && IsEqualIID(guidService, &SID_STopLevelBrowser))
1061 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppv);
1062
1063 FIXME("(%p) unknown interface requested\n", This);
1064 return E_NOINTERFACE;
1065
1066}
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ IShellBrowserImpl_IServiceProvider_Release()

static ULONG WINAPI IShellBrowserImpl_IServiceProvider_Release ( IServiceProvider *  iface)
static

Definition at line 1029 of file filedlgbrowser.c.

1030{
1032
1033 FIXME("(%p)\n", This);
1034
1035 return IShellBrowserImpl_Release(&This->IShellBrowser_iface);
1036}

◆ IShellBrowserImpl_OnSelChange()

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

Definition at line 823 of file filedlgbrowser.c.

824{
825 FileOpenDlgInfos *fodInfos;
826
827 fodInfos = get_filedlg_infoptr(This->hwndOwner);
828 TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
829
830 /* release old selections */
831 if (fodInfos->Shell.FOIDataObject)
832 IDataObject_Release(fodInfos->Shell.FOIDataObject);
833
834 /* get a new DataObject from the ShellView */
835 if(FAILED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView, SVGIO_SELECTION,
836 &IID_IDataObject, (void**)&fodInfos->Shell.FOIDataObject)))
837 return E_FAIL;
838
840
841 if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
843 return S_OK;
844}
#define CDN_SELCHANGE
Definition: commdlg.h:34
void FILEDLG95_FILENAME_FillFromSelection(HWND hwnd)
Definition: filedlg.c:4319
const GUID IID_IDataObject

Referenced by IShellBrowserImpl_ICommDlgBrowser_OnStateChange().

◆ IShellBrowserImpl_OnViewWindowActive()

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

Definition at line 549 of file filedlgbrowser.c.

552{
554
555 TRACE("(%p)\n", This);
556
557 /* Feature not implemented */
558 return E_NOTIMPL;
559}

◆ IShellBrowserImpl_QueryActiveShellView()

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

Definition at line 564 of file filedlgbrowser.c.

567{
569
570 FileOpenDlgInfos *fodInfos;
571
572 TRACE("(%p)\n", This);
573
574 fodInfos = get_filedlg_infoptr(This->hwndOwner);
575
576 if(!(*ppshv = fodInfos->Shell.FOIShellView))
577 {
578 return E_FAIL;
579 }
580 IShellView_AddRef(fodInfos->Shell.FOIShellView);
581 return NOERROR;
582}

◆ IShellBrowserImpl_QueryInterface()

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

Definition at line 223 of file filedlgbrowser.c.

224{
226
227 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObj);
228
229 *ppvObj = NULL;
230
232 *ppvObj = &This->IShellBrowser_iface;
233 else if(IsEqualIID(riid, &IID_IOleWindow))
234 *ppvObj = &This->IShellBrowser_iface;
235 else if(IsEqualIID(riid, &IID_IShellBrowser))
236 *ppvObj = &This->IShellBrowser_iface;
237 else if(IsEqualIID(riid, &IID_ICommDlgBrowser))
238 *ppvObj = &This->ICommDlgBrowser_iface;
239 else if(IsEqualIID(riid, &IID_IServiceProvider))
240 *ppvObj = &This->IServiceProvider_iface;
241
242 if(*ppvObj) {
243 IUnknown_AddRef((IUnknown*)*ppvObj);
244 return S_OK;
245 }
246
247#ifdef __REACTOS__
248 TRACE("unsupported interface, %s\n", debugstr_guid(riid));
249#else
250 FIXME("unsupported interface, %s\n", debugstr_guid(riid));
251#endif
252 return E_NOINTERFACE;
253}
const GUID IID_IUnknown
const GUID IID_IOleWindow

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 271 of file filedlgbrowser.c.

272{
275
276 TRACE("(%p,%lu)\n", This, ref + 1);
277
278 if (!ref)
280
281 return ref;
282}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedDecrement
Definition: armddk.h:52

Referenced by IShellBrowserImpl_ICommDlgBrowser_Release(), and IShellBrowserImpl_IServiceProvider_Release().

◆ IShellBrowserImpl_RemoveMenusSB()

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

Definition at line 587 of file filedlgbrowser.c.

590{
592
593 TRACE("(%p)\n", This);
594
595 /* Feature not implemented */
596 return E_NOTIMPL;
597}

◆ IShellBrowserImpl_SendControlMsg()

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

Definition at line 602 of file filedlgbrowser.c.

609{
611 LRESULT lres;
612
613 TRACE("(%p)->(0x%08x 0x%08x 0x%08Ix 0x%08Ix %p)\n", This, id, uMsg, wParam, lParam, pret);
614
615 switch (id)
616 {
617 case FCW_TOOLBAR:
618 lres = SendDlgItemMessageA( This->hwndOwner, IDC_TOOLBAR, uMsg, wParam, lParam);
619 break;
620 default:
621#ifdef __REACTOS__
622 TRACE("ctrl id: %x\n", id);
623#else
624 FIXME("ctrl id: %x\n", id);
625#endif
626 return E_NOTIMPL;
627 }
628 if (pret) *pret = lres;
629 return S_OK;
630}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
LONG_PTR LRESULT
Definition: minwindef.h:176
LRESULT WINAPI SendDlgItemMessageA(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_TOOLBAR
Definition: wordpad.h:157

◆ IShellBrowserImpl_SetMenuSB()

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

Definition at line 635 of file filedlgbrowser.c.

640{
642
643 TRACE("(%p)\n", This);
644
645 /* Feature not implemented */
646 return E_NOTIMPL;
647}

◆ IShellBrowserImpl_SetStatusTextSB()

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

Definition at line 652 of file filedlgbrowser.c.

655{
657
658 TRACE("(%p)\n", This);
659
660 /* Feature not implemented */
661 return E_NOTIMPL;
662}

◆ IShellBrowserImpl_SetToolbarItems()

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

Definition at line 667 of file filedlgbrowser.c.

672{
674
675 TRACE("(%p)\n", This);
676
677 /* Feature not implemented */
678 return E_NOTIMPL;
679}

◆ IShellBrowserImpl_TranslateAcceleratorSB()

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

Definition at line 684 of file filedlgbrowser.c.

688{
690
691 TRACE("(%p)\n", This);
692
693 /* Feature not implemented */
694 return E_NOTIMPL;
695}

◆ send_includeitem_notification()

static LRESULT send_includeitem_notification ( HWND  hwndParentDlg,
LPCITEMIDLIST  pidl 
)
static

Definition at line 893 of file filedlgbrowser.c.

894{
895 LRESULT hook_result = 0;
896 FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndParentDlg);
897
898 if(!fodInfos) return 0;
899
900 if(fodInfos->DlgInfos.hwndCustomDlg)
901 {
902 TRACE("call notify CDN_INCLUDEITEM for pidl=%p\n", pidl);
903 if(fodInfos->unicode)
904 {
905 OFNOTIFYEXW ofnNotify;
906 ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
907 ofnNotify.pidl = (LPITEMIDLIST)pidl;
908 ofnNotify.hdr.hwndFrom = hwndParentDlg;
909 ofnNotify.hdr.idFrom = 0;
910 ofnNotify.hdr.code = CDN_INCLUDEITEM;
911 ofnNotify.lpOFN = fodInfos->ofnInfos;
912 hook_result = SendMessageW(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
913 }
914 else
915 {
916 OFNOTIFYEXA ofnNotify;
917 ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
918 ofnNotify.pidl = (LPITEMIDLIST)pidl;
919 ofnNotify.hdr.hwndFrom = hwndParentDlg;
920 ofnNotify.hdr.idFrom = 0;
921 ofnNotify.hdr.code = CDN_INCLUDEITEM;
922 ofnNotify.lpOFN = (LPOPENFILENAMEA)fodInfos->ofnInfos;
923 hook_result = SendMessageA(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
924 }
925 }
926 TRACE("Retval: 0x%08Ix\n", hook_result);
927 return hook_result;
928}
struct tagOFNA * LPOPENFILENAMEA
#define CDN_INCLUDEITEM
Definition: commdlg.h:40
LONG_PTR LPARAM
Definition: minwindef.h:175
#define WM_NOTIFY
Definition: richedit.h:61
LPVOID psf
Definition: commdlg.h:420
NMHDR hdr
Definition: commdlg.h:418
LPVOID pidl
Definition: commdlg.h:421
LPOPENFILENAMEA lpOFN
Definition: commdlg.h:419
LPVOID pidl
Definition: commdlg.h:429
LPVOID psf
Definition: commdlg.h:428
LPOPENFILENAMEW lpOFN
Definition: commdlg.h:427
NMHDR hdr
Definition: commdlg.h:426
UINT_PTR idFrom
Definition: winuser.h:3266
UINT code
Definition: winuser.h:3267
HWND hwndFrom
Definition: winuser.h:3265

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 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowser *iface, IShellView *ppshv)
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser *iface)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface, IShellView *ppshv, LPCITEMIDLIST pidl)
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser *iface)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(ICommDlgBrowser *iface, REFIID riid, LPVOID *ppvObj)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBrowser *iface, IShellView *ppshv, ULONG uChange)

Definition at line 78 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_AddRef(IServiceProvider *iface)
static ULONG WINAPI IShellBrowserImpl_IServiceProvider_Release(IServiceProvider *iface)
static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppvObj)

Definition at line 79 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_GetControlWindow(IShellBrowser *iface, UINT id, HWND *lphwnd)
static HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface, UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
static HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser *iface, BOOL fEnterMode)
static HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface, BOOL fEnable)
static HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface, HMENU hmenuShared)
static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, LPCITEMIDLIST pidl, UINT wFlags)
static HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
static HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface, HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject)
static HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface, IShellView *ppshv)
static HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface, DWORD grfMode, LPSTREAM *ppStrm)
static HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface, LPCOLESTR lpszStatusText)
static HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface, IShellView **ppshv)
static HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser *iface, HWND *phwnd)
static HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface, LPMSG lpmsg, WORD wID)

Definition at line 77 of file filedlgbrowser.c.

Referenced by IShellBrowserImpl_Construct().