ReactOS 0.4.15-dev-7953-g1f49173
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 87 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 88 of file filedlgbrowser.c.

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

158{
159 TRACE("dest=%p len=0x%x strret=%p pidl=%p\n", dest , len, src, pidl);
160
161 switch (src->uType)
162 {
163 case STRRET_WSTR:
164 lstrcpynW(dest, src->u.pOleStr, len);
165 CoTaskMemFree(src->u.pOleStr);
166 break;
167
168 case STRRET_CSTR:
169 if (len && !MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ))
170 ((LPWSTR)dest)[len-1] = 0;
171 break;
172
173 case STRRET_OFFSET:
174 if (pidl)
175 {
176 if (len && !MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset,
177 -1, dest, len ))
178 ((LPWSTR)dest)[len-1] = 0;
179 }
180 break;
181
182 default:
183 FIXME("unknown type!\n");
184 if (len)
185 { *(LPWSTR)dest = '\0';
186 }
187 return(FALSE);
188 }
189 return TRUE;
190}
#define FIXME(fmt,...)
Definition: debug.h:111
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
static char * dest
Definition: rtl.c:135
@ STRRET_CSTR
Definition: shtypes.idl:87
@ STRRET_OFFSET
Definition: shtypes.idl:86
@ STRRET_WSTR
Definition: shtypes.idl:85
const char * LPCSTR
Definition: xmlstorage.h:183
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by IShellBrowserImpl_ICommDlgBrowser_IncludeObject().

◆ COMDLG32_UpdateCurrentDir()

static void COMDLG32_UpdateCurrentDir ( const FileOpenDlgInfos fodInfos)
static

Definition at line 130 of file filedlgbrowser.c.

131{
132 LPSHELLFOLDER psfDesktop;
133 STRRET strret;
134 HRESULT res;
135
136 res = SHGetDesktopFolder(&psfDesktop);
137 if (FAILED(res))
138 return;
139
140 res = IShellFolder_GetDisplayNameOf(psfDesktop, fodInfos->ShellInfos.pidlAbsCurrent,
141 SHGDN_FORPARSING, &strret);
142 if (SUCCEEDED(res)) {
143 WCHAR wszCurrentDir[MAX_PATH];
144
145 res = StrRetToBufW(&strret, fodInfos->ShellInfos.pidlAbsCurrent, wszCurrentDir, MAX_PATH);
146 if (SUCCEEDED(res))
147 SetCurrentDirectoryW(wszCurrentDir);
148 }
149#ifdef __REACTOS__
150 DoUpdateAutoCompleteWithCWD(fodInfos, fodInfos->ShellInfos.pidlAbsCurrent);
151#endif
152
153 IShellFolder_Release(psfDesktop);
154}
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:2249
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
Definition: string.c:1530
GLuint res
Definition: glext.h:9613
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
struct FileOpenDlgInfos::@345 ShellInfos
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by IShellBrowserImpl_BrowseObject().

◆ impl_from_ICommDlgBrowser()

static IShellBrowserImpl * impl_from_ICommDlgBrowser ( ICommDlgBrowser iface)
inlinestatic

Definition at line 66 of file filedlgbrowser.c.

67{
68 return CONTAINING_RECORD(iface, IShellBrowserImpl, ICommDlgBrowser_iface);
69}
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

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

◆ impl_from_IServiceProvider()

◆ impl_from_IShellBrowser()

◆ IShellBrowserImpl_AddRef()

static ULONG WINAPI IShellBrowserImpl_AddRef ( IShellBrowser iface)
static

Definition at line 256 of file filedlgbrowser.c.

257{
260
261 TRACE("(%p,%u)\n", This, ref - 1);
262
263 return ref;
264}
#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 338 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_Construct()

IShellBrowser * IShellBrowserImpl_Construct ( HWND  hwndOwner)

Definition at line 199 of file filedlgbrowser.c.

200{
201 FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndOwner);
203
204 sb = heap_alloc(sizeof(*sb));
205
206 /* Initialisation of the member variables */
207 sb->ref=1;
208 sb->hwndOwner = hwndOwner;
209
210 /* Initialisation of the vTables */
211 sb->IShellBrowser_iface.lpVtbl = &IShellBrowserImpl_Vtbl;
212 sb->ICommDlgBrowser_iface.lpVtbl = &IShellBrowserImpl_ICommDlgBrowser_Vtbl;
213 sb->IServiceProvider_iface.lpVtbl = &IShellBrowserImpl_IServiceProvider_Vtbl;
215 &fodInfos->ShellInfos.pidlAbsCurrent);
216
217 TRACE("%p\n", sb);
218
219 return &sb->IShellBrowser_iface;
220}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:3225
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:2158

◆ IShellBrowserImpl_ContextSensitiveHelp()

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

Definition at line 315 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_EnableModelessSB()

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

Definition at line 484 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_GetControlWindow()

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

Definition at line 499 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_GetViewStateStream()

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

Definition at line 515 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_GetWindow()

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

Definition at line 296 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_ICommDlgBrowser_AddRef()

static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef ( ICommDlgBrowser iface)
static

Definition at line 740 of file filedlgbrowser.c.

741{
743
744 TRACE("(%p)\n", This);
745
746 return IShellBrowserImpl_AddRef(&This->IShellBrowser_iface);
747}
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 919 of file filedlgbrowser.c.

922{
923 FileOpenDlgInfos *fodInfos;
924 ULONG ulAttr;
925 STRRET str;
926 WCHAR szPathW[MAX_PATH];
927
929
930 TRACE("(%p)\n", This);
931
932 fodInfos = get_filedlg_infoptr(This->hwndOwner);
933
934 ulAttr = SFGAO_HIDDEN | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_LINK;
935 IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr);
936
937 if( (ulAttr & SFGAO_HIDDEN) || /* hidden */
938 !(ulAttr & (SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR))) /* special folder */
939 return S_FALSE;
940
941 /* always include directories and links */
942 if(ulAttr & (SFGAO_FOLDER | SFGAO_LINK))
943 return S_OK;
944
945 /* if the application takes care of including the item we are done */
946 if(fodInfos->ofnInfos->Flags & OFN_ENABLEINCLUDENOTIFY &&
947 send_includeitem_notification(This->hwndOwner, pidl))
948 return S_OK;
949
950 /* Check if there is a mask to apply if not */
951 if(!fodInfos->ShellInfos.lpstrCurrentFilter || !fodInfos->ShellInfos.lpstrCurrentFilter[0])
952 return S_OK;
953
954 if (SUCCEEDED(IShellFolder_GetDisplayNameOf(fodInfos->Shell.FOIShellFolder, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING, &str)))
955 {
956 if (COMDLG32_StrRetToStrNW(szPathW, MAX_PATH, &str, pidl))
957 {
958 if (PathMatchSpecW(szPathW, fodInfos->ShellInfos.lpstrCurrentFilter))
959 return S_OK;
960 }
961 }
962 return S_FALSE;
963
964}
#define OFN_ENABLEINCLUDENOTIFY
Definition: commdlg.h:100
BOOL WINAPI PathMatchSpecW(LPCWSTR lpszPath, LPCWSTR lpszMask)
Definition: path.c:1964
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:2357

◆ IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand()

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

Definition at line 766 of file filedlgbrowser.c.

768{
769 LPITEMIDLIST pidl;
770 FileOpenDlgInfos *fodInfos;
771
773
774 TRACE("(%p)\n", This);
775
776 fodInfos = get_filedlg_infoptr(This->hwndOwner);
777
778 /* If the selected object is not a folder, send an IDOK command to parent window */
779 if((pidl = GetPidlFromDataObject(fodInfos->Shell.FOIDataObject, 1)))
780 {
781 HRESULT hRes;
782
783 ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
784 IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, (LPCITEMIDLIST *)&pidl, &ulAttr);
785 if ((ulAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER)) && (ulAttr & SFGAO_FILESYSANCESTOR))
786 {
787 hRes = IShellBrowser_BrowseObject(&This->IShellBrowser_iface,pidl,SBSP_RELATIVE);
788 if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
790 }
791 else
792 {
793 /* Tell the dialog that the user selected a file */
794 PostMessageA(This->hwndOwner, WM_COMMAND, IDOK, 0L);
795 hRes = S_OK;
796 }
797
798 ILFree(pidl);
799
800 return hRes;
801 }
802
803 return E_FAIL;
804}
#define OFN_EXPLORER
Definition: commdlg.h:104
#define CDN_FOLDERCHANGE
Definition: commdlg.h:35
LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode)
Definition: filedlg.c:1086
LPITEMIDLIST GetPidlFromDataObject(IDataObject *doSelected, UINT nPidlIndex)
Definition: filedlg.c:4461
#define L(x)
Definition: ntvdm.h:50
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define WM_COMMAND
Definition: winuser.h:1740
#define IDOK
Definition: winuser.h:830
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

◆ IShellBrowserImpl_ICommDlgBrowser_OnStateChange()

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

Definition at line 835 of file filedlgbrowser.c.

838{
839
841
842 TRACE("(%p shv=%p)\n", This, ppshv);
843
844 switch (uChange)
845 {
846 case CDBOSC_SETFOCUS:
847 /* FIXME: Reset the default button.
848 This should be taken care of by defdlg. If control
849 other than button receives focus the default button
850 should be restored. */
851 SendMessageA(This->hwndOwner, DM_SETDEFID, IDOK, 0);
852
853 break;
854 case CDBOSC_KILLFOCUS:
855 {
856 FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(This->hwndOwner);
857 if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
858 {
859 WCHAR szSave[16];
861 SetDlgItemTextW(fodInfos->ShellInfos.hwndOwner, IDOK, szSave);
862 }
863 }
864 break;
865 case CDBOSC_SELCHANGE:
866 return IShellBrowserImpl_OnSelChange(This, ppshv);
867 case CDBOSC_RENAME:
868 /* nothing to do */
869 break;
870 }
871
872 return NOERROR;
873}
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
#define IDS_SAVE_BUTTON
Definition: cdlg.h:177
static HRESULT IShellBrowserImpl_OnSelChange(IShellBrowserImpl *This, const IShellView *ppshv)
#define FODPROP_SAVEDLG
#define NOERROR
Definition: winerror.h:2354
#define DM_SETDEFID
Definition: winuser.h:2099
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)

◆ IShellBrowserImpl_ICommDlgBrowser_QueryInterface()

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

Definition at line 725 of file filedlgbrowser.c.

729{
731
732 TRACE("(%p)\n", This);
733
734 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppvObj);
735}
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 752 of file filedlgbrowser.c.

753{
755
756 TRACE("(%p)\n", This);
757
758 return IShellBrowserImpl_Release(&This->IShellBrowser_iface);
759}
static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser *iface)

◆ IShellBrowserImpl_InsertMenusSB()

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

Definition at line 531 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_IServiceProvider_AddRef()

static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef ( IServiceProvider iface)
static

Definition at line 1003 of file filedlgbrowser.c.

1004{
1006
1007 FIXME("(%p)\n", This);
1008
1009 return IShellBrowserImpl_AddRef(&This->IShellBrowser_iface);
1010}
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 988 of file filedlgbrowser.c.

992{
994
995 FIXME("(%p)\n", This);
996
997 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppvObj);
998}

◆ IShellBrowserImpl_IServiceProvider_QueryService()

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

Definition at line 1035 of file filedlgbrowser.c.

1040{
1042
1043 FIXME("(%p)\n\t%s\n\t%s\n", This,debugstr_guid(guidService), debugstr_guid(riid) );
1044
1045 *ppv = NULL;
1046 if(guidService && IsEqualIID(guidService, &SID_STopLevelBrowser))
1047 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppv);
1048
1049 FIXME("(%p) unknown interface requested\n", This);
1050 return E_NOINTERFACE;
1051
1052}
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:2364

◆ IShellBrowserImpl_IServiceProvider_Release()

static ULONG WINAPI IShellBrowserImpl_IServiceProvider_Release ( IServiceProvider iface)
static

Definition at line 1015 of file filedlgbrowser.c.

1016{
1018
1019 FIXME("(%p)\n", This);
1020
1021 return IShellBrowserImpl_Release(&This->IShellBrowser_iface);
1022}

◆ IShellBrowserImpl_OnSelChange()

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

Definition at line 809 of file filedlgbrowser.c.

810{
811 FileOpenDlgInfos *fodInfos;
812
813 fodInfos = get_filedlg_infoptr(This->hwndOwner);
814 TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
815
816 /* release old selections */
817 if (fodInfos->Shell.FOIDataObject)
818 IDataObject_Release(fodInfos->Shell.FOIDataObject);
819
820 /* get a new DataObject from the ShellView */
821 if(FAILED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView, SVGIO_SELECTION,
822 &IID_IDataObject, (void**)&fodInfos->Shell.FOIDataObject)))
823 return E_FAIL;
824
826
827 if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
829 return S_OK;
830}
#define CDN_SELCHANGE
Definition: commdlg.h:34
void FILEDLG95_FILENAME_FillFromSelection(HWND hwnd)
Definition: filedlg.c:4303
const GUID IID_IDataObject

Referenced by IShellBrowserImpl_ICommDlgBrowser_OnStateChange().

◆ IShellBrowserImpl_OnViewWindowActive()

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

Definition at line 547 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_QueryActiveShellView()

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

Definition at line 562 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_QueryInterface()

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

Definition at line 225 of file filedlgbrowser.c.

226{
228
229 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObj);
230
231 *ppvObj = NULL;
232
234 *ppvObj = &This->IShellBrowser_iface;
235 else if(IsEqualIID(riid, &IID_IOleWindow))
236 *ppvObj = &This->IShellBrowser_iface;
237 else if(IsEqualIID(riid, &IID_IShellBrowser))
238 *ppvObj = &This->IShellBrowser_iface;
239 else if(IsEqualIID(riid, &IID_ICommDlgBrowser))
240 *ppvObj = &This->ICommDlgBrowser_iface;
241 else if(IsEqualIID(riid, &IID_IServiceProvider))
242 *ppvObj = &This->IServiceProvider_iface;
243
244 if(*ppvObj) {
245 IUnknown_AddRef((IUnknown*)*ppvObj);
246 return S_OK;
247 }
248
249 FIXME("unsupported interface, %s\n", debugstr_guid(riid));
250 return E_NOINTERFACE;
251}
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 269 of file filedlgbrowser.c.

270{
273
274 TRACE("(%p,%u)\n", This, ref + 1);
275
276 if (!ref)
278
279 return ref;
280}
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 585 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_SendControlMsg()

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

Definition at line 600 of file filedlgbrowser.c.

607{
609 LRESULT lres;
610
611 TRACE("(%p)->(0x%08x 0x%08x 0x%08lx 0x%08lx %p)\n", This, id, uMsg, wParam, lParam, pret);
612
613 switch (id)
614 {
615 case FCW_TOOLBAR:
616 lres = SendDlgItemMessageA( This->hwndOwner, IDC_TOOLBAR, uMsg, wParam, lParam);
617 break;
618 default:
619 FIXME("ctrl id: %x\n", id);
620 return E_NOTIMPL;
621 }
622 if (pret) *pret = lres;
623 return S_OK;
624}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
LONG_PTR LRESULT
Definition: windef.h:209
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 629 of file filedlgbrowser.c.

634{
636
637 TRACE("(%p)\n", This);
638
639 /* Feature not implemented */
640 return E_NOTIMPL;
641}

◆ IShellBrowserImpl_SetStatusTextSB()

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

Definition at line 646 of file filedlgbrowser.c.

649{
651
652 TRACE("(%p)\n", This);
653
654 /* Feature not implemented */
655 return E_NOTIMPL;
656}

◆ IShellBrowserImpl_SetToolbarItems()

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

Definition at line 661 of file filedlgbrowser.c.

666{
668
669 TRACE("(%p)\n", This);
670
671 /* Feature not implemented */
672 return E_NOTIMPL;
673}

◆ IShellBrowserImpl_TranslateAcceleratorSB()

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

Definition at line 678 of file filedlgbrowser.c.

682{
684
685 TRACE("(%p)\n", This);
686
687 /* Feature not implemented */
688 return E_NOTIMPL;
689}

◆ send_includeitem_notification()

static LRESULT send_includeitem_notification ( HWND  hwndParentDlg,
LPCITEMIDLIST  pidl 
)
static

Definition at line 879 of file filedlgbrowser.c.

880{
881 LRESULT hook_result = 0;
882 FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndParentDlg);
883
884 if(!fodInfos) return 0;
885
886 if(fodInfos->DlgInfos.hwndCustomDlg)
887 {
888 TRACE("call notify CDN_INCLUDEITEM for pidl=%p\n", pidl);
889 if(fodInfos->unicode)
890 {
891 OFNOTIFYEXW ofnNotify;
892 ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
893 ofnNotify.pidl = (LPITEMIDLIST)pidl;
894 ofnNotify.hdr.hwndFrom = hwndParentDlg;
895 ofnNotify.hdr.idFrom = 0;
896 ofnNotify.hdr.code = CDN_INCLUDEITEM;
897 ofnNotify.lpOFN = fodInfos->ofnInfos;
898 hook_result = SendMessageW(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
899 }
900 else
901 {
902 OFNOTIFYEXA ofnNotify;
903 ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
904 ofnNotify.pidl = (LPITEMIDLIST)pidl;
905 ofnNotify.hdr.hwndFrom = hwndParentDlg;
906 ofnNotify.hdr.idFrom = 0;
907 ofnNotify.hdr.code = CDN_INCLUDEITEM;
908 ofnNotify.lpOFN = (LPOPENFILENAMEA)fodInfos->ofnInfos;
909 hook_result = SendMessageA(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
910 }
911 }
912 TRACE("Retval: 0x%08lx\n", hook_result);
913 return hook_result;
914}
struct tagOFNA * LPOPENFILENAMEA
#define CDN_INCLUDEITEM
Definition: commdlg.h:40
#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:3158
UINT code
Definition: winuser.h:3159
HWND hwndFrom
Definition: winuser.h:3157
LONG_PTR LPARAM
Definition: windef.h:208

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 80 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 81 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 79 of file filedlgbrowser.c.

Referenced by IShellBrowserImpl_Construct().