ReactOS 0.4.16-dev-2358-g0df3463
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: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 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: precomp.h:53
#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(void *ptr)
Definition: malloc.c:389
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:2168
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
Definition: string.c:1660
#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
struct FileOpenDlgInfos::@336 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 260 of file filedlgbrowser.c.

261{
264
265 TRACE("(%p,%u)\n", This, ref - 1);
266
267 return ref;
268}
#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 342 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_ContextSensitiveHelp()

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

Definition at line 319 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_EnableModelessSB()

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

Definition at line 488 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_GetControlWindow()

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

Definition at line 503 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_GetViewStateStream()

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

Definition at line 519 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_GetWindow()

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

Definition at line 300 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_ICommDlgBrowser_AddRef()

static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef ( ICommDlgBrowser iface)
static

Definition at line 748 of file filedlgbrowser.c.

749{
751
752 TRACE("(%p)\n", This);
753
754 return IShellBrowserImpl_AddRef(&This->IShellBrowser_iface);
755}
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 927 of file filedlgbrowser.c.

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

776{
777 LPITEMIDLIST pidl;
778 FileOpenDlgInfos *fodInfos;
779
781
782 TRACE("(%p)\n", This);
783
784 fodInfos = get_filedlg_infoptr(This->hwndOwner);
785
786 /* If the selected object is not a folder, send an IDOK command to parent window */
787 if((pidl = GetPidlFromDataObject(fodInfos->Shell.FOIDataObject, 1)))
788 {
789 HRESULT hRes;
790
791 ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
792 IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, (LPCITEMIDLIST *)&pidl, &ulAttr);
793 if ((ulAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER)) && (ulAttr & SFGAO_FILESYSANCESTOR))
794 {
795 hRes = IShellBrowser_BrowseObject(&This->IShellBrowser_iface,pidl,SBSP_RELATIVE);
796 if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
798 }
799 else
800 {
801 /* Tell the dialog that the user selected a file */
802 PostMessageA(This->hwndOwner, WM_COMMAND, IDOK, 0L);
803 hRes = S_OK;
804 }
805
806 ILFree(pidl);
807
808 return hRes;
809 }
810
811 return E_FAIL;
812}
#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: resources.c:13
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#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)

◆ IShellBrowserImpl_ICommDlgBrowser_OnStateChange()

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

Definition at line 843 of file filedlgbrowser.c.

846{
847
849
850 TRACE("(%p shv=%p)\n", This, ppshv);
851
852 switch (uChange)
853 {
854 case CDBOSC_SETFOCUS:
855 /* FIXME: Reset the default button.
856 This should be taken care of by defdlg. If control
857 other than button receives focus the default button
858 should be restored. */
859 SendMessageA(This->hwndOwner, DM_SETDEFID, IDOK, 0);
860
861 break;
862 case CDBOSC_KILLFOCUS:
863 {
864 FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(This->hwndOwner);
865 if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
866 {
867 WCHAR szSave[16];
869 SetDlgItemTextW(fodInfos->ShellInfos.hwndOwner, IDOK, szSave);
870 }
871 }
872 break;
873 case CDBOSC_SELCHANGE:
874 return IShellBrowserImpl_OnSelChange(This, ppshv);
875 case CDBOSC_RENAME:
876 /* nothing to do */
877 break;
878 }
879
880 return NOERROR;
881}
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
#define IDS_SAVE_BUTTON
Definition: cdlg.h:177
INT WINAPI DECLSPEC_HOTPATCH LoadStringW(HINSTANCE instance, UINT resource_id, LPWSTR buffer, INT buflen)
Definition: string.c:1220
static HRESULT IShellBrowserImpl_OnSelChange(IShellBrowserImpl *This, const IShellView *ppshv)
#define FODPROP_SAVEDLG
#define NOERROR
Definition: winerror.h:3448
#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)

◆ IShellBrowserImpl_ICommDlgBrowser_QueryInterface()

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

Definition at line 733 of file filedlgbrowser.c.

737{
739
740 TRACE("(%p)\n", This);
741
742 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppvObj);
743}
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 760 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_InsertMenusSB()

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

Definition at line 535 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_IServiceProvider_AddRef()

static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef ( IServiceProvider iface)
static

Definition at line 1011 of file filedlgbrowser.c.

1012{
1014
1015 FIXME("(%p)\n", This);
1016
1017 return IShellBrowserImpl_AddRef(&This->IShellBrowser_iface);
1018}
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 996 of file filedlgbrowser.c.

1000{
1002
1003 FIXME("(%p)\n", This);
1004
1005 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppvObj);
1006}

◆ IShellBrowserImpl_IServiceProvider_QueryService()

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

Definition at line 1043 of file filedlgbrowser.c.

1048{
1050
1051 FIXME("(%p)\n\t%s\n\t%s\n", This,debugstr_guid(guidService), debugstr_guid(riid) );
1052
1053 *ppv = NULL;
1054 if(guidService && IsEqualIID(guidService, &SID_STopLevelBrowser))
1055 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppv);
1056
1057 FIXME("(%p) unknown interface requested\n", This);
1058 return E_NOINTERFACE;
1059
1060}
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 1023 of file filedlgbrowser.c.

1024{
1026
1027 FIXME("(%p)\n", This);
1028
1029 return IShellBrowserImpl_Release(&This->IShellBrowser_iface);
1030}

◆ IShellBrowserImpl_OnSelChange()

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

Definition at line 817 of file filedlgbrowser.c.

818{
819 FileOpenDlgInfos *fodInfos;
820
821 fodInfos = get_filedlg_infoptr(This->hwndOwner);
822 TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
823
824 /* release old selections */
825 if (fodInfos->Shell.FOIDataObject)
826 IDataObject_Release(fodInfos->Shell.FOIDataObject);
827
828 /* get a new DataObject from the ShellView */
829 if(FAILED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView, SVGIO_SELECTION,
830 &IID_IDataObject, (void**)&fodInfos->Shell.FOIDataObject)))
831 return E_FAIL;
832
834
835 if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
837 return S_OK;
838}
#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 551 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_QueryActiveShellView()

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

Definition at line 566 of file filedlgbrowser.c.

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

◆ 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#ifdef __REACTOS__
250 TRACE("unsupported interface, %s\n", debugstr_guid(riid));
251#else
252 FIXME("unsupported interface, %s\n", debugstr_guid(riid));
253#endif
254 return E_NOINTERFACE;
255}
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 273 of file filedlgbrowser.c.

274{
277
278 TRACE("(%p,%u)\n", This, ref + 1);
279
280 if (!ref)
282
283 return ref;
284}
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 589 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_SendControlMsg()

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

Definition at line 604 of file filedlgbrowser.c.

611{
613 LRESULT lres;
614
615 TRACE("(%p)->(0x%08x 0x%08x 0x%08lx 0x%08lx %p)\n", This, id, uMsg, wParam, lParam, pret);
616
617 switch (id)
618 {
619 case FCW_TOOLBAR:
620 lres = SendDlgItemMessageA( This->hwndOwner, IDC_TOOLBAR, uMsg, wParam, lParam);
621 break;
622 default:
623#ifdef __REACTOS__
624 TRACE("ctrl id: %x\n", id);
625#else
626 FIXME("ctrl id: %x\n", id);
627#endif
628 return E_NOTIMPL;
629 }
630 if (pret) *pret = lres;
631 return S_OK;
632}
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 637 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_SetStatusTextSB()

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

Definition at line 654 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_SetToolbarItems()

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

Definition at line 669 of file filedlgbrowser.c.

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

◆ IShellBrowserImpl_TranslateAcceleratorSB()

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

Definition at line 686 of file filedlgbrowser.c.

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

◆ send_includeitem_notification()

static LRESULT send_includeitem_notification ( HWND  hwndParentDlg,
LPCITEMIDLIST  pidl 
)
static

Definition at line 887 of file filedlgbrowser.c.

888{
889 LRESULT hook_result = 0;
890 FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndParentDlg);
891
892 if(!fodInfos) return 0;
893
894 if(fodInfos->DlgInfos.hwndCustomDlg)
895 {
896 TRACE("call notify CDN_INCLUDEITEM for pidl=%p\n", pidl);
897 if(fodInfos->unicode)
898 {
899 OFNOTIFYEXW ofnNotify;
900 ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
901 ofnNotify.pidl = (LPITEMIDLIST)pidl;
902 ofnNotify.hdr.hwndFrom = hwndParentDlg;
903 ofnNotify.hdr.idFrom = 0;
904 ofnNotify.hdr.code = CDN_INCLUDEITEM;
905 ofnNotify.lpOFN = fodInfos->ofnInfos;
906 hook_result = SendMessageW(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
907 }
908 else
909 {
910 OFNOTIFYEXA ofnNotify;
911 ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
912 ofnNotify.pidl = (LPITEMIDLIST)pidl;
913 ofnNotify.hdr.hwndFrom = hwndParentDlg;
914 ofnNotify.hdr.idFrom = 0;
915 ofnNotify.hdr.code = CDN_INCLUDEITEM;
916 ofnNotify.lpOFN = (LPOPENFILENAMEA)fodInfos->ofnInfos;
917 hook_result = SendMessageA(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
918 }
919 }
920 TRACE("Retval: 0x%08lx\n", hook_result);
921 return hook_result;
922}
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:3260
UINT code
Definition: winuser.h:3261
HWND hwndFrom
Definition: winuser.h:3259

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().