mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 21:48:19 +00:00
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files. - Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog. - Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions. - Clean up some msvc compile problems in a few files. - Reorganize some headers to make them better match the Platform SDK. - Move InlineIsEqualGUID to guiddef.h. - Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs. - Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers. - Rename a few interfaces in explorer_new to the correct name - Add definition of RBSTR_CHANGERECT to commctrl.h - IDeskBarClient inherits from IOleWindow, not IUnknown - HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs - Added Init and Term to CComModule - Thanks to encoded for solving the browseui linking problem! svn path=/trunk/; revision=43872
This commit is contained in:
parent
f0b7ff43ff
commit
8266299b0e
87 changed files with 14631 additions and 2805 deletions
|
@ -6,9 +6,11 @@
|
|||
#include <oleidl.h>
|
||||
#include <ole2.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlwapi.h>
|
||||
#include <servprov.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <ocidl.h>
|
||||
#include <objidl.h>
|
||||
#include <docobj.h>
|
||||
|
|
|
@ -288,14 +288,14 @@ CreateStartContextMenu(IN HWND hWndOwner,
|
|||
|
||||
static const IStartMenuSiteVtbl IStartMenuSiteImpl_Vtbl;
|
||||
static const IServiceProviderVtbl IServiceProviderImpl_Vtbl;
|
||||
static const IStartMenuCallbackVtbl IStartMenuCallbackImpl_Vtbl;
|
||||
static const ITrayPrivVtbl ITrayPrivImpl_Vtbl;
|
||||
static const IOleCommandTargetVtbl IOleCommandTargetImpl_Vtbl;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const IStartMenuSiteVtbl *lpVtbl;
|
||||
const IServiceProviderVtbl *lpServiceProviderVtbl;
|
||||
const IStartMenuCallbackVtbl *lpStartMenuCallbackVtbl;
|
||||
const ITrayPrivVtbl *lpStartMenuCallbackVtbl;
|
||||
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
|
||||
LONG Ref;
|
||||
|
||||
|
@ -310,7 +310,7 @@ IUnknown_from_IStartMenuSiteImpl(IStartMenuSiteImpl *This)
|
|||
|
||||
IMPL_CASTS(IStartMenuSite, IStartMenuSite, lpVtbl)
|
||||
IMPL_CASTS(IServiceProvider, IStartMenuSite, lpServiceProviderVtbl)
|
||||
IMPL_CASTS(IStartMenuCallback, IStartMenuSite, lpStartMenuCallbackVtbl)
|
||||
IMPL_CASTS(ITrayPriv, IStartMenuSite, lpStartMenuCallbackVtbl)
|
||||
IMPL_CASTS(IOleCommandTarget, IStartMenuSite, lpOleCommandTargetVtbl)
|
||||
|
||||
/*******************************************************************/
|
||||
|
@ -368,11 +368,11 @@ IStartMenuSiteImpl_QueryInterface(IN OUT IStartMenuSite *iface,
|
|||
*ppvObj = IServiceProvider_from_IStartMenuSiteImpl(This);
|
||||
}
|
||||
else if (IsEqualIID(riid,
|
||||
&IID_IStartMenuCallback) ||
|
||||
&IID_ITrayPriv) ||
|
||||
IsEqualIID(riid,
|
||||
&IID_IOleWindow))
|
||||
{
|
||||
*ppvObj = IStartMenuCallback_from_IStartMenuSiteImpl(This);
|
||||
*ppvObj = ITrayPriv_from_IStartMenuSiteImpl(This);
|
||||
}
|
||||
else if (IsEqualIID(riid,
|
||||
&IID_IOleCommandTarget))
|
||||
|
@ -440,16 +440,16 @@ static const IServiceProviderVtbl IServiceProviderImpl_Vtbl =
|
|||
|
||||
/*******************************************************************/
|
||||
|
||||
METHOD_IUNKNOWN_INHERITED_ADDREF(IStartMenuCallback, IStartMenuSite)
|
||||
METHOD_IUNKNOWN_INHERITED_RELEASE(IStartMenuCallback, IStartMenuSite)
|
||||
METHOD_IUNKNOWN_INHERITED_QUERYINTERFACE(IStartMenuCallback, IStartMenuSite)
|
||||
METHOD_IUNKNOWN_INHERITED_ADDREF(ITrayPriv, IStartMenuSite)
|
||||
METHOD_IUNKNOWN_INHERITED_RELEASE(ITrayPriv, IStartMenuSite)
|
||||
METHOD_IUNKNOWN_INHERITED_QUERYINTERFACE(ITrayPriv, IStartMenuSite)
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE
|
||||
IStartMenuSiteImpl_GetWindow(IN OUT IStartMenuCallback *iface,
|
||||
IStartMenuSiteImpl_GetWindow(IN OUT ITrayPriv *iface,
|
||||
OUT HWND *phwnd)
|
||||
{
|
||||
IStartMenuSiteImpl *This = IStartMenuSiteImpl_from_IStartMenuCallback(iface);
|
||||
DbgPrint("IStartMenuCallback::GetWindow\n");
|
||||
IStartMenuSiteImpl *This = IStartMenuSiteImpl_from_ITrayPriv(iface);
|
||||
DbgPrint("ITrayPriv::GetWindow\n");
|
||||
|
||||
*phwnd = ITrayWindow_GetHWND(This->Tray);
|
||||
if (*phwnd != NULL)
|
||||
|
@ -459,24 +459,24 @@ IStartMenuSiteImpl_GetWindow(IN OUT IStartMenuCallback *iface,
|
|||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE
|
||||
IStartMenuSiteImpl_ContextSensitiveHelp(IN OUT IStartMenuCallback *iface,
|
||||
IStartMenuSiteImpl_ContextSensitiveHelp(IN OUT ITrayPriv *iface,
|
||||
IN BOOL fEnterMode)
|
||||
{
|
||||
DbgPrint("IStartMenuCallback::ContextSensitiveHelp\n");
|
||||
DbgPrint("ITrayPriv::ContextSensitiveHelp\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE
|
||||
IStartMenuSiteImpl_Execute(IN OUT IStartMenuCallback *iface,
|
||||
IStartMenuSiteImpl_Execute(IN OUT ITrayPriv *iface,
|
||||
IN IShellFolder *pShellFolder,
|
||||
IN LPCITEMIDLIST pidl)
|
||||
{
|
||||
HMODULE hShlwapi;
|
||||
HRESULT ret = S_FALSE;
|
||||
|
||||
IStartMenuSiteImpl *This = IStartMenuSiteImpl_from_IStartMenuCallback(iface);
|
||||
IStartMenuSiteImpl *This = IStartMenuSiteImpl_from_ITrayPriv(iface);
|
||||
|
||||
DbgPrint("IStartMenuCallback::Execute\n");
|
||||
DbgPrint("ITrayPriv::Execute\n");
|
||||
|
||||
hShlwapi = GetModuleHandle(TEXT("SHLWAPI.DLL"));
|
||||
if (hShlwapi != NULL)
|
||||
|
@ -498,13 +498,13 @@ IStartMenuSiteImpl_Execute(IN OUT IStartMenuCallback *iface,
|
|||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE
|
||||
IStartMenuSiteImpl_Unknown(IN OUT IStartMenuCallback *iface,
|
||||
IStartMenuSiteImpl_Unknown(IN OUT ITrayPriv *iface,
|
||||
IN PVOID Unknown1,
|
||||
IN PVOID Unknown2,
|
||||
IN PVOID Unknown3,
|
||||
IN PVOID Unknown4)
|
||||
{
|
||||
DbgPrint("IStartMenuCallback::Unknown(0x%p,0x%p,0x%p,0x%p)\n", Unknown1, Unknown2, Unknown3, Unknown4);
|
||||
DbgPrint("ITrayPriv::Unknown(0x%p,0x%p,0x%p,0x%p)\n", Unknown1, Unknown2, Unknown3, Unknown4);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -525,7 +525,7 @@ ShowSynchronizeMenuItem(VOID)
|
|||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE
|
||||
IStartMenuSiteImpl_AppendMenu(IN OUT IStartMenuCallback *iface,
|
||||
IStartMenuSiteImpl_AppendMenu(IN OUT ITrayPriv *iface,
|
||||
OUT HMENU* phMenu)
|
||||
{
|
||||
HMENU hMenu, hSettingsMenu;
|
||||
|
@ -534,7 +534,7 @@ IStartMenuSiteImpl_AppendMenu(IN OUT IStartMenuCallback *iface,
|
|||
UINT uLastItemsCount = 5; /* 5 menu items below the last separator */
|
||||
TCHAR szUser[128];
|
||||
|
||||
DbgPrint("IStartMenuCallback::AppendMenu\n");
|
||||
DbgPrint("ITrayPriv::AppendMenu\n");
|
||||
|
||||
hMenu = LoadPopupMenu(hExplorerInstance,
|
||||
MAKEINTRESOURCE(IDM_STARTMENU));
|
||||
|
@ -711,16 +711,16 @@ IStartMenuSiteImpl_AppendMenu(IN OUT IStartMenuCallback *iface,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static const IStartMenuCallbackVtbl IStartMenuCallbackImpl_Vtbl =
|
||||
static const ITrayPrivVtbl ITrayPrivImpl_Vtbl =
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
METHOD_IUNKNOWN_INHERITED_QUERYINTERFACE_NAME(IStartMenuCallback, IStartMenuSite),
|
||||
METHOD_IUNKNOWN_INHERITED_ADDREF_NAME(IStartMenuCallback, IStartMenuSite),
|
||||
METHOD_IUNKNOWN_INHERITED_RELEASE_NAME(IStartMenuCallback, IStartMenuSite),
|
||||
METHOD_IUNKNOWN_INHERITED_QUERYINTERFACE_NAME(ITrayPriv, IStartMenuSite),
|
||||
METHOD_IUNKNOWN_INHERITED_ADDREF_NAME(ITrayPriv, IStartMenuSite),
|
||||
METHOD_IUNKNOWN_INHERITED_RELEASE_NAME(ITrayPriv, IStartMenuSite),
|
||||
/*** IOleWindow methods ***/
|
||||
IStartMenuSiteImpl_GetWindow,
|
||||
IStartMenuSiteImpl_ContextSensitiveHelp,
|
||||
/*** IStartMenuCallback methods ***/
|
||||
/*** ITrayPriv methods ***/
|
||||
IStartMenuSiteImpl_Execute,
|
||||
IStartMenuSiteImpl_Unknown,
|
||||
IStartMenuSiteImpl_AppendMenu
|
||||
|
@ -782,7 +782,7 @@ IStartMenuSiteImpl_Construct(IN ITrayWindow *Tray)
|
|||
|
||||
This->lpVtbl = &IStartMenuSiteImpl_Vtbl;
|
||||
This->lpServiceProviderVtbl = &IServiceProviderImpl_Vtbl;
|
||||
This->lpStartMenuCallbackVtbl = &IStartMenuCallbackImpl_Vtbl;
|
||||
This->lpStartMenuCallbackVtbl = &ITrayPrivImpl_Vtbl;
|
||||
This->lpOleCommandTargetVtbl = &IOleCommandTargetImpl_Vtbl;
|
||||
This->Ref = 1;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ static const IDeskBandVtbl IDeskBandImpl_Vtbl;
|
|||
static const IObjectWithSiteVtbl IObjectWithSiteImpl_Vtbl;
|
||||
static const IDeskBarVtbl IDeskBarImpl_Vtbl;
|
||||
static const IPersistStreamVtbl IPersistStreamImpl_Vtbl;
|
||||
static const IWindowEventHandlerVtbl IWindowEventHandlerImpl_Vtbl;
|
||||
static const IWinEventHandlerVtbl IWinEventHandlerImpl_Vtbl;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ typedef struct
|
|||
const IObjectWithSiteVtbl *lpObjectWithSiteVtbl;
|
||||
const IDeskBarVtbl *lpDeskBarVtbl;
|
||||
const IPersistStreamVtbl *lpPersistStreamVtbl;
|
||||
const IWindowEventHandlerVtbl *lpWindowEventHandlerVtbl;
|
||||
const IWinEventHandlerVtbl *lpWindowEventHandlerVtbl;
|
||||
/* FIXME: Implement IOleCommandTarget */
|
||||
LONG Ref;
|
||||
|
||||
|
@ -62,7 +62,7 @@ IMPL_CASTS(IDeskBand, ITaskBand, lpDeskBandVtbl)
|
|||
IMPL_CASTS(IObjectWithSite, ITaskBand, lpObjectWithSiteVtbl)
|
||||
IMPL_CASTS(IDeskBar, ITaskBand, lpDeskBarVtbl)
|
||||
IMPL_CASTS(IPersistStream, ITaskBand, lpPersistStreamVtbl)
|
||||
IMPL_CASTS(IWindowEventHandler, ITaskBand, lpWindowEventHandlerVtbl)
|
||||
IMPL_CASTS(IWinEventHandler, ITaskBand, lpWindowEventHandlerVtbl)
|
||||
|
||||
static ULONG STDMETHODCALLTYPE
|
||||
ITaskBandImpl_AddRef(IN OUT ITaskBand *iface)
|
||||
|
@ -137,7 +137,7 @@ ITaskBandImpl_QueryInterface(IN OUT ITaskBand *iface,
|
|||
*ppvObj = IDeskBar_from_ITaskBandImpl(This);
|
||||
}
|
||||
else if (IsEqualIID(riid,
|
||||
&IID_IWindowEventHandler))
|
||||
&IID_IWinEventHandler))
|
||||
{
|
||||
/* When run on Windows the system queries this interface, which is completely
|
||||
undocumented :( It's queried during initialization of the tray band site.
|
||||
|
@ -149,7 +149,7 @@ ITaskBandImpl_QueryInterface(IN OUT ITaskBand *iface,
|
|||
interface in the ITaskBand implementation is only actually used if we use
|
||||
the same interface to forward messages to the IBandSite implementation of
|
||||
the shell! */
|
||||
*ppvObj = IWindowEventHandler_from_ITaskBandImpl(This);
|
||||
*ppvObj = IWinEventHandler_from_ITaskBandImpl(This);
|
||||
}
|
||||
#if 0
|
||||
else if (IsEqualIID(riid,
|
||||
|
@ -575,27 +575,27 @@ static const IObjectWithSiteVtbl IObjectWithSiteImpl_Vtbl =
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
METHOD_IUNKNOWN_INHERITED_ADDREF(IWindowEventHandler, ITaskBand)
|
||||
METHOD_IUNKNOWN_INHERITED_RELEASE(IWindowEventHandler, ITaskBand)
|
||||
METHOD_IUNKNOWN_INHERITED_QUERYINTERFACE(IWindowEventHandler, ITaskBand)
|
||||
METHOD_IUNKNOWN_INHERITED_ADDREF(IWinEventHandler, ITaskBand)
|
||||
METHOD_IUNKNOWN_INHERITED_RELEASE(IWinEventHandler, ITaskBand)
|
||||
METHOD_IUNKNOWN_INHERITED_QUERYINTERFACE(IWinEventHandler, ITaskBand)
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE
|
||||
IWindowEventHandlerImpl_ProcessMessage(IN OUT IWindowEventHandler *iface,
|
||||
IWinEventHandlerImpl_ProcessMessage(IN OUT IWinEventHandler *iface,
|
||||
IN HWND hWnd,
|
||||
IN UINT uMsg,
|
||||
IN WPARAM wParam,
|
||||
IN LPARAM lParam,
|
||||
OUT LRESULT *plrResult)
|
||||
{
|
||||
DbgPrint("ITaskBand: IWindowEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p, 0x%p, 0x%p)\n", hWnd, uMsg, wParam, lParam, plrResult);
|
||||
DbgPrint("ITaskBand: IWinEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p, 0x%p, 0x%p)\n", hWnd, uMsg, wParam, lParam, plrResult);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE
|
||||
IWindowEventHandlerImpl_ContainsWindow(IN OUT IWindowEventHandler *iface,
|
||||
IWinEventHandlerImpl_ContainsWindow(IN OUT IWinEventHandler *iface,
|
||||
IN HWND hWnd)
|
||||
{
|
||||
ITaskBandImpl *This = ITaskBandImpl_from_IWindowEventHandler(iface);
|
||||
ITaskBandImpl *This = ITaskBandImpl_from_IWinEventHandler(iface);
|
||||
HRESULT hRet = S_OK;
|
||||
|
||||
if (This->hWnd != hWnd ||
|
||||
|
@ -610,15 +610,15 @@ IWindowEventHandlerImpl_ContainsWindow(IN OUT IWindowEventHandler *iface,
|
|||
return hRet;
|
||||
}
|
||||
|
||||
static const IWindowEventHandlerVtbl IWindowEventHandlerImpl_Vtbl =
|
||||
static const IWinEventHandlerVtbl IWinEventHandlerImpl_Vtbl =
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
METHOD_IUNKNOWN_INHERITED_QUERYINTERFACE_NAME(IWindowEventHandler, ITaskBand),
|
||||
METHOD_IUNKNOWN_INHERITED_ADDREF_NAME(IWindowEventHandler, ITaskBand),
|
||||
METHOD_IUNKNOWN_INHERITED_RELEASE_NAME(IWindowEventHandler, ITaskBand),
|
||||
/*** IWindowEventHandler methods ***/
|
||||
IWindowEventHandlerImpl_ProcessMessage,
|
||||
IWindowEventHandlerImpl_ContainsWindow
|
||||
METHOD_IUNKNOWN_INHERITED_QUERYINTERFACE_NAME(IWinEventHandler, ITaskBand),
|
||||
METHOD_IUNKNOWN_INHERITED_ADDREF_NAME(IWinEventHandler, ITaskBand),
|
||||
METHOD_IUNKNOWN_INHERITED_RELEASE_NAME(IWinEventHandler, ITaskBand),
|
||||
/*** IWinEventHandler methods ***/
|
||||
IWinEventHandlerImpl_ProcessMessage,
|
||||
IWinEventHandlerImpl_ContainsWindow
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -641,7 +641,7 @@ ITaskBandImpl_Construct(IN OUT ITrayWindow *Tray)
|
|||
This->lpObjectWithSiteVtbl = &IObjectWithSiteImpl_Vtbl;
|
||||
This->lpDeskBarVtbl = &IDeskBarImpl_Vtbl;
|
||||
This->lpPersistStreamVtbl = &IPersistStreamImpl_Vtbl;
|
||||
This->lpWindowEventHandlerVtbl = &IWindowEventHandlerImpl_Vtbl;
|
||||
This->lpWindowEventHandlerVtbl = &IWinEventHandlerImpl_Vtbl;
|
||||
This->Ref = 1;
|
||||
|
||||
This->Tray = Tray;
|
||||
|
|
|
@ -38,7 +38,7 @@ typedef struct
|
|||
IUnknown *punkInner;
|
||||
IBandSite *BandSite;
|
||||
ITaskBand *TaskBand;
|
||||
IWindowEventHandler *WindowEventHandler;
|
||||
IWinEventHandler *WindowEventHandler;
|
||||
IContextMenu *ContextMenu;
|
||||
|
||||
HWND hWndRebar;
|
||||
|
@ -84,7 +84,7 @@ ITrayBandSiteImpl_Free(IN OUT ITrayBandSiteImpl *This)
|
|||
|
||||
if (This->WindowEventHandler != NULL)
|
||||
{
|
||||
IWindowEventHandler_Release(This->WindowEventHandler);
|
||||
IWinEventHandler_Release(This->WindowEventHandler);
|
||||
This->WindowEventHandler = NULL;
|
||||
}
|
||||
|
||||
|
@ -146,9 +146,9 @@ ITrayBandSiteImpl_QueryInterface(IN OUT ITrayBandSite *iface,
|
|||
*ppvObj = IBandSite_from_ITrayBandSiteImpl(This);
|
||||
}
|
||||
else if (IsEqualIID(riid,
|
||||
&IID_IWindowEventHandler))
|
||||
&IID_IWinEventHandler))
|
||||
{
|
||||
DbgPrint("ITaskBandSite: IWindowEventHandler queried!\n");
|
||||
DbgPrint("ITaskBandSite: IWinEventHandler queried!\n");
|
||||
*ppvObj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
@ -354,12 +354,12 @@ ITrayBandSiteImpl_ProcessMessage(IN OUT ITrayBandSite *iface,
|
|||
}
|
||||
};
|
||||
|
||||
/* Forward to the shell's IWindowEventHandler interface to get the default
|
||||
/* Forward to the shell's IWinEventHandler interface to get the default
|
||||
shell behavior! */
|
||||
if (This->WindowEventHandler != NULL)
|
||||
{
|
||||
/*DbgPrint("Calling IWindowEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p, 0x%p, 0x%p) This->hWndRebar=0x%p\n", hWnd, uMsg, wParam, lParam, plResult, This->hWndRebar);*/
|
||||
hRet = IWindowEventHandler_ProcessMessage(This->WindowEventHandler,
|
||||
/*DbgPrint("Calling IWinEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p, 0x%p, 0x%p) This->hWndRebar=0x%p\n", hWnd, uMsg, wParam, lParam, plResult, This->hWndRebar);*/
|
||||
hRet = IWinEventHandler_OnWinEvent(This->WindowEventHandler,
|
||||
hWnd,
|
||||
uMsg,
|
||||
wParam,
|
||||
|
@ -370,11 +370,11 @@ ITrayBandSiteImpl_ProcessMessage(IN OUT ITrayBandSite *iface,
|
|||
if (uMsg == WM_NOTIFY)
|
||||
{
|
||||
const NMHDR *nmh = (const NMHDR *)lParam;
|
||||
DbgPrint("ITrayBandSite->IWindowEventHandler::ProcessMessage: WM_NOTIFY for 0x%p, From: 0x%p, Code: NM_FIRST-%u returned 0x%x\n", hWnd, nmh->hwndFrom, NM_FIRST - nmh->code, hRet);
|
||||
DbgPrint("ITrayBandSite->IWinEventHandler::ProcessMessage: WM_NOTIFY for 0x%p, From: 0x%p, Code: NM_FIRST-%u returned 0x%x\n", hWnd, nmh->hwndFrom, NM_FIRST - nmh->code, hRet);
|
||||
}
|
||||
else
|
||||
{
|
||||
DbgPrint("ITrayBandSite->IWindowEventHandler::ProcessMessage(0x%p,0x%x,0x%p,0x%p,0x%p->0x%p) returned: 0x%x\n", hWnd, uMsg, wParam, lParam, plResult, *plResult, hRet);
|
||||
DbgPrint("ITrayBandSite->IWinEventHandler::ProcessMessage(0x%p,0x%x,0x%p,0x%p,0x%p->0x%p) returned: 0x%x\n", hWnd, uMsg, wParam, lParam, plResult, *plResult, hRet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -944,7 +944,7 @@ ITrayBandSiteImpl_Construct(IN OUT ITrayWindow *Tray,
|
|||
}
|
||||
|
||||
hRet = IUnknown_QueryInterface(This->punkInner,
|
||||
&IID_IWindowEventHandler,
|
||||
&IID_IWinEventHandler,
|
||||
(PVOID*)&This->WindowEventHandler);
|
||||
if (!SUCCEEDED(hRet))
|
||||
{
|
||||
|
|
|
@ -29,9 +29,6 @@ static const GUID IID_HACK_IInitializeObject = {0x4622AD16,0xFF23,0x11D0,{0x8D,0
|
|||
static const GUID SID_HACK_SMenuPopup = {0xD1E7AFEB,0x6A2E,0x11D0,{0x8C,0x78,0x00,0xC0,0x4F,0xD9,0x18,0xB4}};
|
||||
#define SID_SMenuPopup SID_HACK_SMenuPopup
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IDeskBarClient_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IDeskBarClient_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
|
@ -44,26 +41,4 @@ static const GUID SID_HACK_SMenuPopup = {0xD1E7AFEB,0x6A2E,0x11D0,{0x8C,0x78,0x0
|
|||
#define IDeskBarClient_GetSize(T,a,b) (T)->lpVtbl->GetSize(T,a,b)
|
||||
#endif
|
||||
|
||||
static const GUID IID_HACK_IShellService = {0x5836FB00,0x8187,0x11CF,{0xA1,0x2B,0x00,0xAA,0x00,0x4A,0xE8,0x37}};
|
||||
#define IID_IShellService IID_HACK_IShellService
|
||||
|
||||
#define INTERFACE IShellService
|
||||
DECLARE_INTERFACE_(IShellService,IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IShellService methods ***/
|
||||
STDMETHOD_(HRESULT,SetOwner)(THIS_ IUnknown*) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IShellService_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IShellService_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IShellService_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IShellService_SetOwner(T,a) (T)->lpVtbl->SetOwner(T,a)
|
||||
#endif
|
||||
|
||||
#endif /* __TODO_H */
|
||||
|
|
|
@ -20,162 +20,6 @@ static const GUID CLSID_HACK_PersonalStartMenu = {0x3F6953F0,0x5359,0x47FC,{0xBD
|
|||
static const GUID IID_HACK_IMenuBand = {0x568804CD,0xCBD7,0x11D0,{0x98,0x16,0x00,0xC0,0x4F,0xD9,0x19,0x72}};
|
||||
#define IID_IMenuBand IID_HACK_IMenuBand
|
||||
|
||||
static const GUID IID_HACK_IStartMenuCallback = {0x4622AD10,0xFF23,0x11D0,{0x8D,0x34,0x00,0xA0,0xC9,0x0F,0x27,0x19}};
|
||||
#define IID_IStartMenuCallback IID_HACK_IStartMenuCallback
|
||||
|
||||
#define INTERFACE IStartMenuCallback
|
||||
DECLARE_INTERFACE_(IStartMenuCallback,IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IOleWindow methods ***/
|
||||
STDMETHOD_(HRESULT,GetWindow)(THIS_ HWND*) PURE;
|
||||
STDMETHOD_(HRESULT,ContextSensitiveHelp)(THIS_ BOOL) PURE;
|
||||
/*** IStartMenuCallback ***/
|
||||
STDMETHOD_(HRESULT,Execute)(THIS_ IShellFolder*,LPCITEMIDLIST) PURE;
|
||||
STDMETHOD_(HRESULT,Unknown)(THIS_ PVOID,PVOID,PVOID,PVOID) PURE;
|
||||
STDMETHOD_(HRESULT,AppendMenu)(THIS_ HMENU*) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IStartMenuCallback_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IStartMenuCallback_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IStartMenuCallback_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IStartMenuCallback_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a)
|
||||
#define IStartMenuCallback_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a)
|
||||
#define IStartMenuCallback_Execute(T,a,b) (T)->lpVtbl->Execute(T,a,b)
|
||||
#define IStartMenuCallback_Unknown(T,a,b,c,d) (T)->lpVtbl->Unknown(T,a,b,c,d)
|
||||
#define IStartMenuCallback_AppendMenu(T,a) (T)->lpVtbl->AppendMenu(T,a)
|
||||
#endif
|
||||
|
||||
#define INTERFACE IBandSiteStreamCallback
|
||||
DECLARE_INTERFACE_(IBandSiteStreamCallback,IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IBandSiteStreamCallback ***/
|
||||
STDMETHOD_(HRESULT,OnLoad)(THIS_ IStream *pStm, REFIID riid, PVOID *pvObj) PURE;
|
||||
STDMETHOD_(HRESULT,OnSave)(THIS_ IUnknown *pUnk, IStream *pStm) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IBandSiteStreamCallback_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IBandSiteStreamCallback_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IBandSiteStreamCallback_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IBandSiteStreamCallback_OnLoad(T,a,b,c) (T)->lpVtbl->OnLoad(T,a,b,c)
|
||||
#define IBandSiteStreamCallback_OnSave(T,a,b) (T)->lpVtbl->OnSave(T,a,b)
|
||||
#endif
|
||||
|
||||
static const GUID IID_HACK_IWindowEventHandler = {0xEA5F2D61,0xE008,0x11CF,{0x99,0xCB,0x00,0xC0,0x4F,0xD6,0x44,0x97}};
|
||||
#define IID_IWindowEventHandler IID_HACK_IWindowEventHandler
|
||||
|
||||
#define INTERFACE IWindowEventHandler
|
||||
DECLARE_INTERFACE_(IWindowEventHandler,IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IWindowEventHandler ***/
|
||||
STDMETHOD(ProcessMessage)(THIS_ HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plrResult) PURE;
|
||||
STDMETHOD(ContainsWindow)(THIS_ HWND hWnd) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IWindowEventHandler_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IWindowEventHandler_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IWindowEventHandler_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IWindowEventHandler_ProcessMessage(T,a,b,c,d,e) (T)->lpVtbl->ProcessMessage(T,a,b,c,d,e)
|
||||
#define IWindowEventHandler_ContainsWindow(T,a) (T)->lpVtbl->ContainsWindow(T,a)
|
||||
#endif
|
||||
|
||||
#define INTERFACE IShellDesktopTray
|
||||
DECLARE_INTERFACE_(IShellDesktopTray,IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IShellDesktopTray ***/
|
||||
STDMETHOD_(ULONG,GetState)(THIS) PURE;
|
||||
STDMETHOD(GetTrayWindow)(THIS_ HWND*) PURE;
|
||||
STDMETHOD(RegisterDesktopWindow)(THIS_ HWND) PURE;
|
||||
STDMETHOD(Unknown)(THIS_ DWORD,DWORD) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IShellDesktopTray_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IShellDesktopTray_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IShellDesktopTray_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IShellDesktopTray_GetState(T) (T)->lpVtbl->GetState(T)
|
||||
#define IShellDesktopTray_GetTrayWindow(T,a) (T)->lpVtbl->GetTrayWindow(T,a)
|
||||
#define IShellDesktopTray_RegisterDesktopWindow(T,a) (T)->lpVtbl->RegisterDesktopWindow(T,a)
|
||||
#define IShellDesktopTray_Unknown(T,a,b) (T)->lpVtbl->Unknown(T,a,b)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
HANDLE WINAPI SHCreateDesktop(IShellDesktopTray*);
|
||||
BOOL WINAPI SHDesktopMessageLoop(HANDLE);
|
||||
#else
|
||||
typedef HANDLE (WINAPI *PSHCreateDesktop)(IShellDesktopTray*);
|
||||
static __inline HANDLE
|
||||
SHCreateDesktop(IShellDesktopTray* sdt)
|
||||
{
|
||||
static PSHCreateDesktop Func = NULL;
|
||||
|
||||
if (Func == NULL)
|
||||
{
|
||||
HMODULE hShlwapi;
|
||||
hShlwapi = LoadLibrary(TEXT("SHELL32.DLL"));
|
||||
if (hShlwapi != NULL)
|
||||
{
|
||||
Func = (PSHCreateDesktop)GetProcAddress(hShlwapi, (LPCSTR)200);
|
||||
}
|
||||
}
|
||||
|
||||
if (Func != NULL)
|
||||
{
|
||||
return Func(sdt);
|
||||
}
|
||||
|
||||
MessageBox(NULL, TEXT("SHCreateDesktop not available"), NULL, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
typedef BOOL (WINAPI *PSHDesktopMessageLoop)(HANDLE);
|
||||
static __inline BOOL
|
||||
SHDesktopMessageLoop(IN HANDLE hDesktop)
|
||||
{
|
||||
static PSHDesktopMessageLoop Func = NULL;
|
||||
|
||||
if (Func == NULL)
|
||||
{
|
||||
HMODULE hShlwapi;
|
||||
hShlwapi = LoadLibrary(TEXT("SHELL32.DLL"));
|
||||
if (hShlwapi != NULL)
|
||||
{
|
||||
Func = (PSHDesktopMessageLoop)GetProcAddress(hShlwapi, (LPCSTR)201);
|
||||
}
|
||||
}
|
||||
|
||||
if (Func != NULL)
|
||||
{
|
||||
return Func(hDesktop);
|
||||
}
|
||||
|
||||
MessageBox(NULL, TEXT("SHDesktopMessageLoop not available"), NULL, 0);
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define WM_GETISHELLBROWSER (WM_USER+7)
|
||||
BOOL WINAPI SetShellWindow(HWND);
|
||||
BOOL WINAPI SetShellWindowEx(HWND, HWND);
|
||||
|
@ -183,25 +27,6 @@ BOOL WINAPI RegisterShellHook(HWND, DWORD);
|
|||
IStream* WINAPI SHGetViewStream(LPCITEMIDLIST, DWORD, LPCTSTR, LPCTSTR, LPCTSTR);
|
||||
BOOL WINAPI SHIsEmptyStream(IStream*);
|
||||
|
||||
typedef struct tagCREATEMRULISTA
|
||||
{
|
||||
DWORD cbSize;
|
||||
DWORD nMaxItems;
|
||||
DWORD dwFlags;
|
||||
HKEY hKey;
|
||||
LPCSTR lpszSubKey;
|
||||
PROC lpfnCompare;
|
||||
} CREATEMRULISTA, *LPCREATEMRULISTA;
|
||||
typedef struct tagCREATEMRULISTW
|
||||
{
|
||||
DWORD cbSize;
|
||||
DWORD nMaxItems;
|
||||
DWORD dwFlags;
|
||||
HKEY hKey;
|
||||
LPCWSTR lpszSubKey;
|
||||
PROC lpfnCompare;
|
||||
} CREATEMRULISTW, *LPCREATEMRULISTW;
|
||||
|
||||
#define MRU_BINARY 0x1
|
||||
#define MRU_CACHEWRITE 0x2
|
||||
|
||||
|
@ -216,11 +41,9 @@ BOOL WINAPI DrawCaptionTempA(HWND,HDC,const RECT*,HFONT,HICON,LPCSTR,UINT);
|
|||
BOOL WINAPI DrawCaptionTempW(HWND,HDC,const RECT*,HFONT,HICON,LPCWSTR,UINT);
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef CREATEMRULISTW CREATEMRULIST, *PCREATEMRULIST;
|
||||
#define CreateMRUList CreateMRUListW
|
||||
#define DrawCaptionTemp DrawCaptionTempW
|
||||
#else
|
||||
typedef CREATEMRULISTA CREATEMRULIST, *PCREATEMRULIST;
|
||||
#define CreateMRUList CreateMRUListA
|
||||
#define DrawCaptionTemp DrawCaptionTempA
|
||||
#endif
|
||||
|
@ -231,68 +54,4 @@ HRESULT WINAPI SHInvokeDefaultCommand(HWND,IShellFolder*,LPCITEMIDLIST);
|
|||
|
||||
HRESULT WINAPI SHPropertyBag_ReadPOINTL(IPropertyBag*,LPCWSTR,POINTL*);
|
||||
|
||||
#if 0
|
||||
HRESULT WINAPI SHGetPerScreenResName(OUT LPWSTR lpResName,
|
||||
IN INT cchResName,
|
||||
IN DWORD dwReserved);
|
||||
#else
|
||||
typedef HRESULT (WINAPI *PSHGetPerScreenResName)(LPWSTR,INT,DWORD);
|
||||
static __inline HRESULT
|
||||
SHGetPerScreenResName(OUT LPWSTR lpResName,
|
||||
IN INT cchResName,
|
||||
IN DWORD dwReserved OPTIONAL)
|
||||
{
|
||||
static PSHGetPerScreenResName Func = NULL;
|
||||
|
||||
if (Func == NULL)
|
||||
{
|
||||
HMODULE hShlwapi;
|
||||
hShlwapi = LoadLibrary(TEXT("SHLWAPI.DLL"));
|
||||
if (hShlwapi != NULL)
|
||||
{
|
||||
Func = (PSHGetPerScreenResName)GetProcAddress(hShlwapi, (LPCSTR)533);
|
||||
}
|
||||
}
|
||||
|
||||
if (Func != NULL)
|
||||
{
|
||||
return Func(lpResName, cchResName, dwReserved);
|
||||
}
|
||||
|
||||
MessageBox(NULL, TEXT("SHGetPerScreenResName not available"), NULL, 0);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
HRESULT WINAPI SHPropertyBag_ReadStream(IPropertyBag*,LPCWSTR,IStream**);
|
||||
#else
|
||||
typedef HRESULT (WINAPI *PSHPropertyBag_ReadStream)(IPropertyBag*,LPCWSTR,IStream**);
|
||||
static __inline HRESULT
|
||||
SHPropertyBag_ReadStream(IN IPropertyBag *ppb,
|
||||
IN LPCWSTR pszPropName,
|
||||
OUT IStream **ppStream)
|
||||
{
|
||||
static PSHPropertyBag_ReadStream Func = NULL;
|
||||
|
||||
if (Func == NULL)
|
||||
{
|
||||
HMODULE hShlwapi;
|
||||
hShlwapi = LoadLibrary(TEXT("SHLWAPI.DLL"));
|
||||
if (hShlwapi != NULL)
|
||||
{
|
||||
Func = (PSHPropertyBag_ReadStream)GetProcAddress(hShlwapi, (LPCSTR)531);
|
||||
}
|
||||
}
|
||||
|
||||
if (Func != NULL)
|
||||
{
|
||||
return Func(ppb, pszPropName, ppStream);
|
||||
}
|
||||
|
||||
MessageBox(NULL, TEXT("SHPropertyBag_ReadStream not available"), NULL, 0);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _EXPLORER_UNDOC__H */
|
||||
|
|
|
@ -1,331 +0,0 @@
|
|||
/*
|
||||
* Multisource AutoComplete list
|
||||
*
|
||||
* Copyright 2007 Mikolaj Zalewski
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winuser.h"
|
||||
#include "shlwapi.h"
|
||||
#include "winerror.h"
|
||||
#include "objbase.h"
|
||||
|
||||
#include "shlguid.h"
|
||||
#include "shlobj.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#include "browseui.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(browseui);
|
||||
|
||||
struct ACLMultiSublist {
|
||||
IUnknown *punk;
|
||||
IEnumString *pEnum;
|
||||
IACList *pACL;
|
||||
};
|
||||
|
||||
typedef struct tagACLMulti {
|
||||
const IEnumStringVtbl *vtbl;
|
||||
const IACListVtbl *aclVtbl;
|
||||
const IObjMgrVtbl *objmgrVtbl;
|
||||
LONG refCount;
|
||||
INT nObjs;
|
||||
INT currObj;
|
||||
struct ACLMultiSublist *objs;
|
||||
} ACLMulti;
|
||||
|
||||
static const IEnumStringVtbl ACLMultiVtbl;
|
||||
static const IACListVtbl ACLMulti_ACListVtbl;
|
||||
static const IObjMgrVtbl ACLMulti_ObjMgrVtbl;
|
||||
|
||||
static inline ACLMulti *impl_from_IACList(IACList *iface)
|
||||
{
|
||||
return (ACLMulti *)((char *)iface - FIELD_OFFSET(ACLMulti, aclVtbl));
|
||||
}
|
||||
|
||||
static inline ACLMulti *impl_from_IObjMgr(IObjMgr *iface)
|
||||
{
|
||||
return (ACLMulti *)((char *)iface - FIELD_OFFSET(ACLMulti, objmgrVtbl));
|
||||
}
|
||||
|
||||
static void release_obj(struct ACLMultiSublist *obj)
|
||||
{
|
||||
IUnknown_Release(obj->punk);
|
||||
if (obj->pEnum)
|
||||
IEnumString_Release(obj->pEnum);
|
||||
if (obj->pACL)
|
||||
IACList_Release(obj->pACL);
|
||||
}
|
||||
|
||||
HRESULT WINAPI ACLMulti_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
|
||||
{
|
||||
ACLMulti *This;
|
||||
if (pUnkOuter)
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
|
||||
This = CoTaskMemAlloc(sizeof(ACLMulti));
|
||||
if (This == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
ZeroMemory(This, sizeof(*This));
|
||||
This->vtbl = &ACLMultiVtbl;
|
||||
This->aclVtbl = &ACLMulti_ACListVtbl;
|
||||
This->objmgrVtbl = &ACLMulti_ObjMgrVtbl;
|
||||
This->refCount = 1;
|
||||
|
||||
TRACE("returning %p\n", This);
|
||||
*ppOut = (IUnknown *)This;
|
||||
BROWSEUI_refCount++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void WINAPI ACLMulti_Destructor(ACLMulti *This)
|
||||
{
|
||||
int i;
|
||||
TRACE("destroying %p\n", This);
|
||||
for (i = 0; i < This->nObjs; i++)
|
||||
release_obj(&This->objs[i]);
|
||||
CoTaskMemFree(This->objs);
|
||||
CoTaskMemFree(This);
|
||||
BROWSEUI_refCount--;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ACLMulti_QueryInterface(IEnumString *iface, REFIID iid, LPVOID *ppvOut)
|
||||
{
|
||||
ACLMulti *This = (ACLMulti *)iface;
|
||||
*ppvOut = NULL;
|
||||
|
||||
if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IEnumString))
|
||||
{
|
||||
*ppvOut = This;
|
||||
}
|
||||
else if (IsEqualIID(iid, &IID_IACList))
|
||||
{
|
||||
*ppvOut = &This->aclVtbl;
|
||||
}
|
||||
else if (IsEqualIID(iid, &IID_IObjMgr))
|
||||
{
|
||||
*ppvOut = &This->objmgrVtbl;
|
||||
}
|
||||
|
||||
if (*ppvOut)
|
||||
{
|
||||
IUnknown_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("unsupported interface: %s\n", debugstr_guid(iid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ACLMulti_AddRef(IEnumString *iface)
|
||||
{
|
||||
ACLMulti *This = (ACLMulti *)iface;
|
||||
return InterlockedIncrement(&This->refCount);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ACLMulti_Release(IEnumString *iface)
|
||||
{
|
||||
ACLMulti *This = (ACLMulti *)iface;
|
||||
ULONG ret;
|
||||
|
||||
ret = InterlockedDecrement(&This->refCount);
|
||||
if (ret == 0)
|
||||
ACLMulti_Destructor(This);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ACLMulti_Append(IObjMgr *iface, IUnknown *obj)
|
||||
{
|
||||
ACLMulti *This = impl_from_IObjMgr(iface);
|
||||
|
||||
TRACE("(%p, %p)\n", This, obj);
|
||||
if (obj == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
This->objs = CoTaskMemRealloc(This->objs, sizeof(This->objs[0]) * (This->nObjs+1));
|
||||
This->objs[This->nObjs].punk = obj;
|
||||
IUnknown_AddRef(obj);
|
||||
if (FAILED(IUnknown_QueryInterface(obj, &IID_IEnumString, (LPVOID *)&This->objs[This->nObjs].pEnum)))
|
||||
This->objs[This->nObjs].pEnum = NULL;
|
||||
if (FAILED(IUnknown_QueryInterface(obj, &IID_IACList, (LPVOID *)&This->objs[This->nObjs].pACL)))
|
||||
This->objs[This->nObjs].pACL = NULL;
|
||||
This->nObjs++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ACLMulti_Remove(IObjMgr *iface, IUnknown *obj)
|
||||
{
|
||||
ACLMulti *This = impl_from_IObjMgr(iface);
|
||||
int i;
|
||||
|
||||
TRACE("(%p, %p)\n", This, obj);
|
||||
for (i = 0; i < This->nObjs; i++)
|
||||
if (This->objs[i].punk == obj)
|
||||
{
|
||||
release_obj(&This->objs[i]);
|
||||
memmove(&This->objs[i], &This->objs[i+1], (This->nObjs-i-1)*sizeof(struct ACLMultiSublist));
|
||||
This->nObjs--;
|
||||
This->objs = CoTaskMemRealloc(This->objs, sizeof(This->objs[0]) * This->nObjs);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ACLMulti_Next(IEnumString *iface, ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched)
|
||||
{
|
||||
ACLMulti *This = (ACLMulti *)iface;
|
||||
|
||||
TRACE("(%p, %d, %p, %p)\n", iface, celt, rgelt, pceltFetched);
|
||||
while (This->currObj < This->nObjs)
|
||||
{
|
||||
if (This->objs[This->currObj].pEnum)
|
||||
{
|
||||
/* native browseui 6.0 also returns only one element */
|
||||
HRESULT ret = IEnumString_Next(This->objs[This->currObj].pEnum, 1, rgelt, pceltFetched);
|
||||
if (ret != S_FALSE)
|
||||
return ret;
|
||||
}
|
||||
This->currObj++;
|
||||
}
|
||||
|
||||
if (pceltFetched)
|
||||
*pceltFetched = 0;
|
||||
*rgelt = NULL;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ACLMulti_Reset(IEnumString *iface)
|
||||
{
|
||||
ACLMulti *This = (ACLMulti *)iface;
|
||||
int i;
|
||||
|
||||
This->currObj = 0;
|
||||
for (i = 0; i < This->nObjs; i++)
|
||||
{
|
||||
if (This->objs[i].pEnum)
|
||||
IEnumString_Reset(This->objs[i].pEnum);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ACLMulti_Skip(IEnumString *iface, ULONG celt)
|
||||
{
|
||||
/* native browseui 6.0 returns this: */
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ACLMulti_Clone(IEnumString *iface, IEnumString **ppOut)
|
||||
{
|
||||
*ppOut = NULL;
|
||||
/* native browseui 6.0 returns this: */
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ACLMulti_Expand(IACList *iface, LPCWSTR wstr)
|
||||
{
|
||||
ACLMulti *This = impl_from_IACList(iface);
|
||||
HRESULT res = S_OK;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < This->nObjs; i++)
|
||||
{
|
||||
if (!This->objs[i].pACL)
|
||||
continue;
|
||||
res = IACList_Expand(This->objs[i].pACL, wstr);
|
||||
if (res == S_OK)
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
static const IEnumStringVtbl ACLMultiVtbl =
|
||||
{
|
||||
ACLMulti_QueryInterface,
|
||||
ACLMulti_AddRef,
|
||||
ACLMulti_Release,
|
||||
|
||||
ACLMulti_Next,
|
||||
ACLMulti_Skip,
|
||||
ACLMulti_Reset,
|
||||
ACLMulti_Clone
|
||||
};
|
||||
|
||||
static HRESULT WINAPI ACLMulti_IObjMgr_QueryInterface(IObjMgr *iface, REFIID iid, LPVOID *ppvOut)
|
||||
{
|
||||
ACLMulti *This = impl_from_IObjMgr(iface);
|
||||
return ACLMulti_QueryInterface((IEnumString *)This, iid, ppvOut);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ACLMulti_IObjMgr_AddRef(IObjMgr *iface)
|
||||
{
|
||||
ACLMulti *This = impl_from_IObjMgr(iface);
|
||||
return ACLMulti_AddRef((IEnumString *)This);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ACLMulti_IObjMgr_Release(IObjMgr *iface)
|
||||
{
|
||||
ACLMulti *This = impl_from_IObjMgr(iface);
|
||||
return ACLMulti_Release((IEnumString *)This);
|
||||
}
|
||||
|
||||
static const IObjMgrVtbl ACLMulti_ObjMgrVtbl =
|
||||
{
|
||||
ACLMulti_IObjMgr_QueryInterface,
|
||||
ACLMulti_IObjMgr_AddRef,
|
||||
ACLMulti_IObjMgr_Release,
|
||||
|
||||
ACLMulti_Append,
|
||||
ACLMulti_Remove
|
||||
};
|
||||
|
||||
static HRESULT WINAPI ACLMulti_IACList_QueryInterface(IACList *iface, REFIID iid, LPVOID *ppvOut)
|
||||
{
|
||||
ACLMulti *This = impl_from_IACList(iface);
|
||||
return ACLMulti_QueryInterface((IEnumString *)This, iid, ppvOut);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ACLMulti_IACList_AddRef(IACList *iface)
|
||||
{
|
||||
ACLMulti *This = impl_from_IACList(iface);
|
||||
return ACLMulti_AddRef((IEnumString *)This);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ACLMulti_IACList_Release(IACList *iface)
|
||||
{
|
||||
ACLMulti *This = impl_from_IACList(iface);
|
||||
return ACLMulti_Release((IEnumString *)This);
|
||||
}
|
||||
|
||||
static const IACListVtbl ACLMulti_ACListVtbl =
|
||||
{
|
||||
ACLMulti_IACList_QueryInterface,
|
||||
ACLMulti_IACList_AddRef,
|
||||
ACLMulti_IACList_Release,
|
||||
|
||||
ACLMulti_Expand
|
||||
};
|
159
reactos/dll/win32/browseui/aclmulti.cpp
Normal file
159
reactos/dll/win32/browseui/aclmulti.cpp
Normal file
|
@ -0,0 +1,159 @@
|
|||
/*
|
||||
* Multisource AutoComplete list
|
||||
*
|
||||
* Copyright 2007 Mikolaj Zalewski
|
||||
* Copyright 2009 Andrew Hill
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "resource.h"
|
||||
#include "wine/debug.h"
|
||||
#include "aclmulti.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(browseui);
|
||||
|
||||
void CACLMulti::release_obj(struct ACLMultiSublist *obj)
|
||||
{
|
||||
obj->punk->Release();
|
||||
if (obj->pEnum)
|
||||
obj->pEnum->Release();
|
||||
if (obj->pACL)
|
||||
obj->pACL->Release();
|
||||
}
|
||||
|
||||
CACLMulti::CACLMulti()
|
||||
{
|
||||
fObjectCount = 0;
|
||||
fCurrentObject = 0;
|
||||
fObjects = NULL;
|
||||
}
|
||||
|
||||
CACLMulti::~CACLMulti()
|
||||
{
|
||||
int i;
|
||||
|
||||
TRACE("destroying %p\n", this);
|
||||
for (i = 0; i < fObjectCount; i++)
|
||||
release_obj(&fObjects[i]);
|
||||
CoTaskMemFree(fObjects);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CACLMulti::Append(IUnknown *punk)
|
||||
{
|
||||
TRACE("(%p, %p)\n", this, punk);
|
||||
if (punk == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
fObjects = reinterpret_cast<struct ACLMultiSublist *>(CoTaskMemRealloc(fObjects, sizeof(fObjects[0]) * (fObjectCount + 1)));
|
||||
fObjects[fObjectCount].punk = punk;
|
||||
punk->AddRef();
|
||||
if (FAILED(punk->QueryInterface(IID_IEnumString, (void **)&fObjects[fObjectCount].pEnum)))
|
||||
fObjects[fObjectCount].pEnum = NULL;
|
||||
if (FAILED(punk->QueryInterface(IID_IACList, (void **)&fObjects[fObjectCount].pACL)))
|
||||
fObjects[fObjectCount].pACL = NULL;
|
||||
fObjectCount++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CACLMulti::Remove(IUnknown *punk)
|
||||
{
|
||||
int i;
|
||||
|
||||
TRACE("(%p, %p)\n", this, punk);
|
||||
for (i = 0; i < fObjectCount; i++)
|
||||
if (fObjects[i].punk == punk)
|
||||
{
|
||||
release_obj(&fObjects[i]);
|
||||
memmove(&fObjects[i], &fObjects[i + 1], (fObjectCount - i - 1) * sizeof(struct ACLMultiSublist));
|
||||
fObjectCount--;
|
||||
fObjects = reinterpret_cast<struct ACLMultiSublist *>(CoTaskMemRealloc(fObjects, sizeof(fObjects[0]) * fObjectCount));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CACLMulti::Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched)
|
||||
{
|
||||
TRACE("(%p, %d, %p, %p)\n", this, celt, rgelt, pceltFetched);
|
||||
while (fCurrentObject < fObjectCount)
|
||||
{
|
||||
if (fObjects[fCurrentObject].pEnum)
|
||||
{
|
||||
/* native browseui 6.0 also returns only one element */
|
||||
HRESULT ret = fObjects[fCurrentObject].pEnum->Next(1, rgelt, pceltFetched);
|
||||
if (ret != S_FALSE)
|
||||
return ret;
|
||||
}
|
||||
fCurrentObject++;
|
||||
}
|
||||
|
||||
if (pceltFetched)
|
||||
*pceltFetched = 0;
|
||||
*rgelt = NULL;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CACLMulti::Reset()
|
||||
{
|
||||
int i;
|
||||
|
||||
fCurrentObject = 0;
|
||||
for (i = 0; i < fObjectCount; i++)
|
||||
{
|
||||
if (fObjects[i].pEnum)
|
||||
fObjects[i].pEnum->Reset();
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CACLMulti::Skip(ULONG celt)
|
||||
{
|
||||
/* native browseui 6.0 returns this: */
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CACLMulti::Clone(IEnumString **ppOut)
|
||||
{
|
||||
*ppOut = NULL;
|
||||
/* native browseui 6.0 returns this: */
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CACLMulti::Expand(LPCWSTR wstr)
|
||||
{
|
||||
HRESULT res = S_OK;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < fObjectCount; i++)
|
||||
{
|
||||
if (!fObjects[i].pACL)
|
||||
continue;
|
||||
res = fObjects[i].pACL->Expand(wstr);
|
||||
if (res == S_OK)
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
77
reactos/dll/win32/browseui/aclmulti.h
Normal file
77
reactos/dll/win32/browseui/aclmulti.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Multisource AutoComplete list
|
||||
*
|
||||
* Copyright 2007 Mikolaj Zalewski
|
||||
* Copyright 2009 Andrew Hill
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _aclmulti_h
|
||||
#define _aclmulti_h
|
||||
|
||||
class CACLMulti :
|
||||
public CComCoClass<CACLMulti, &CLSID_ACLMulti>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IEnumString,
|
||||
public IACList,
|
||||
public IObjMgr
|
||||
{
|
||||
private:
|
||||
struct ACLMultiSublist
|
||||
{
|
||||
IUnknown *punk;
|
||||
IEnumString *pEnum;
|
||||
IACList *pACL;
|
||||
};
|
||||
|
||||
INT fObjectCount;
|
||||
INT fCurrentObject;
|
||||
struct ACLMultiSublist *fObjects;
|
||||
public:
|
||||
CACLMulti();
|
||||
~CACLMulti();
|
||||
|
||||
// *** IEnumString methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched);
|
||||
virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt);
|
||||
virtual HRESULT STDMETHODCALLTYPE Reset();
|
||||
virtual HRESULT STDMETHODCALLTYPE Clone(IEnumString **ppenum);
|
||||
|
||||
// *** IACList methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE Expand(LPCOLESTR pszExpand);
|
||||
|
||||
// *** IObjMgr methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE Append(IUnknown *punk);
|
||||
virtual HRESULT STDMETHODCALLTYPE Remove(IUnknown *punk);
|
||||
|
||||
private:
|
||||
void release_obj(struct ACLMultiSublist *obj);
|
||||
|
||||
public:
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_ACLMULTI)
|
||||
DECLARE_NOT_AGGREGATABLE(CACLMulti)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(CACLMulti)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IEnumString, IEnumString)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IACList, IACList)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IObjMgr, IObjMgr)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
#endif // _aclmulti_h
|
509
reactos/dll/win32/browseui/addressband.cpp
Normal file
509
reactos/dll/win32/browseui/addressband.cpp
Normal file
|
@ -0,0 +1,509 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
Implements the navigation band of the cabinet window
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "resource.h"
|
||||
#include "addressband.h"
|
||||
|
||||
/*
|
||||
TODO:
|
||||
****Add command handler for show/hide Go button to OnWinEvent
|
||||
****Add tooltip notify handler
|
||||
**Properly implement GetBandInfo
|
||||
**Add support for showing/hiding Go button
|
||||
**Fix so Go button will be shown/hidden properly on load
|
||||
**Add correct text to Go button
|
||||
**Implement TranslateAcceleratorIO
|
||||
Implement Exec
|
||||
Implement QueryService
|
||||
Implement Load
|
||||
Implement Save
|
||||
*/
|
||||
|
||||
CAddressBand::CAddressBand()
|
||||
{
|
||||
fEditControl = NULL;
|
||||
fGoButton = NULL;
|
||||
fComboBox = NULL;
|
||||
fGoButtonShown = false;
|
||||
}
|
||||
|
||||
CAddressBand::~CAddressBand()
|
||||
{
|
||||
}
|
||||
|
||||
void CAddressBand::FocusChange(BOOL bFocus)
|
||||
{
|
||||
// m_bFocus = bFocus;
|
||||
|
||||
//Inform the input object site that the focus has changed.
|
||||
if (fSite)
|
||||
{
|
||||
#if 0
|
||||
fSite->OnFocusChangeIS((IDockingWindow *)this, bFocus);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi)
|
||||
{
|
||||
if (pdbi->dwMask & DBIM_MINSIZE)
|
||||
{
|
||||
pdbi->ptMinSize.x = 400;
|
||||
pdbi->ptMinSize.y = 22;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_MAXSIZE)
|
||||
{
|
||||
pdbi->ptMaxSize.x = 0;
|
||||
pdbi->ptMaxSize.y = 0;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_INTEGRAL)
|
||||
{
|
||||
pdbi->ptIntegral.x = 0;
|
||||
pdbi->ptIntegral.y = 0;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_ACTUAL)
|
||||
{
|
||||
pdbi->ptActual.x = 400;
|
||||
pdbi->ptActual.y = 22;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_TITLE)
|
||||
wcscpy(pdbi->wszTitle, L"Address");
|
||||
if (pdbi->dwMask & DBIM_MODEFLAGS)
|
||||
pdbi->dwModeFlags = DBIMF_UNDELETEABLE;
|
||||
if (pdbi->dwMask & DBIM_BKCOLOR)
|
||||
pdbi->crBkgnd = 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::SetSite(IUnknown *pUnkSite)
|
||||
{
|
||||
CComPtr<IShellService> shellService;
|
||||
CComPtr<IUnknown> offset34;
|
||||
HWND parentWindow;
|
||||
IOleWindow *oleWindow;
|
||||
HWND toolbar;
|
||||
static const TBBUTTON buttonInfo[] = { {0, 1, TBSTATE_ENABLED, 0} };
|
||||
HIMAGELIST normalImagelist;
|
||||
HIMAGELIST hotImageList;
|
||||
HINSTANCE shellInstance;
|
||||
HRESULT hResult;
|
||||
|
||||
fSite.Release();
|
||||
if (pUnkSite == NULL)
|
||||
return S_OK;
|
||||
hResult = pUnkSite->QueryInterface(IID_IDockingWindowSite, (void **)&fSite);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
parentWindow = NULL;
|
||||
hResult = pUnkSite->QueryInterface(IID_IOleWindow, (void **)&oleWindow);
|
||||
if (SUCCEEDED(hResult))
|
||||
{
|
||||
oleWindow->GetWindow(&parentWindow);
|
||||
oleWindow->Release();
|
||||
}
|
||||
if (!::IsWindow(parentWindow))
|
||||
return E_FAIL;
|
||||
|
||||
toolbar = CreateWindowEx(WS_EX_TOOLWINDOW, WC_COMBOBOXEXW, NULL, WS_CHILD | WS_VISIBLE |
|
||||
WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY,
|
||||
0, 0, 500, 250, parentWindow, (HMENU)0xa205, _AtlBaseModule.GetModuleInstance(), 0);
|
||||
if (toolbar == NULL)
|
||||
return E_FAIL;
|
||||
SubclassWindow(toolbar);
|
||||
SendMessage(CBEM_SETEXTENDEDSTYLE, CBES_EX_CASESENSITIVE | CBES_EX_NOSIZELIMIT, CBES_EX_CASESENSITIVE | CBES_EX_NOSIZELIMIT);
|
||||
fEditControl = (HWND)SendMessage(CBEM_GETEDITCONTROL, 0, 0);
|
||||
fComboBox = (HWND)SendMessage(CBEM_GETCOMBOCONTROL, 0, 0);
|
||||
#if 1
|
||||
hResult = CoCreateInstance(CLSID_AddressEditBox, NULL, CLSCTX_INPROC_SERVER, IID_IAddressEditBox, (void **)&fAddressEditBox);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
#else
|
||||
// instantiate new version
|
||||
#endif
|
||||
hResult = fAddressEditBox->QueryInterface(IID_IShellService, (void **)&shellService);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = fAddressEditBox->Init(toolbar, fEditControl, 8, pUnkSite /*(IAddressBand *)this*/ );
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = shellService->SetOwner(pUnkSite);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
|
||||
// TODO: properly initialize this from registry
|
||||
fGoButtonShown = true;
|
||||
|
||||
shellInstance = GetModuleHandle(_T("shell32.dll"));
|
||||
normalImagelist = ImageList_LoadImageW(shellInstance, MAKEINTRESOURCE(IDB_GOBUTTON_NORMAL), 20, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
|
||||
hotImageList = ImageList_LoadImageW(shellInstance, MAKEINTRESOURCE(IDB_GOBUTTON_HOT), 20, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
|
||||
|
||||
fGoButton = CreateWindowEx(WS_EX_TOOLWINDOW, TOOLBARCLASSNAMEW, 0, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | TBSTYLE_LIST |
|
||||
TBSTYLE_FLAT | TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NORESIZE,
|
||||
0, 0, 0, 0, m_hWnd, NULL, _AtlBaseModule.GetModuleInstance(), NULL);
|
||||
SendMessage(fGoButton, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
|
||||
SendMessage(fGoButton, TB_SETMAXTEXTROWS, 1, 0);
|
||||
SendMessage(fGoButton, TB_SETIMAGELIST, 0, (LPARAM)normalImagelist);
|
||||
SendMessage(fGoButton, TB_SETHOTIMAGELIST, 0, (LPARAM)hotImageList);
|
||||
SendMessage(fGoButton, TB_ADDSTRINGW, (WPARAM)_AtlBaseModule.GetResourceInstance(), IDS_GOBUTTONLABEL);
|
||||
SendMessage(fGoButton, TB_ADDBUTTONSW, 1, (LPARAM)&buttonInfo);
|
||||
|
||||
return hResult;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::GetSite(REFIID riid, void **ppvSite)
|
||||
{
|
||||
if (fSite == NULL)
|
||||
return E_FAIL;
|
||||
return fSite->QueryInterface(riid, ppvSite);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::GetWindow(HWND *lphwnd)
|
||||
{
|
||||
if (lphwnd == NULL)
|
||||
return E_POINTER;
|
||||
*lphwnd = m_hWnd;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::ContextSensitiveHelp(BOOL fEnterMode)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::CloseDW(DWORD dwReserved)
|
||||
{
|
||||
ShowDW(FALSE);
|
||||
|
||||
if (IsWindow())
|
||||
DestroyWindow();
|
||||
|
||||
m_hWnd = NULL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::ShowDW(BOOL fShow)
|
||||
{
|
||||
if (m_hWnd)
|
||||
{
|
||||
if (fShow)
|
||||
ShowWindow(SW_SHOW);
|
||||
else
|
||||
ShowWindow(SW_HIDE);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
|
||||
{
|
||||
CComPtr<IOleCommandTarget> oleCommandTarget;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = fAddressEditBox->QueryInterface(IID_IOleCommandTarget, (void **)&oleCommandTarget);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return oleCommandTarget->QueryStatus(pguidCmdGroup, cCmds, prgCmds, pCmdText);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
|
||||
{
|
||||
// incomplete
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::HasFocusIO()
|
||||
{
|
||||
if (GetFocus() == fEditControl || SendMessage(CB_GETDROPPEDSTATE, 0, 0))
|
||||
return S_OK;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::TranslateAcceleratorIO(LPMSG lpMsg)
|
||||
{
|
||||
// incomplete
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::UIActivateIO(BOOL fActivate, LPMSG lpMsg)
|
||||
{
|
||||
CComPtr<IInputObjectSite> inputObjectSite;
|
||||
HRESULT hResult;
|
||||
|
||||
if (fActivate)
|
||||
{
|
||||
hResult = fSite->QueryInterface(IID_IInputObjectSite, (void **)&inputObjectSite);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = inputObjectSite->OnFocusChangeIS((IDeskBand *)this, fActivate);
|
||||
SetFocus();
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
|
||||
{
|
||||
CComPtr<IWinEventHandler> winEventHandler;
|
||||
HRESULT hResult;
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_WININICHANGE:
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
if (wParam == IDM_TOOLBARS_GOBUTTON)
|
||||
{
|
||||
// toggle whether the Go button is displayed
|
||||
// setting is Yes or No, stored in key "Software\Microsoft\Internet Explorer\Main" in value ShowGoButton
|
||||
// broadcast change notification to all explorer windows
|
||||
}
|
||||
break;
|
||||
}
|
||||
hResult = fAddressEditBox->QueryInterface(IID_IWinEventHandler, (void **)&winEventHandler);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return winEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::IsWindowOwner(HWND hWnd)
|
||||
{
|
||||
CComPtr<IWinEventHandler> winEventHandler;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = fAddressEditBox->QueryInterface(IID_IWinEventHandler, (void **)&winEventHandler);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return winEventHandler->IsWindowOwner(hWnd);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::FileSysChange(long param8, long paramC)
|
||||
{
|
||||
CComPtr<IAddressBand> addressBand;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = fAddressEditBox->QueryInterface(IID_IAddressBand, (void **)&addressBand);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return addressBand->FileSysChange(param8, paramC);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::Refresh(long param8)
|
||||
{
|
||||
CComPtr<IAddressBand> addressBand;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = fAddressEditBox->QueryInterface(IID_IAddressBand, (void **)&addressBand);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return addressBand->Refresh(param8);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::GetClassID(CLSID *pClassID)
|
||||
{
|
||||
if (pClassID == NULL)
|
||||
return E_POINTER;
|
||||
*pClassID = CLSID_SH_AddressBand;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::IsDirty()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::Load(IStream *pStm)
|
||||
{
|
||||
// incomplete
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::Save(IStream *pStm, BOOL fClearDirty)
|
||||
{
|
||||
// incomplete
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressBand::GetSizeMax(ULARGE_INTEGER *pcbSize)
|
||||
{
|
||||
// incomplete
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
LRESULT CAddressBand::OnNotifyClick(WPARAM wParam, NMHDR *notifyHeader, BOOL &bHandled)
|
||||
{
|
||||
if (notifyHeader->hwndFrom == fGoButton)
|
||||
{
|
||||
SendMessage(fEditControl, WM_KEYDOWN, 13, 0);
|
||||
SendMessage(fEditControl, WM_KEYUP, 13, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CAddressBand::OnTipText(UINT idControl, NMHDR *notifyHeader, BOOL &bHandled)
|
||||
{
|
||||
if (notifyHeader->hwndFrom == fGoButton)
|
||||
{
|
||||
// TODO
|
||||
// Go to "destination path"
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CAddressBand::OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
POINT pt;
|
||||
POINT ptOrig;
|
||||
HWND parentWindow;
|
||||
LRESULT result;
|
||||
|
||||
if (fGoButtonShown == false)
|
||||
{
|
||||
bHandled = FALSE;
|
||||
return 0;
|
||||
}
|
||||
pt.x = 0;
|
||||
pt.y = 0;
|
||||
parentWindow = GetParent();
|
||||
::MapWindowPoints(m_hWnd, parentWindow, &pt, 1);
|
||||
OffsetWindowOrgEx((HDC)wParam, pt.x, pt.y, &ptOrig);
|
||||
result = SendMessage(parentWindow, WM_ERASEBKGND, wParam, 0);
|
||||
SetWindowOrgEx((HDC)wParam, ptOrig.x, ptOrig.y, NULL);
|
||||
if (result == 0)
|
||||
{
|
||||
bHandled = FALSE;
|
||||
return 0;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
LRESULT CAddressBand::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
RECT goButtonBounds;
|
||||
RECT buttonBounds;
|
||||
long buttonWidth;
|
||||
long buttonHeight;
|
||||
RECT comboBoxBounds;
|
||||
long newHeight;
|
||||
long newWidth;
|
||||
|
||||
if (fGoButtonShown == false)
|
||||
{
|
||||
bHandled = FALSE;
|
||||
return 0;
|
||||
}
|
||||
newHeight = HIWORD(lParam);
|
||||
newWidth = LOWORD(lParam);
|
||||
SendMessage(fGoButton, TB_GETITEMRECT, 0, (LPARAM)&buttonBounds);
|
||||
buttonWidth = buttonBounds.right - buttonBounds.left;
|
||||
buttonHeight = buttonBounds.bottom - buttonBounds.top;
|
||||
DefWindowProc(WM_SIZE, wParam, MAKELONG(newWidth - buttonWidth - 2, newHeight));
|
||||
::GetWindowRect(fComboBox, &comboBoxBounds);
|
||||
::SetWindowPos(fGoButton, NULL, newWidth - buttonWidth, (comboBoxBounds.bottom - comboBoxBounds.top - buttonHeight) / 2,
|
||||
buttonWidth, buttonHeight, SWP_NOOWNERZORDER | SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
goButtonBounds.left = newWidth - buttonWidth;
|
||||
goButtonBounds.top = 0;
|
||||
goButtonBounds.right = newWidth - buttonWidth;
|
||||
goButtonBounds.bottom = newHeight;
|
||||
InvalidateRect(&goButtonBounds, TRUE);
|
||||
SendMessage(fComboBox, CB_SETDROPPEDWIDTH, 200, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CAddressBand::OnWindowPosChanging(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
RECT goButtonBounds;
|
||||
RECT buttonBounds;
|
||||
long buttonWidth;
|
||||
long buttonHeight;
|
||||
RECT comboBoxBounds;
|
||||
WINDOWPOS positionInfoCopy;
|
||||
long newHeight;
|
||||
long newWidth;
|
||||
|
||||
if (fGoButtonShown == false)
|
||||
{
|
||||
bHandled = FALSE;
|
||||
return 0;
|
||||
}
|
||||
positionInfoCopy = *(WINDOWPOS *)lParam;
|
||||
newHeight = positionInfoCopy.cy;
|
||||
newWidth = positionInfoCopy.cx;
|
||||
SendMessage(fGoButton, TB_GETITEMRECT, 0, (LPARAM)&buttonBounds);
|
||||
buttonWidth = buttonBounds.right - buttonBounds.left;
|
||||
buttonHeight = buttonBounds.bottom - buttonBounds.top;
|
||||
positionInfoCopy.cx = newWidth - 2 - buttonWidth;
|
||||
DefWindowProc(WM_WINDOWPOSCHANGING, wParam, (LPARAM)&positionInfoCopy);
|
||||
::GetWindowRect(fComboBox, &comboBoxBounds);
|
||||
::SetWindowPos(fGoButton, NULL, newWidth - buttonWidth, (comboBoxBounds.bottom - comboBoxBounds.top - buttonHeight) / 2,
|
||||
buttonWidth, buttonHeight, SWP_NOOWNERZORDER | SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
goButtonBounds.left = newWidth - buttonWidth;
|
||||
goButtonBounds.top = 0;
|
||||
goButtonBounds.right = newWidth - buttonWidth;
|
||||
goButtonBounds.bottom = newHeight;
|
||||
InvalidateRect(&goButtonBounds, TRUE);
|
||||
SendMessage(fComboBox, CB_SETDROPPEDWIDTH, 200, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT CreateAddressBand(REFIID riid, void **ppv)
|
||||
{
|
||||
CComObject<CAddressBand> *theMenuBar;
|
||||
HRESULT hResult;
|
||||
|
||||
if (ppv == NULL)
|
||||
return E_POINTER;
|
||||
*ppv = NULL;
|
||||
ATLTRY (theMenuBar = new CComObject<CAddressBand>);
|
||||
if (theMenuBar == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
hResult = theMenuBar->QueryInterface (riid, (void **)ppv);
|
||||
if (FAILED (hResult))
|
||||
{
|
||||
delete theMenuBar;
|
||||
return hResult;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
135
reactos/dll/win32/browseui/addressband.h
Normal file
135
reactos/dll/win32/browseui/addressband.h
Normal file
|
@ -0,0 +1,135 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _addressband_h
|
||||
#define _addressband_h
|
||||
|
||||
class CAddressBand :
|
||||
public CWindowImpl<CAddressBand, CWindow, CControlWinTraits>,
|
||||
public CComCoClass<CAddressBand, &CLSID_SH_AddressBand>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IDeskBand,
|
||||
public IOleCommandTarget,
|
||||
public IObjectWithSite,
|
||||
public IInputObject,
|
||||
public IWinEventHandler,
|
||||
public IAddressBand,
|
||||
public IServiceProvider,
|
||||
public IInputObjectSite,
|
||||
public IPersistStream
|
||||
{
|
||||
private:
|
||||
CComPtr<IDockingWindowSite> fSite;
|
||||
CComPtr<IAddressEditBox> fAddressEditBox;
|
||||
HWND fEditControl;
|
||||
HWND fGoButton;
|
||||
HWND fComboBox;
|
||||
bool fGoButtonShown;
|
||||
public:
|
||||
CAddressBand();
|
||||
~CAddressBand();
|
||||
private:
|
||||
void FocusChange(BOOL bFocus);
|
||||
public:
|
||||
// *** IDeskBand methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi);
|
||||
|
||||
// *** IObjectWithSite methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite);
|
||||
|
||||
// *** IOleWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
|
||||
|
||||
// *** IDockingWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved);
|
||||
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved);
|
||||
virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow);
|
||||
|
||||
// *** IOleCommandTarget methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
|
||||
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
|
||||
|
||||
// *** IInputObject methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg);
|
||||
virtual HRESULT STDMETHODCALLTYPE HasFocusIO();
|
||||
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg);
|
||||
|
||||
// *** IWinEventHandler methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult);
|
||||
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd);
|
||||
|
||||
// *** IAddressBand methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE FileSysChange(long param8, long paramC);
|
||||
virtual HRESULT STDMETHODCALLTYPE Refresh(long param8);
|
||||
|
||||
// *** IServiceProvider methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
|
||||
|
||||
// *** IInputObjectSite methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus);
|
||||
|
||||
// *** IPersist methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
|
||||
|
||||
// *** IPersistStream methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE IsDirty();
|
||||
virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm);
|
||||
virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
|
||||
|
||||
// message handlers
|
||||
LRESULT OnNotifyClick(WPARAM wParam, NMHDR *notifyHeader, BOOL &bHandled);
|
||||
LRESULT OnTipText(UINT idControl, NMHDR *notifyHeader, BOOL &bHandled);
|
||||
LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnWindowPosChanging(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
|
||||
BEGIN_MSG_MAP(CAddressBand)
|
||||
NOTIFY_CODE_HANDLER(NM_CLICK, OnNotifyClick)
|
||||
NOTIFY_CODE_HANDLER(TTN_NEEDTEXTW, OnTipText)
|
||||
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackground)
|
||||
MESSAGE_HANDLER(WM_SIZE, OnSize)
|
||||
MESSAGE_HANDLER(WM_WINDOWPOSCHANGING, OnWindowPosChanging)
|
||||
END_MSG_MAP()
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_ADDRESSBAND)
|
||||
DECLARE_NOT_AGGREGATABLE(CAddressBand)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(CAddressBand)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDockingWindow, IDockingWindow)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IAddressBand, IAddressBand)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
#endif // _addressband_h
|
191
reactos/dll/win32/browseui/addresseditbox.cpp
Normal file
191
reactos/dll/win32/browseui/addresseditbox.cpp
Normal file
|
@ -0,0 +1,191 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
This class handles the combo box of the address band.
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "resource.h"
|
||||
#include "addresseditbox.h"
|
||||
/*
|
||||
TODO:
|
||||
Add auto completion support
|
||||
Subclass windows in Init method
|
||||
Connect to browser connection point
|
||||
Handle navigation complete messages to set edit box text
|
||||
Handle listbox dropdown message and fill contents
|
||||
Add drag and drop of icon in edit box
|
||||
Handle enter in edit box to browse to typed path
|
||||
Handle change notifies to update appropriately
|
||||
Add handling of enter in edit box
|
||||
Fix so selection in combo listbox navigates
|
||||
Fix so editing text and typing enter navigates
|
||||
*/
|
||||
|
||||
CAddressEditBox::CAddressEditBox() :
|
||||
fEditWindow(NULL, this, 1),
|
||||
fComboBoxExWindow(NULL, this, 2)
|
||||
{
|
||||
}
|
||||
|
||||
CAddressEditBox::~CAddressEditBox()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::SetOwner(IUnknown *)
|
||||
{
|
||||
// connect to browser connection point
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::FileSysChange(long param8, long paramC)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::Refresh(long param8)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::Init(HWND comboboxEx, HWND editControl, long param14, IUnknown *param18)
|
||||
{
|
||||
fComboBoxExWindow.SubclassWindow(comboboxEx);
|
||||
fEditWindow.SubclassWindow(editControl);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::SetCurrentDir(long paramC)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::ParseNow(long paramC)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::Execute(long paramC)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::Save(long paramC)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
|
||||
{
|
||||
// handle fill of listbox here
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::IsWindowOwner(HWND hWnd)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::GetTypeInfoCount(UINT *pctinfo)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||
{
|
||||
// on navigate complete, change edit section of combobox
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::GetClassID(CLSID *pClassID)
|
||||
{
|
||||
if (pClassID == NULL)
|
||||
return E_POINTER;
|
||||
*pClassID = CLSID_AddressEditBox;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::IsDirty()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::Load(IStream *pStm)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::Save(IStream *pStm, BOOL fClearDirty)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CAddressEditBox::GetSizeMax(ULARGE_INTEGER *pcbSize)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT CreateAddressEditBox(REFIID riid, void **ppv)
|
||||
{
|
||||
CComObject<CAddressEditBox> *theMenuBar;
|
||||
HRESULT hResult;
|
||||
|
||||
if (ppv == NULL)
|
||||
return E_POINTER;
|
||||
*ppv = NULL;
|
||||
ATLTRY (theMenuBar = new CComObject<CAddressEditBox>);
|
||||
if (theMenuBar == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
hResult = theMenuBar->QueryInterface (riid, (void **)ppv);
|
||||
if (FAILED (hResult))
|
||||
{
|
||||
delete theMenuBar;
|
||||
return hResult;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
112
reactos/dll/win32/browseui/addresseditbox.h
Normal file
112
reactos/dll/win32/browseui/addresseditbox.h
Normal file
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _addresseditbox_h
|
||||
#define _addresseditbox_h
|
||||
|
||||
class CAddressEditBox :
|
||||
public CWindowImpl<CAddressEditBox, CWindow, CControlWinTraits>,
|
||||
public CComCoClass<CAddressEditBox, &CLSID_AddressEditBox>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IShellService,
|
||||
public IAddressBand,
|
||||
public IAddressEditBox,
|
||||
public IWinEventHandler,
|
||||
public IOleCommandTarget,
|
||||
public IDispatch,
|
||||
public IPersistStream
|
||||
{
|
||||
private:
|
||||
CContainedWindow fEditWindow;
|
||||
CContainedWindow fComboBoxExWindow;
|
||||
public:
|
||||
CAddressEditBox();
|
||||
~CAddressEditBox();
|
||||
private:
|
||||
public:
|
||||
// *** IShellService methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetOwner(IUnknown *);
|
||||
|
||||
// *** IAddressBand methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE FileSysChange(long param8, long paramC);
|
||||
virtual HRESULT STDMETHODCALLTYPE Refresh(long param8);
|
||||
|
||||
// *** IAddressEditBox methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE Init(HWND comboboxEx, HWND editControl, long param14, IUnknown *param18);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetCurrentDir(long paramC);
|
||||
virtual HRESULT STDMETHODCALLTYPE ParseNow(long paramC);
|
||||
virtual HRESULT STDMETHODCALLTYPE Execute(long paramC);
|
||||
virtual HRESULT STDMETHODCALLTYPE Save(long paramC);
|
||||
|
||||
// *** IWinEventHandler methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult);
|
||||
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd);
|
||||
|
||||
// *** IOleCommandTarget methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
|
||||
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
|
||||
|
||||
// *** IDispatch methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
|
||||
virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
|
||||
|
||||
// *** IPersist methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
|
||||
|
||||
// *** IPersistStream methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE IsDirty();
|
||||
virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm);
|
||||
virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
|
||||
|
||||
// message handlers
|
||||
// LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
// LRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_ADDRESSEDITBOX)
|
||||
DECLARE_NOT_AGGREGATABLE(CAddressEditBox)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_MSG_MAP(CAddressEditBox)
|
||||
// MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
|
||||
// MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus)
|
||||
// MESSAGE_HANDLER(WM_KILLFOCUS, OnKillFocus)
|
||||
// ALT_MSG_MAP(1)
|
||||
// MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocusSaveButton)
|
||||
// ALT_MSG_MAP(2)
|
||||
// MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocusSelectButton)
|
||||
END_MSG_MAP()
|
||||
|
||||
BEGIN_COM_MAP(CAddressEditBox)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IShellService, IShellService)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IAddressBand, IAddressBand)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IAddressEditBox, IAddressEditBox)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDispatch, IDispatch)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
#endif // _addresseditbox_h
|
161
reactos/dll/win32/browseui/bandproxy.cpp
Normal file
161
reactos/dll/win32/browseui/bandproxy.cpp
Normal file
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
Used by the address band to dispatch navigation changes to the main browser object.
|
||||
|
||||
TODO:
|
||||
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <perhist.h>
|
||||
#include <exdisp.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "resource.h"
|
||||
#include "bandproxy.h"
|
||||
|
||||
CBandProxy::CBandProxy()
|
||||
{
|
||||
}
|
||||
|
||||
CBandProxy::~CBandProxy()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBandProxy::FindBrowserWindow(IUnknown **browser)
|
||||
{
|
||||
CComPtr<IServiceProvider> serviceProvider;
|
||||
CComPtr<IWebBrowser2> webBrowser;
|
||||
HRESULT hResult;
|
||||
|
||||
if (browser == NULL)
|
||||
return E_POINTER;
|
||||
hResult = fSite->QueryInterface(IID_IServiceProvider, (void **)&serviceProvider);
|
||||
if (FAILED (hResult))
|
||||
return hResult;
|
||||
hResult = serviceProvider->QueryService(SID_IWebBrowserApp, IID_IWebBrowser2, (void **)&webBrowser);
|
||||
if (FAILED (hResult))
|
||||
return hResult;
|
||||
*browser = webBrowser.Detach();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandProxy::SetSite(IUnknown *paramC)
|
||||
{
|
||||
fSite = paramC;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandProxy::CreateNewWindow(long paramC)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandProxy::GetBrowserWindow(IUnknown **paramC)
|
||||
{
|
||||
if (paramC == NULL)
|
||||
return E_POINTER;
|
||||
return FindBrowserWindow(paramC);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandProxy::IsConnected()
|
||||
{
|
||||
CComPtr<IUnknown> webBrowser;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = FindBrowserWindow(&webBrowser);
|
||||
if (FAILED (hResult) || webBrowser.p == NULL)
|
||||
return S_FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandProxy::NavigateToPIDL(LPCITEMIDLIST pidl)
|
||||
{
|
||||
CComPtr<IOleWindow> oleWindow;
|
||||
CComPtr<IServiceProvider> serviceProvider;
|
||||
CComPtr<IUnknown> webBrowserUnknown;
|
||||
CComPtr<IWebBrowser2> webBrowser;
|
||||
HWND browserWindow;
|
||||
CComVariant args;
|
||||
CComVariant emptyVariant;
|
||||
unsigned int arraySize;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = FindBrowserWindow(&webBrowserUnknown);
|
||||
if (FAILED (hResult))
|
||||
return hResult;
|
||||
hResult = webBrowserUnknown->QueryInterface(IID_IWebBrowserApp, (void **)&webBrowser);
|
||||
if (FAILED (hResult))
|
||||
return hResult;
|
||||
hResult = webBrowser->put_Visible(TRUE);
|
||||
hResult = webBrowser->QueryInterface(IID_IServiceProvider, (void **)&serviceProvider);
|
||||
if (SUCCEEDED (hResult))
|
||||
{
|
||||
hResult = serviceProvider->QueryService(SID_STopLevelBrowser, IID_IOleWindow, (void **)&oleWindow);
|
||||
if (SUCCEEDED (hResult))
|
||||
{
|
||||
hResult = oleWindow->GetWindow(&browserWindow);
|
||||
if (IsIconic(browserWindow))
|
||||
ShowWindow(browserWindow, SW_RESTORE);
|
||||
}
|
||||
}
|
||||
arraySize = ILGetSize(pidl);
|
||||
V_VT(&args) = VT_ARRAY | VT_UI1;
|
||||
V_ARRAY(&args) = SafeArrayCreateVector(VT_UI1, 0, arraySize);
|
||||
if (V_ARRAY(&args) == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
memcpy(V_ARRAY(&args)->pvData, pidl, arraySize);
|
||||
hResult = webBrowser->Navigate2(&args, &emptyVariant, &emptyVariant, &emptyVariant, &emptyVariant);
|
||||
if (FAILED (hResult))
|
||||
return hResult;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandProxy::NavigateToURL(long paramC, long param10)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT CreateBandProxy(REFIID riid, void **ppv)
|
||||
{
|
||||
CComObject<CBandProxy> *theBandProxy;
|
||||
HRESULT hResult;
|
||||
|
||||
if (ppv == NULL)
|
||||
return E_POINTER;
|
||||
*ppv = NULL;
|
||||
ATLTRY (theBandProxy = new CComObject<CBandProxy>);
|
||||
if (theBandProxy == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
hResult = theBandProxy->QueryInterface (riid, (void **)ppv);
|
||||
if (FAILED (hResult))
|
||||
{
|
||||
delete theBandProxy;
|
||||
return hResult;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
54
reactos/dll/win32/browseui/bandproxy.h
Normal file
54
reactos/dll/win32/browseui/bandproxy.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _bandproxy_h
|
||||
#define _bandproxy_h
|
||||
|
||||
class CBandProxy :
|
||||
public CComCoClass<CBandProxy, &CLSID_BandProxy>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IBandProxy
|
||||
{
|
||||
private:
|
||||
CComPtr<IUnknown> fSite;
|
||||
public:
|
||||
CBandProxy();
|
||||
~CBandProxy();
|
||||
HRESULT FindBrowserWindow(IUnknown **browser);
|
||||
|
||||
// *** IBandProxy methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *paramC);
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateNewWindow(long paramC);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBrowserWindow(IUnknown **paramC);
|
||||
virtual HRESULT STDMETHODCALLTYPE IsConnected();
|
||||
virtual HRESULT STDMETHODCALLTYPE NavigateToPIDL(LPCITEMIDLIST pidl);
|
||||
virtual HRESULT STDMETHODCALLTYPE NavigateToURL(long paramC, long param10);
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_BANDPROXY)
|
||||
DECLARE_NOT_AGGREGATABLE(CBandProxy)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(CBandProxy)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IBandProxy, IBandProxy)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
#endif // _bandproxy_h
|
File diff suppressed because it is too large
Load diff
844
reactos/dll/win32/browseui/bandsite.cpp
Normal file
844
reactos/dll/win32/browseui/bandsite.cpp
Normal file
|
@ -0,0 +1,844 @@
|
|||
/*
|
||||
* Rebar band site
|
||||
*
|
||||
* Copyright 2007 Hervé Poussineau
|
||||
* Copyright 2009 Andrew Hill
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "resource.h"
|
||||
#include "wine/debug.h"
|
||||
#include "bandsite.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(browseui);
|
||||
|
||||
#ifndef ASSERT
|
||||
#define ASSERT(cond) \
|
||||
if (!(cond)) \
|
||||
ERR ("ASSERTION %s AT %s:%d FAILED!\n", #cond, __FILE__, __LINE__)
|
||||
#endif
|
||||
|
||||
CBandSiteBase::CBandSiteBase()
|
||||
{
|
||||
fBandsCount = 0;
|
||||
fBandsAllocated = 0;
|
||||
fBands = NULL;
|
||||
fRebarWindow = NULL;
|
||||
}
|
||||
|
||||
UINT CBandSiteBase::GetBandID(struct BandObject *Band)
|
||||
{
|
||||
return (UINT)(Band - fBands);
|
||||
}
|
||||
|
||||
struct CBandSiteBase::BandObject *CBandSiteBase::GetBandByID(DWORD dwBandID)
|
||||
{
|
||||
if ((LONG)dwBandID >= fBandsAllocated)
|
||||
return NULL;
|
||||
|
||||
if (fBands[dwBandID].DeskBand == NULL)
|
||||
return NULL;
|
||||
|
||||
return &fBands[dwBandID];
|
||||
}
|
||||
|
||||
void CBandSiteBase::FreeBand(struct BandObject *Band)
|
||||
{
|
||||
ATLASSERT(Band->DeskBand != NULL);
|
||||
ATLASSERT(Band->OleWindow != NULL);
|
||||
ATLASSERT(Band->WndEvtHandler != NULL);
|
||||
Band->DeskBand->Release();
|
||||
Band->OleWindow->Release();
|
||||
Band->WndEvtHandler->Release();
|
||||
memset(Band, 0, sizeof(*Band));
|
||||
fBandsCount--;
|
||||
}
|
||||
|
||||
DWORD CBandSiteBase::GetBandSiteViewMode()
|
||||
{
|
||||
DWORD dwStyle;
|
||||
|
||||
/* FIXME: What about DBIF_VIEWMODE_FLOATING and DBIF_VIEWMODE_TRANSPARENT? */
|
||||
dwStyle = GetWindowLongPtr(fRebarWindow, GWL_STYLE);
|
||||
|
||||
if (dwStyle & CCS_VERT)
|
||||
return DBIF_VIEWMODE_VERTICAL;
|
||||
else
|
||||
return DBIF_VIEWMODE_NORMAL;
|
||||
}
|
||||
|
||||
VOID CBandSiteBase::BuildRebarBandInfo(struct BandObject *Band, REBARBANDINFOW *prbi)
|
||||
{
|
||||
memset(prbi, 0, sizeof(*prbi));
|
||||
prbi->cbSize = sizeof(*prbi);
|
||||
|
||||
prbi->fMask = RBBIM_ID;
|
||||
prbi->wID = GetBandID(Band);
|
||||
|
||||
if (Band->dbi.dwMask & DBIM_MINSIZE)
|
||||
{
|
||||
prbi->fMask |= RBBIM_CHILDSIZE;
|
||||
prbi->cxMinChild = Band->dbi.ptMinSize.x;
|
||||
prbi->cyMinChild = Band->dbi.ptMinSize.y;
|
||||
}
|
||||
|
||||
if (Band->dbi.dwMask & DBIM_MAXSIZE)
|
||||
{
|
||||
prbi->fMask |= RBBIM_CHILDSIZE;
|
||||
prbi->cyMaxChild = Band->dbi.ptMaxSize.y;
|
||||
}
|
||||
|
||||
if ((Band->dbi.dwMask & (DBIM_INTEGRAL | DBIM_MODEFLAGS)) == (DBIM_INTEGRAL | DBIM_MODEFLAGS) &&
|
||||
(Band->dbi.dwModeFlags & DBIMF_VARIABLEHEIGHT))
|
||||
{
|
||||
prbi->fMask |= RBBIM_CHILDSIZE;
|
||||
prbi->cyIntegral = Band->dbi.ptIntegral.y;
|
||||
}
|
||||
|
||||
if (Band->dbi.dwMask & DBIM_ACTUAL)
|
||||
{
|
||||
prbi->fMask |= RBBIM_IDEALSIZE | RBBIM_SIZE | RBBIM_CHILDSIZE;
|
||||
prbi->cxIdeal = Band->dbi.ptActual.x;
|
||||
prbi->cx = Band->dbi.ptActual.x;
|
||||
prbi->cyChild = Band->dbi.ptActual.y;
|
||||
}
|
||||
|
||||
if (Band->dbi.dwMask & DBIM_TITLE)
|
||||
{
|
||||
prbi->fMask |= RBBIM_TEXT;
|
||||
prbi->lpText = Band->dbi.wszTitle;
|
||||
prbi->cch = wcslen(Band->dbi.wszTitle);
|
||||
}
|
||||
|
||||
if (Band->dbi.dwMask & DBIM_MODEFLAGS)
|
||||
{
|
||||
prbi->fMask |= RBBIM_STYLE;
|
||||
|
||||
if (Band->dbi.dwModeFlags & DBIMF_FIXED)
|
||||
prbi->fStyle |= RBBS_FIXEDSIZE | RBBS_NOGRIPPER;
|
||||
if (Band->dbi.dwModeFlags & DBIMF_FIXEDBMP)
|
||||
prbi->fStyle |= RBBS_FIXEDBMP;
|
||||
if (Band->dbi.dwModeFlags & DBIMF_VARIABLEHEIGHT)
|
||||
prbi->fStyle |= RBBS_VARIABLEHEIGHT;
|
||||
if (Band->dbi.dwModeFlags & DBIMF_DEBOSSED)
|
||||
prbi->fStyle |= RBBS_CHILDEDGE;
|
||||
if (Band->dbi.dwModeFlags & DBIMF_USECHEVRON)
|
||||
prbi->fStyle |= RBBS_USECHEVRON;
|
||||
if (Band->dbi.dwModeFlags & DBIMF_BREAK)
|
||||
prbi->fStyle |= RBBS_BREAK;
|
||||
if (Band->dbi.dwModeFlags & DBIMF_TOPALIGN)
|
||||
prbi->fStyle |= RBBS_TOPALIGN;
|
||||
if (Band->dbi.dwModeFlags & DBIMF_NOGRIPPER)
|
||||
prbi->fStyle |= RBBS_NOGRIPPER;
|
||||
if (Band->dbi.dwModeFlags & DBIMF_ALWAYSGRIPPER)
|
||||
prbi->fStyle |= RBBS_GRIPPERALWAYS;
|
||||
}
|
||||
|
||||
if ((Band->dbi.dwMask & (DBIM_BKCOLOR | DBIM_MODEFLAGS)) == (DBIM_BKCOLOR | DBIM_MODEFLAGS) &&
|
||||
(Band->dbi.dwModeFlags & DBIMF_BKCOLOR))
|
||||
{
|
||||
prbi->fMask |= RBBIM_COLORS;
|
||||
prbi->clrFore = (COLORREF)(COLOR_WINDOWTEXT + 1);
|
||||
prbi->clrBack = Band->dbi.crBkgnd;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CBandSiteBase::UpdateSingleBand(struct BandObject *Band)
|
||||
{
|
||||
REBARBANDINFOW rbi;
|
||||
DWORD dwViewMode;
|
||||
UINT uBand;
|
||||
HRESULT hRet;
|
||||
|
||||
memset(&Band->dbi, 0, sizeof(Band->dbi));
|
||||
Band->dbi.dwMask = DBIM_MINSIZE | DBIM_MAXSIZE | DBIM_INTEGRAL |
|
||||
DBIM_ACTUAL | DBIM_TITLE | DBIM_MODEFLAGS | DBIM_BKCOLOR;
|
||||
|
||||
dwViewMode = GetBandSiteViewMode();
|
||||
|
||||
hRet = Band->DeskBand->GetBandInfo((DWORD)GetBandID(Band), dwViewMode, &Band->dbi);
|
||||
if (SUCCEEDED(hRet))
|
||||
{
|
||||
BuildRebarBandInfo(Band, &rbi);
|
||||
if (SUCCEEDED(Band->OleWindow->GetWindow(&rbi.hwndChild)) &&
|
||||
rbi.hwndChild != NULL)
|
||||
{
|
||||
rbi.fMask |= RBBIM_CHILD;
|
||||
WARN ("ReBar band uses child window 0x%p\n", rbi.hwndChild);
|
||||
}
|
||||
|
||||
uBand = (UINT)SendMessageW(fRebarWindow, RB_IDTOINDEX, (WPARAM)rbi.wID, 0);
|
||||
if (uBand != (UINT)-1)
|
||||
{
|
||||
if (!SendMessageW(fRebarWindow, RB_SETBANDINFOW, (WPARAM)uBand, (LPARAM)&rbi))
|
||||
{
|
||||
WARN("Failed to update the rebar band!\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
WARN("Failed to map rebar band id to index!\n");
|
||||
|
||||
}
|
||||
|
||||
return hRet;
|
||||
}
|
||||
|
||||
HRESULT CBandSiteBase::UpdateAllBands()
|
||||
{
|
||||
LONG i;
|
||||
HRESULT hRet;
|
||||
|
||||
for (i = 0; i < fBandsAllocated; i++)
|
||||
{
|
||||
if (fBands[i].DeskBand != NULL)
|
||||
{
|
||||
hRet = UpdateSingleBand(&fBands[i]);
|
||||
if (!SUCCEEDED(hRet))
|
||||
return hRet;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBandSiteBase::UpdateBand(DWORD dwBandID)
|
||||
{
|
||||
struct BandObject *Band;
|
||||
|
||||
Band = GetBandByID(dwBandID);
|
||||
if (Band == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
return UpdateSingleBand(Band);
|
||||
}
|
||||
|
||||
struct CBandSiteBase::BandObject *CBandSiteBase::GetBandFromHwnd(HWND hwnd)
|
||||
{
|
||||
HRESULT hRet;
|
||||
HWND hWndBand;
|
||||
LONG i;
|
||||
|
||||
for (i = 0; i < fBandsAllocated; i++)
|
||||
{
|
||||
if (fBands[i].DeskBand != NULL)
|
||||
{
|
||||
ASSERT(fBands[i].OleWindow);
|
||||
|
||||
hWndBand = NULL;
|
||||
hRet = fBands[i].OleWindow->GetWindow(&hWndBand);
|
||||
if (SUCCEEDED(hRet) && hWndBand == hwnd)
|
||||
return &fBands[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CBandSiteBase::~CBandSiteBase()
|
||||
{
|
||||
int i;
|
||||
|
||||
TRACE("destroying %p\n", this);
|
||||
|
||||
if (fRebarWindow != NULL)
|
||||
{
|
||||
DestroyWindow(fRebarWindow);
|
||||
fRebarWindow = NULL;
|
||||
}
|
||||
|
||||
if (fBands != NULL)
|
||||
{
|
||||
for (i = 0; i < fBandsAllocated; i++)
|
||||
{
|
||||
if (fBands[i].DeskBand != NULL)
|
||||
FreeBand(&fBands[i]);
|
||||
}
|
||||
CoTaskMemFree(fBands);
|
||||
fBands = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::AddBand(IUnknown *punk)
|
||||
{
|
||||
INT i;
|
||||
LONG NewAllocated;
|
||||
struct BandObject *NewBand = NULL;
|
||||
CComPtr<IDeskBand> DeskBand;
|
||||
CComPtr<IObjectWithSite> ObjWithSite;
|
||||
CComPtr<IOleWindow> OleWindow;
|
||||
CComPtr<IWinEventHandler> WndEvtHandler;
|
||||
REBARBANDINFOW rbi;
|
||||
HRESULT hRet;
|
||||
UINT uBand;
|
||||
|
||||
TRACE("(%p, %p)\n", this, punk);
|
||||
|
||||
if (punk == NULL || fRebarWindow == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
hRet = punk->QueryInterface(IID_IDeskBand, (PVOID *)&DeskBand);
|
||||
if (!SUCCEEDED(hRet) || DeskBand == NULL)
|
||||
goto Cleanup;
|
||||
hRet = punk->QueryInterface(IID_IObjectWithSite, (PVOID *)&ObjWithSite);
|
||||
if (!SUCCEEDED(hRet) || ObjWithSite == NULL)
|
||||
goto Cleanup;
|
||||
hRet = punk->QueryInterface(IID_IOleWindow, (PVOID *)&OleWindow);
|
||||
if (!SUCCEEDED(hRet) || OleWindow == NULL)
|
||||
goto Cleanup;
|
||||
hRet = punk->QueryInterface(IID_IWinEventHandler, (PVOID *)&WndEvtHandler);
|
||||
if (!SUCCEEDED(hRet) || WndEvtHandler == NULL)
|
||||
goto Cleanup;
|
||||
|
||||
hRet = S_OK;
|
||||
if (fBandsAllocated > fBandsCount)
|
||||
{
|
||||
/* Search for a free band object */
|
||||
for (i = 0; i < fBandsAllocated; i++)
|
||||
{
|
||||
if (fBands[i].DeskBand == NULL)
|
||||
{
|
||||
NewBand = &fBands[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (fBandsAllocated > 0)
|
||||
{
|
||||
ASSERT (fBands != NULL);
|
||||
|
||||
/* Reallocate the band object array */
|
||||
NewAllocated = fBandsAllocated + 8;
|
||||
if (NewAllocated > 0xFFFF)
|
||||
NewAllocated = 0xFFFF;
|
||||
if (NewAllocated == fBandsAllocated)
|
||||
{
|
||||
hRet = E_OUTOFMEMORY;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
|
||||
NewBand = reinterpret_cast<struct BandObject *>(CoTaskMemAlloc(NewAllocated * sizeof(struct BandObject)));
|
||||
if (NewBand == NULL)
|
||||
{
|
||||
hRet = E_OUTOFMEMORY;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Copy the old array */
|
||||
memcpy(NewBand, fBands, fBandsAllocated * sizeof(struct BandObject));
|
||||
|
||||
/* Initialize the added bands */
|
||||
memset(&NewBand[fBandsAllocated], 0, (NewAllocated - fBandsAllocated) * sizeof(struct BandObject));
|
||||
|
||||
NewBand = &fBands[fBandsAllocated];
|
||||
fBandsAllocated = NewAllocated;
|
||||
CoTaskMemFree(fBands);
|
||||
fBands = NewBand;
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(fBands == NULL);
|
||||
ASSERT(fBandsAllocated == 0);
|
||||
ASSERT(fBandsCount == 0);
|
||||
|
||||
/* Allocate new array */
|
||||
fBands = reinterpret_cast<struct BandObject *>(CoTaskMemAlloc(8 * sizeof(struct BandObject)));
|
||||
if (fBands == NULL)
|
||||
{
|
||||
hRet = E_OUTOFMEMORY;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Initialize the added bands */
|
||||
memset(fBands, 0, 8 * sizeof(struct BandObject));
|
||||
|
||||
fBandsAllocated += 8;
|
||||
NewBand = &fBands[0];
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hRet))
|
||||
{
|
||||
ASSERT(NewBand != NULL);
|
||||
|
||||
fBandsCount++;
|
||||
NewBand->DeskBand = DeskBand.Detach();
|
||||
NewBand->OleWindow = OleWindow.Detach();
|
||||
NewBand->WndEvtHandler = WndEvtHandler.Detach();
|
||||
|
||||
/* Create the ReBar band */
|
||||
hRet = ObjWithSite->SetSite((IOleWindow *)this);
|
||||
if (SUCCEEDED(hRet))
|
||||
{
|
||||
uBand = 0xffffffff;
|
||||
if (SUCCEEDED(UpdateSingleBand(NewBand)))
|
||||
{
|
||||
if (NewBand->dbi.dwMask & DBIM_MODEFLAGS)
|
||||
{
|
||||
if (NewBand->dbi.dwModeFlags & DBIMF_ADDTOFRONT)
|
||||
uBand = 0;
|
||||
}
|
||||
}
|
||||
|
||||
BuildRebarBandInfo(NewBand, &rbi);
|
||||
|
||||
if (SUCCEEDED(NewBand->OleWindow->GetWindow(&rbi.hwndChild)) &&
|
||||
rbi.hwndChild != NULL)
|
||||
{
|
||||
rbi.fMask |= RBBIM_CHILD;
|
||||
WARN ("ReBar band uses child window 0x%p\n", rbi.hwndChild);
|
||||
}
|
||||
|
||||
if (!SendMessageW(fRebarWindow, RB_INSERTBANDW, (WPARAM)uBand, (LPARAM)&rbi))
|
||||
return E_FAIL;
|
||||
|
||||
hRet = (HRESULT)((USHORT)GetBandID(NewBand));
|
||||
}
|
||||
else
|
||||
{
|
||||
WARN("IBandSite::AddBand(): Call to IDeskBand::SetSite() failed: %x\n", hRet);
|
||||
|
||||
/* Remove the band from the ReBar control */
|
||||
uBand = (UINT)SendMessageW(fRebarWindow, RB_IDTOINDEX, (WPARAM)rbi.wID, 0);
|
||||
if (uBand != (UINT)-1)
|
||||
{
|
||||
if (!SendMessageW(fRebarWindow, RB_DELETEBAND, (WPARAM)uBand, 0))
|
||||
{
|
||||
ERR("Failed to delete band!\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
ERR("Failed to map band id to index!\n");
|
||||
|
||||
FreeBand(NewBand);
|
||||
|
||||
hRet = E_FAIL;
|
||||
/* goto Cleanup; */
|
||||
}
|
||||
}
|
||||
Cleanup:
|
||||
return hRet;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::EnumBands(UINT uBand, DWORD *pdwBandID)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
TRACE("(%p, %u, %p)\n", this, uBand, pdwBandID);
|
||||
|
||||
if (uBand == 0xffffffff)
|
||||
return (UINT)fBandsCount;
|
||||
|
||||
if (uBand >= (UINT)fBandsCount)
|
||||
return E_FAIL;
|
||||
|
||||
for (i = 0; i < (DWORD)fBandsAllocated; i++)
|
||||
{
|
||||
if (fBands[i].DeskBand != NULL)
|
||||
{
|
||||
if (uBand == 0)
|
||||
{
|
||||
*pdwBandID = i;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
uBand--;
|
||||
}
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName)
|
||||
{
|
||||
struct BandObject *Band;
|
||||
|
||||
TRACE("(%p, %u, %p, %p, %p, %d)\n", this, dwBandID, ppstb, pdwState, pszName, cchName);
|
||||
|
||||
Band = GetBandByID(dwBandID);
|
||||
if (Band == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
if (ppstb != NULL)
|
||||
{
|
||||
Band->DeskBand->AddRef();
|
||||
*ppstb = Band->DeskBand;
|
||||
}
|
||||
|
||||
if (pdwState != NULL)
|
||||
{
|
||||
FIXME("IBandSite::QueryBand() requests band state!\n");
|
||||
*pdwState = 0;
|
||||
}
|
||||
|
||||
if (pszName != NULL && cchName > 0)
|
||||
{
|
||||
FIXME("IBandSite::QueryBand() requests band name!\n");
|
||||
pszName[0] = 0;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState)
|
||||
{
|
||||
struct BandObject *Band;
|
||||
|
||||
TRACE("(%p, %u, %x, %x)\n", this, dwBandID, dwMask, dwState);
|
||||
|
||||
Band = GetBandByID(dwBandID);
|
||||
if (Band == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
FIXME("Stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::RemoveBand(DWORD dwBandID)
|
||||
{
|
||||
struct BandObject *Band;
|
||||
UINT uBand;
|
||||
|
||||
TRACE("(%p, %u)\n", this, dwBandID);
|
||||
|
||||
if (fRebarWindow == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
Band = GetBandByID(dwBandID);
|
||||
if (Band == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
uBand = (UINT)SendMessageW(fRebarWindow, RB_IDTOINDEX, (WPARAM)GetBandID(Band), 0);
|
||||
if (uBand != (UINT)-1)
|
||||
{
|
||||
if (!SendMessageW(fRebarWindow, RB_DELETEBAND, (WPARAM)uBand, 0))
|
||||
{
|
||||
ERR("Could not delete band!\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
ERR("Could not map band id to index!\n");
|
||||
|
||||
FreeBand(Band);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::GetBandObject(DWORD dwBandID, REFIID riid, VOID **ppv)
|
||||
{
|
||||
struct BandObject *Band;
|
||||
|
||||
TRACE("(%p, %u, %s, %p)\n", this, dwBandID, debugstr_guid(&riid), ppv);
|
||||
|
||||
Band = GetBandByID(dwBandID);
|
||||
if (Band == NULL)
|
||||
{
|
||||
*ppv = NULL;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return Band->DeskBand->QueryInterface(riid, ppv);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::SetBandSiteInfo(const BANDSITEINFO *pbsinfo)
|
||||
{
|
||||
FIXME("(%p, %p)\n", this, pbsinfo);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::GetBandSiteInfo(BANDSITEINFO *pbsinfo)
|
||||
{
|
||||
FIXME("(%p, %p)\n", this, pbsinfo);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plrResult)
|
||||
{
|
||||
struct BandObject *Band;
|
||||
|
||||
TRACE("(%p, %p, %u, %p, %p, %p)\n", this, hWnd, uMsg, wParam, lParam, plrResult);
|
||||
|
||||
*plrResult = 0;
|
||||
if (fRebarWindow == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
if (hWnd == fRebarWindow)
|
||||
{
|
||||
/* FIXME: Just send the message? */
|
||||
*plrResult = SendMessageW(hWnd, uMsg, wParam, lParam);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
Band = GetBandFromHwnd(hWnd);
|
||||
if (Band != NULL)
|
||||
{
|
||||
return Band->WndEvtHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, plrResult);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::IsWindowOwner(HWND hWnd)
|
||||
{
|
||||
struct BandObject *Band;
|
||||
|
||||
TRACE("(%p, %p)\n", this, hWnd);
|
||||
|
||||
if (fRebarWindow == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
Band = GetBandFromHwnd(hWnd);
|
||||
if (Band != NULL)
|
||||
return S_OK;
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::GetWindow(HWND *phWnd)
|
||||
{
|
||||
TRACE("(%p, %p)\n", this, phWnd);
|
||||
|
||||
*phWnd = fRebarWindow;
|
||||
if (fRebarWindow != NULL)
|
||||
return S_OK;
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::ContextSensitiveHelp(BOOL fEnterMode)
|
||||
{
|
||||
FIXME("(%p, %d)\n", this, fEnterMode);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::SetDeskBarSite(IUnknown *pUnk)
|
||||
{
|
||||
HWND hWndParent;
|
||||
HRESULT hRet;
|
||||
|
||||
TRACE("(%p, %p)\n", this, pUnk);
|
||||
|
||||
fOleWindow.Release();
|
||||
|
||||
hRet = pUnk->QueryInterface(IID_IOleWindow, (PVOID *)&fOleWindow);
|
||||
if (!SUCCEEDED(hRet))
|
||||
return E_FAIL;
|
||||
|
||||
hRet = fOleWindow->GetWindow(&hWndParent);
|
||||
if (!SUCCEEDED(hRet))
|
||||
return E_FAIL;
|
||||
|
||||
fRebarWindow = CreateWindowExW(WS_EX_TOOLWINDOW,
|
||||
REBARCLASSNAMEW,
|
||||
NULL,
|
||||
WS_CHILD | WS_CLIPSIBLINGS |
|
||||
WS_CLIPCHILDREN | RBS_VARHEIGHT |
|
||||
RBS_BANDBORDERS | CCS_NODIVIDER |
|
||||
CCS_NORESIZE | CCS_NOPARENTALIGN,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
hWndParent,
|
||||
NULL,
|
||||
_AtlBaseModule.GetModuleInstance(),
|
||||
NULL);
|
||||
if (fRebarWindow == NULL)
|
||||
{
|
||||
fOleWindow.Release();
|
||||
WARN("IDeskbarClient::SetDeskBarSite() failed to create ReBar control!\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::SetModeDBC(DWORD dwMode)
|
||||
{
|
||||
LONG dwStyle;
|
||||
LONG dwPrevStyle;
|
||||
|
||||
TRACE("(%p, %x)\n", this, dwMode);
|
||||
|
||||
if (fRebarWindow == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
dwStyle = dwPrevStyle = GetWindowLongPtr(fRebarWindow, GWL_STYLE);
|
||||
if (dwMode & DBIF_VIEWMODE_VERTICAL)
|
||||
dwStyle |= CCS_VERT;
|
||||
|
||||
if (dwMode & ~DBIF_VIEWMODE_VERTICAL)
|
||||
FIXME("IDeskBarClient::SetModeDBC() unhandled modes: %x\n", dwStyle & ~DBIF_VIEWMODE_VERTICAL);
|
||||
|
||||
if (dwStyle != dwPrevStyle)
|
||||
{
|
||||
SetWindowLongPtr(fRebarWindow, GWL_STYLE, dwPrevStyle);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::UIActivateDBC(DWORD dwState)
|
||||
{
|
||||
TRACE("(%p, %x)\n", this, dwState);
|
||||
|
||||
if (fRebarWindow == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
ShowWindow(fRebarWindow, (dwState & DBC_SHOW) ? SW_SHOW : SW_HIDE);
|
||||
FIXME("IDeskBarClient::UIActivateDBC() Properly notify bands?\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::GetSize(DWORD unknown1, LPRECT unknown2)
|
||||
{
|
||||
FIXME("(%p, %x, %p)\n", this, unknown1, unknown2);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::QueryStatus(const GUID *pguidCmdGroup, DWORD cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
|
||||
{
|
||||
FIXME("(%p, %p, %u, %p, %p)\n", this, pguidCmdGroup, cCmds, prgCmds, pCmdText);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdExecOpt, VARIANTARG *pvaIn, VARIANTARG *pvaOut)
|
||||
{
|
||||
HRESULT hRet = S_OK;
|
||||
|
||||
TRACE("(%p, %p, %u, %u, %p, %p)\n", this, pguidCmdGroup, nCmdID, nCmdExecOpt, pvaIn, pvaOut);
|
||||
|
||||
if (fRebarWindow == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
if (IsEqualIID(pguidCmdGroup, IID_IDeskBand))
|
||||
{
|
||||
switch (nCmdID)
|
||||
{
|
||||
case DBID_BANDINFOCHANGED:
|
||||
if (pvaIn == NULL)
|
||||
hRet = UpdateAllBands();
|
||||
else
|
||||
{
|
||||
/* Update a single band */
|
||||
if (pvaIn->n1.n2.vt == VT_I4)
|
||||
hRet = UpdateBand(pvaIn->n1.n2.n3.lVal);
|
||||
else
|
||||
hRet = E_FAIL;
|
||||
}
|
||||
break;
|
||||
|
||||
case DBID_SHOWONLY:
|
||||
case DBID_MAXIMIZEBAND:
|
||||
case DBID_PUSHCHEVRON:
|
||||
FIXME("IOleCommandTarget::Exec(): Unsupported command ID %d\n", nCmdID);
|
||||
return E_NOTIMPL;
|
||||
default:
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
else
|
||||
WARN("IOleCommandTarget::Exec(): Unsupported command group GUID\n");
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::UIActivateIO(BOOL fActivate, LPMSG lpMsg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::HasFocusIO()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::TranslateAcceleratorIO(LPMSG lpMsg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::OnFocusChangeIS(struct IUnknown *paramC, int param10)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::GetClassID(CLSID *pClassID)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::IsDirty()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::Load(IStream *pStm)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::Save(IStream *pStm, BOOL fClearDirty)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::GetSizeMax(ULARGE_INTEGER *pcbSize)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::DragLeave()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::LoadFromStreamBS(IStream *, const GUID &, void **)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteBase::SaveToStreamBS(IUnknown *, IStream *)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
154
reactos/dll/win32/browseui/bandsite.h
Normal file
154
reactos/dll/win32/browseui/bandsite.h
Normal file
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
* Rebar band site
|
||||
*
|
||||
* Copyright 2007 Hervé Poussineau
|
||||
* Copyright 2009 Andrew Hill
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _bandsite_h
|
||||
#define _bandsite_h
|
||||
|
||||
class CBandSiteBase :
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IBandSite,
|
||||
public IWinEventHandler,
|
||||
public IDeskBarClient,
|
||||
public IOleCommandTarget,
|
||||
public IInputObject,
|
||||
public IInputObjectSite,
|
||||
public IServiceProvider,
|
||||
public IPersistStream,
|
||||
public IDropTarget,
|
||||
public IBandSiteHelper
|
||||
{
|
||||
private:
|
||||
struct BandObject
|
||||
{
|
||||
IDeskBand *DeskBand;
|
||||
IOleWindow *OleWindow;
|
||||
IWinEventHandler *WndEvtHandler;
|
||||
DESKBANDINFO dbi;
|
||||
};
|
||||
|
||||
LONG fBandsCount;
|
||||
LONG fBandsAllocated;
|
||||
struct BandObject *fBands;
|
||||
HWND fRebarWindow;
|
||||
CComPtr<IOleWindow> fOleWindow;
|
||||
public:
|
||||
CBandSiteBase();
|
||||
~CBandSiteBase();
|
||||
|
||||
// *** IBandSite methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk);
|
||||
virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID);
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState);
|
||||
virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, void **ppv);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo);
|
||||
|
||||
// *** IWinEventHandler methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult);
|
||||
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd);
|
||||
|
||||
// *** IOleWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
|
||||
|
||||
// *** IDeskBarClient methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetDeskBarSite(IUnknown *punkSite);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetModeDBC(DWORD dwMode);
|
||||
virtual HRESULT STDMETHODCALLTYPE UIActivateDBC(DWORD dwState);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSize(DWORD dwWhich, LPRECT prc);
|
||||
|
||||
// *** IOleCommandTarget methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
|
||||
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
|
||||
|
||||
// *** IInputObject methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg);
|
||||
virtual HRESULT STDMETHODCALLTYPE HasFocusIO();
|
||||
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg);
|
||||
|
||||
// *** IInputObjectSite methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(struct IUnknown *paramC, int param10);
|
||||
|
||||
// *** IServiceProvider methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
|
||||
|
||||
// *** IPersist methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
|
||||
|
||||
// *** IPersistStream methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE IsDirty();
|
||||
virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm);
|
||||
virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
|
||||
|
||||
// *** IDropTarget methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
|
||||
virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
|
||||
virtual HRESULT STDMETHODCALLTYPE DragLeave();
|
||||
virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
|
||||
|
||||
// *** IBandSiteHelper methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE LoadFromStreamBS(IStream *, const GUID &, void **);
|
||||
virtual HRESULT STDMETHODCALLTYPE SaveToStreamBS(IUnknown *, IStream *);
|
||||
|
||||
private:
|
||||
UINT GetBandID(struct BandObject *Band);
|
||||
struct BandObject *GetBandByID(DWORD dwBandID);
|
||||
void FreeBand(struct BandObject *Band);
|
||||
DWORD GetBandSiteViewMode();
|
||||
VOID BuildRebarBandInfo(struct BandObject *Band, REBARBANDINFOW *prbi);
|
||||
HRESULT UpdateSingleBand(struct BandObject *Band);
|
||||
HRESULT UpdateAllBands();
|
||||
HRESULT UpdateBand(DWORD dwBandID);
|
||||
struct BandObject *GetBandFromHwnd(HWND hwnd);
|
||||
|
||||
BEGIN_COM_MAP(CBandSiteBase)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IBandSite, IBandSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDeskBarClient, IDeskBarClient)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDropTarget, IDropTarget)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IBandSiteHelper, IBandSiteHelper)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
class CBandSite :
|
||||
public CComCoClass<CBandSite, &CLSID_RebarBandSite>,
|
||||
public CBandSiteBase
|
||||
{
|
||||
public:
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_BANDSITE)
|
||||
DECLARE_NOT_AGGREGATABLE(CBandSite)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
};
|
||||
|
||||
#endif // _bandsite_h
|
|
@ -1,132 +0,0 @@
|
|||
/*
|
||||
* Band site menu
|
||||
*
|
||||
* Copyright 2007 Hervé Poussineua
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "objbase.h"
|
||||
|
||||
#include "shlobj.h"
|
||||
#include "shobjidl.h"
|
||||
#include "todo.h"
|
||||
|
||||
#include "browseui.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(browseui);
|
||||
|
||||
typedef struct _tagBandSiteMenu {
|
||||
const IShellServiceVtbl *vtbl;
|
||||
LONG refCount;
|
||||
} BandSiteMenu;
|
||||
|
||||
static const IShellServiceVtbl BandSiteMenuVtbl;
|
||||
|
||||
static inline BandSiteMenu *impl_from_IShellService(IShellService *iface)
|
||||
{
|
||||
return (BandSiteMenu *)((char *)iface - FIELD_OFFSET(BandSiteMenu, vtbl));
|
||||
}
|
||||
|
||||
HRESULT WINAPI BandSiteMenu_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
|
||||
{
|
||||
BandSiteMenu *This;
|
||||
|
||||
if (pUnkOuter)
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
|
||||
This = CoTaskMemAlloc(sizeof(BandSiteMenu));
|
||||
if (This == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
ZeroMemory(This, sizeof(*This));
|
||||
This->vtbl = &BandSiteMenuVtbl;
|
||||
This->refCount = 1;
|
||||
|
||||
TRACE("returning %p\n", This);
|
||||
*ppOut = (IUnknown *)This;
|
||||
BROWSEUI_refCount++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void WINAPI BandSiteMenu_Destructor(BandSiteMenu *This)
|
||||
{
|
||||
TRACE("destroying %p\n", This);
|
||||
CoTaskMemFree(This);
|
||||
BROWSEUI_refCount--;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BandSiteMenu_QueryInterface(IShellService *iface, REFIID iid, LPVOID *ppvOut)
|
||||
{
|
||||
BandSiteMenu *This = impl_from_IShellService(iface);
|
||||
*ppvOut = NULL;
|
||||
|
||||
TRACE("(%p, %s, %p)\n", iface, debugstr_guid(iid), ppvOut);
|
||||
|
||||
if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IShellService))
|
||||
{
|
||||
*ppvOut = &This->vtbl;
|
||||
}
|
||||
|
||||
if (*ppvOut)
|
||||
{
|
||||
IUnknown_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("unsupported interface: %s\n", debugstr_guid(iid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI BandSiteMenu_AddRef(IShellService *iface)
|
||||
{
|
||||
BandSiteMenu *This = impl_from_IShellService(iface);
|
||||
TRACE("(%p)\n", iface);
|
||||
return InterlockedIncrement(&This->refCount);
|
||||
}
|
||||
|
||||
static ULONG WINAPI BandSiteMenu_Release(IShellService *iface)
|
||||
{
|
||||
BandSiteMenu *This = impl_from_IShellService(iface);
|
||||
ULONG ret;
|
||||
|
||||
TRACE("(%p)\n", iface);
|
||||
|
||||
ret = InterlockedDecrement(&This->refCount);
|
||||
if (ret == 0)
|
||||
BandSiteMenu_Destructor(This);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BandSiteMenu_SetOwner(IShellService *iface, IUnknown *pOwner)
|
||||
{
|
||||
FIXME("(%p, %p)\n", iface, pOwner);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IShellServiceVtbl BandSiteMenuVtbl =
|
||||
{
|
||||
BandSiteMenu_QueryInterface,
|
||||
BandSiteMenu_AddRef,
|
||||
BandSiteMenu_Release,
|
||||
|
||||
BandSiteMenu_SetOwner,
|
||||
};
|
73
reactos/dll/win32/browseui/bandsitemenu.cpp
Normal file
73
reactos/dll/win32/browseui/bandsitemenu.cpp
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Band site menu
|
||||
*
|
||||
* Copyright 2007 Hervé Poussineua
|
||||
* Copyright 2009 Andrew Hill
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "resource.h"
|
||||
#include "bandsitemenu.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(browseui);
|
||||
|
||||
CBandSiteMenu::CBandSiteMenu()
|
||||
{
|
||||
}
|
||||
|
||||
CBandSiteMenu::~CBandSiteMenu()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteMenu::SetOwner(IUnknown *pOwner)
|
||||
{
|
||||
FIXME("(%p, %p)\n", this, pOwner);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteMenu::QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
|
||||
{
|
||||
FIXME("(%p, %p, %p, %p, %p, %p)\n", this, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpici)
|
||||
{
|
||||
FIXME("(%p, %p)\n", this, lpici);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteMenu::GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax)
|
||||
{
|
||||
FIXME("(%p, %p, %p, %p, %p, %p)\n", this, idCmd, uType, pwReserved, pszName, cchMax);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBandSiteMenu::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
FIXME("(%p, %p)\n", this, uMsg, wParam, lParam);
|
||||
return E_NOTIMPL;
|
||||
}
|
60
reactos/dll/win32/browseui/bandsitemenu.h
Normal file
60
reactos/dll/win32/browseui/bandsitemenu.h
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Band site menu
|
||||
*
|
||||
* Copyright 2007 Hervé Poussineua
|
||||
* Copyright 2009 Andrew Hill
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _bandsitemenu_h
|
||||
#define _bandsitemenu_h
|
||||
|
||||
// oddly, this class also responds to QueryInterface for CLSID_BandSiteMenu by returning the vtable at offset 0
|
||||
class CBandSiteMenu :
|
||||
public CComCoClass<CBandSiteMenu, &CLSID_BandSiteMenu>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IShellService,
|
||||
public IContextMenu2
|
||||
{
|
||||
public:
|
||||
CBandSiteMenu();
|
||||
~CBandSiteMenu();
|
||||
|
||||
// *** IShellService methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetOwner(IUnknown *);
|
||||
|
||||
// *** IContextMenu methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
|
||||
virtual HRESULT STDMETHODCALLTYPE InvokeCommand(LPCMINVOKECOMMANDINFO lpici);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax);
|
||||
|
||||
// *** IContextMenu2 methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_BANDSITEMENU)
|
||||
DECLARE_NOT_AGGREGATABLE(CBandSiteMenu)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(CBandSiteMenu)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IShellService, IShellService)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
|
||||
END_COM_MAP()
|
||||
|
||||
};
|
||||
|
||||
#endif // _bandsitemenu_h
|
549
reactos/dll/win32/browseui/basebar.cpp
Normal file
549
reactos/dll/win32/browseui/basebar.cpp
Normal file
|
@ -0,0 +1,549 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
This class knows how to contain base bar site in a cabinet window.
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
|
||||
/*
|
||||
Base bar that contains a vertical or horizontal explorer band. It also
|
||||
provides resizing abilities.
|
||||
*/
|
||||
/*
|
||||
TODO:
|
||||
**Make base bar support resizing
|
||||
Add context menu for base bar
|
||||
Fix base bar to correctly initialize fVertical field
|
||||
Fix base bar to correctly reposition its base bar site when resized
|
||||
|
||||
*/
|
||||
|
||||
class CBaseBar :
|
||||
public CWindowImpl<CBaseBar, CWindow, CControlWinTraits>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IInputObjectSite,
|
||||
public IOleCommandTarget,
|
||||
public IServiceProvider,
|
||||
public IInputObject,
|
||||
public IDeskBar,
|
||||
public IDockingWindow,
|
||||
public IPersistStream,
|
||||
public IPersistStreamInit,
|
||||
public IPersistPropertyBag,
|
||||
public IObjectWithSite
|
||||
{
|
||||
public:
|
||||
CComPtr<IUnknown> fSite;
|
||||
CComPtr<IUnknown> fClient;
|
||||
HWND fClientWindow;
|
||||
bool fVertical;
|
||||
bool fVisible;
|
||||
int fNeededSize; // width or height
|
||||
|
||||
// used by resize tracking loop
|
||||
bool fTracking;
|
||||
POINT fLastLocation;
|
||||
public:
|
||||
CBaseBar();
|
||||
~CBaseBar();
|
||||
public:
|
||||
HRESULT ReserveBorderSpace();
|
||||
|
||||
// *** IOleWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
|
||||
|
||||
// *** IInputObjectSite specific methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS (IUnknown *punkObj, BOOL fSetFocus);
|
||||
|
||||
// *** IOleCommandTarget specific methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
|
||||
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
|
||||
|
||||
// *** IServiceProvider methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
|
||||
|
||||
// *** IInputObject methods ***
|
||||
// forward the methods to the contained active bar
|
||||
virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg);
|
||||
virtual HRESULT STDMETHODCALLTYPE HasFocusIO();
|
||||
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg);
|
||||
|
||||
// *** IDeskBar methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetClient(IUnknown *punkClient);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetClient(IUnknown **ppunkClient);
|
||||
virtual HRESULT STDMETHODCALLTYPE OnPosRectChangeDB(LPRECT prc);
|
||||
|
||||
// *** IDockingWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow);
|
||||
virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved);
|
||||
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved);
|
||||
|
||||
// *** IObjectWithSite methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite);
|
||||
|
||||
// *** IPersist methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
|
||||
|
||||
// *** IPersistStream methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE IsDirty();
|
||||
virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm);
|
||||
virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
|
||||
|
||||
// *** IPersistStreamInit methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE InitNew();
|
||||
|
||||
// *** IPersistPropertyBag methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog);
|
||||
virtual HRESULT STDMETHODCALLTYPE Save(IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties);
|
||||
|
||||
// message handlers
|
||||
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnSetCursor(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnCancelMode(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnCaptureChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
|
||||
DECLARE_WND_CLASS_EX(_T("BaseBar"), 0, COLOR_3DFACE)
|
||||
|
||||
BEGIN_MSG_MAP(CBaseBar)
|
||||
MESSAGE_HANDLER(WM_SIZE, OnSize)
|
||||
MESSAGE_HANDLER(WM_SETCURSOR, OnSetCursor)
|
||||
MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
|
||||
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
|
||||
MESSAGE_HANDLER(WM_LBUTTONUP, OnLButtonUp)
|
||||
MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
|
||||
MESSAGE_HANDLER(WM_CANCELMODE, OnCancelMode)
|
||||
MESSAGE_HANDLER(WM_CAPTURECHANGED, OnCaptureChanged)
|
||||
END_MSG_MAP()
|
||||
|
||||
BEGIN_COM_MAP(CBaseBar)
|
||||
COM_INTERFACE_ENTRY2_IID(IID_IOleWindow, IOleWindow, IDockingWindow)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDeskBar, IDeskBar)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDockingWindow, IDockingWindow)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
|
||||
COM_INTERFACE_ENTRY2_IID(IID_IPersist, IPersist, IPersistStream)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersistStreamInit, IPersistStreamInit)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersistPropertyBag, IPersistPropertyBag)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
CBaseBar::CBaseBar()
|
||||
{
|
||||
fClientWindow = NULL;
|
||||
fVertical = true;
|
||||
fVisible = false;
|
||||
fNeededSize = 200;
|
||||
fTracking = false;
|
||||
}
|
||||
|
||||
CBaseBar::~CBaseBar()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBaseBar::ReserveBorderSpace()
|
||||
{
|
||||
CComPtr<IDockingWindowSite> dockingWindowSite;
|
||||
RECT availableBorderSpace;
|
||||
RECT neededBorderSpace;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = fSite->QueryInterface(IID_IDockingWindowSite, (void **)&dockingWindowSite);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = dockingWindowSite->GetBorderDW((IDeskBar *)this, &availableBorderSpace);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
memset(&neededBorderSpace, 0, sizeof(neededBorderSpace));
|
||||
if (fVisible)
|
||||
{
|
||||
if (fVertical)
|
||||
neededBorderSpace.left = fNeededSize + GetSystemMetrics(SM_CXFRAME);
|
||||
else
|
||||
neededBorderSpace.bottom = fNeededSize + GetSystemMetrics(SM_CXFRAME);
|
||||
}
|
||||
hResult = dockingWindowSite->SetBorderSpaceDW((IDeskBar *)this, &neededBorderSpace);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// current bar size is stored in the registry under
|
||||
// key=HKCU\Software\Microsoft\Internet Explorer\Explorer Bars
|
||||
// value=current bar GUID
|
||||
// result is 8 bytes of binary data, 2 longs. First is the size, second is reserved and will always be 0
|
||||
/*HRESULT CBaseBar::StopCurrentBar()
|
||||
{
|
||||
CComPtr<IOleCommandTarget> commandTarget;
|
||||
HRESULT hResult;
|
||||
|
||||
if (fCurrentBar.p != NULL)
|
||||
{
|
||||
hResult = fCurrentBar->QueryInterface(IID_IOleCommandTarget, (void **)&commandTarget);
|
||||
hResult = commandTarget->Exec(NULL, 0x17, 0, NULL, NULL);
|
||||
}
|
||||
// hide the current bar
|
||||
memcpy(&fCurrentActiveClass, &GUID_NULL, sizeof(fCurrentActiveClass));
|
||||
return S_OK;
|
||||
}*/
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::GetWindow(HWND *lphwnd)
|
||||
{
|
||||
if (lphwnd == NULL)
|
||||
return E_POINTER;
|
||||
*lphwnd = m_hWnd;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::ContextSensitiveHelp(BOOL fEnterMode)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::OnFocusChangeIS (IUnknown *punkObj, BOOL fSetFocus)
|
||||
{
|
||||
// forward to owner
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
|
||||
{
|
||||
if (IsEqualIID(*pguidCmdGroup, CGID_Explorer))
|
||||
{
|
||||
}
|
||||
else if (IsEqualIID(*pguidCmdGroup, IID_IDeskBarClient))
|
||||
{
|
||||
switch (nCmdID)
|
||||
{
|
||||
case 0:
|
||||
// hide current band
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
|
||||
{
|
||||
CComPtr<IServiceProvider> serviceProvider;
|
||||
HRESULT hResult;
|
||||
|
||||
if (fSite == NULL)
|
||||
return E_FAIL;
|
||||
hResult = fSite->QueryInterface(IID_IServiceProvider, (void **)&serviceProvider);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
// called for SID_STopLevelBrowser, IID_IBrowserService to find top level browser
|
||||
// called for SID_IWebBrowserApp, IID_IConnectionPointContainer
|
||||
// connection point called for DIID_DWebBrowserEvents2 to establish connection
|
||||
return serviceProvider->QueryService(guidService, riid, ppvObject);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::UIActivateIO(BOOL fActivate, LPMSG lpMsg)
|
||||
{
|
||||
// forward to contained bar
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::HasFocusIO()
|
||||
{
|
||||
// forward to contained bar
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::TranslateAcceleratorIO(LPMSG lpMsg)
|
||||
{
|
||||
// forward to contained bar
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::SetClient(IUnknown *punkClient)
|
||||
{
|
||||
CComPtr<IOleWindow> oleWindow;
|
||||
HWND ownerWindow;
|
||||
HRESULT hResult;
|
||||
|
||||
if (punkClient == NULL)
|
||||
fClient.Release();
|
||||
else
|
||||
{
|
||||
hResult = punkClient->QueryInterface(IID_IUnknown, (void **)&fClient);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = fSite->QueryInterface(IID_IOleWindow, (void **)&oleWindow);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = oleWindow->GetWindow(&ownerWindow);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
Create(ownerWindow, 0, NULL, WS_VISIBLE | WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, WS_EX_TOOLWINDOW);
|
||||
ReserveBorderSpace();
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::GetClient(IUnknown **ppunkClient)
|
||||
{
|
||||
if (ppunkClient == NULL)
|
||||
return E_POINTER;
|
||||
*ppunkClient = fClient;
|
||||
if (fClient.p != NULL)
|
||||
fClient.p->AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::OnPosRectChangeDB(LPRECT prc)
|
||||
{
|
||||
if (prc == NULL)
|
||||
return E_POINTER;
|
||||
if (fVertical)
|
||||
fNeededSize = prc->right - prc->left;
|
||||
else
|
||||
fNeededSize = prc->bottom - prc->top;
|
||||
ReserveBorderSpace();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::ShowDW(BOOL fShow)
|
||||
{
|
||||
fVisible = fShow ? true : false;
|
||||
ReserveBorderSpace();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::CloseDW(DWORD dwReserved)
|
||||
{
|
||||
fVisible = false;
|
||||
ReserveBorderSpace();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
|
||||
{
|
||||
ReserveBorderSpace();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::SetSite(IUnknown *pUnkSite)
|
||||
{
|
||||
fSite = pUnkSite;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::GetSite(REFIID riid, void **ppvSite)
|
||||
{
|
||||
if (ppvSite == NULL)
|
||||
return E_POINTER;
|
||||
*ppvSite = fSite;
|
||||
if (fSite.p != NULL)
|
||||
fSite.p->AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::GetClassID(CLSID *pClassID)
|
||||
{
|
||||
if (pClassID == NULL)
|
||||
return E_POINTER;
|
||||
// TODO: what class to return here?
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::IsDirty()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::Load(IStream *pStm)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::Save(IStream *pStm, BOOL fClearDirty)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::GetSizeMax(ULARGE_INTEGER *pcbSize)
|
||||
{
|
||||
if (pcbSize == NULL)
|
||||
return E_POINTER;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::InitNew()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBar::Save(IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
LRESULT CBaseBar::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
/* CComPtr<IOleWindow> oleWindow;
|
||||
RECT clientRect;
|
||||
HRESULT hResult;
|
||||
|
||||
if (fClientWindow == NULL && fClient.p != NULL)
|
||||
{
|
||||
hResult = fClient->QueryInterface(IID_IOleWindow, (void **)&oleWindow);
|
||||
hResult = oleWindow->GetWindow(&fClientWindow);
|
||||
}
|
||||
if (fClientWindow != NULL)
|
||||
{
|
||||
GetClientRect(&clientRect);
|
||||
::SetWindowPos(fClientWindow, NULL, clientRect.left, clientRect.top, clientRect.right - clientRect.left - GetSystemMetrics(SM_CXFRAME),
|
||||
clientRect.bottom - clientRect.top, SWP_NOOWNERZORDER | SWP_NOZORDER);
|
||||
}*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CBaseBar::OnSetCursor(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
if ((short)lParam != HTCLIENT || (HWND)wParam != m_hWnd)
|
||||
{
|
||||
bHandled = FALSE;
|
||||
return 0;
|
||||
}
|
||||
if (fVertical)
|
||||
SetCursor(LoadCursor(NULL, IDC_SIZEWE));
|
||||
else
|
||||
SetCursor(LoadCursor(NULL, IDC_SIZENS));
|
||||
return 1;
|
||||
}
|
||||
|
||||
LRESULT CBaseBar::OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
CComPtr<IWinEventHandler> winEventHandler;
|
||||
LRESULT result;
|
||||
HRESULT hResult;
|
||||
|
||||
result = 0;
|
||||
if (fClient.p != NULL)
|
||||
{
|
||||
hResult = fClient->QueryInterface(IID_IWinEventHandler, (void **)&winEventHandler);
|
||||
if (SUCCEEDED(hResult) && winEventHandler.p != NULL)
|
||||
hResult = winEventHandler->OnWinEvent(NULL, uMsg, wParam, lParam, &result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
LRESULT CBaseBar::OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
SetCapture();
|
||||
fTracking = true;
|
||||
fLastLocation.x = (short)LOWORD(lParam);
|
||||
fLastLocation.y = (short)HIWORD(lParam);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CBaseBar::OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
ReleaseCapture();
|
||||
fTracking = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CBaseBar::OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
POINT newLocation;
|
||||
int delta;
|
||||
|
||||
if (fTracking)
|
||||
{
|
||||
newLocation.x = (short)LOWORD(lParam);
|
||||
newLocation.y = (short)HIWORD(lParam);
|
||||
if (fVertical)
|
||||
delta = newLocation.x - fLastLocation.x;
|
||||
else
|
||||
delta = newLocation.y - fLastLocation.y;
|
||||
|
||||
|
||||
fLastLocation = newLocation;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CBaseBar::OnCancelMode(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
fTracking = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CBaseBar::OnCaptureChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
fTracking = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT CreateBaseBar(REFIID riid, void **ppv)
|
||||
{
|
||||
CComObject<CBaseBar> *theBaseBar;
|
||||
HRESULT hResult;
|
||||
|
||||
if (ppv == NULL)
|
||||
return E_POINTER;
|
||||
*ppv = NULL;
|
||||
ATLTRY (theBaseBar = new CComObject<CBaseBar>);
|
||||
if (theBaseBar == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
hResult = theBaseBar->QueryInterface (riid, (void **)ppv);
|
||||
if (FAILED (hResult))
|
||||
{
|
||||
delete theBaseBar;
|
||||
return hResult;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
485
reactos/dll/win32/browseui/basebarsite.cpp
Normal file
485
reactos/dll/win32/browseui/basebarsite.cpp
Normal file
|
@ -0,0 +1,485 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
Base bar that contains a vertical or horizontal explorer band. It also
|
||||
provides resizing abilities.
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
|
||||
/*
|
||||
TODO:
|
||||
****Fix so an already created bar will be detected and just shown instead of added again
|
||||
****When a new bar is added, initiate a resize
|
||||
**Add owner draw for base bar
|
||||
**Make label text in base bar always draw in black
|
||||
**Make base bar show close box
|
||||
**Create close toolbar button
|
||||
**Fix to delete all CBarInfo on deletion
|
||||
|
||||
*/
|
||||
|
||||
class CBaseBarSite :
|
||||
public CWindowImpl<CBaseBarSite, CWindow, CControlWinTraits>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
// public IDockingWindowSite,
|
||||
public IInputObject,
|
||||
public IServiceProvider,
|
||||
public IWinEventHandler,
|
||||
public IInputObjectSite,
|
||||
public IDeskBarClient,
|
||||
public IOleCommandTarget,
|
||||
public IBandSite,
|
||||
// public IBandSiteHelper,
|
||||
// public IExplorerToolbar,
|
||||
public IPersistStream
|
||||
{
|
||||
private:
|
||||
class CBarInfo
|
||||
{
|
||||
public:
|
||||
CComPtr<IUnknown> fTheBar;
|
||||
CLSID fBarClass; // class of active bar
|
||||
DWORD fBandID;
|
||||
|
||||
};
|
||||
CBarInfo *fCurrentActiveBar; //
|
||||
// HWND fRebarWindow; // rebar for top of window
|
||||
CComPtr<IUnknown> fDeskBarSite;
|
||||
DWORD fNextBandID;
|
||||
public:
|
||||
CBaseBarSite();
|
||||
~CBaseBarSite();
|
||||
private:
|
||||
HRESULT InsertBar(IUnknown *newBar);
|
||||
|
||||
// *** IOleWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
|
||||
|
||||
// *** IInputObject methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg);
|
||||
virtual HRESULT STDMETHODCALLTYPE HasFocusIO();
|
||||
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg);
|
||||
|
||||
// *** IServiceProvider methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
|
||||
|
||||
// *** IWinEventHandler methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult);
|
||||
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd);
|
||||
|
||||
// *** IInputObjectSite specific methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS (IUnknown *punkObj, BOOL fSetFocus);
|
||||
|
||||
// *** IDeskBarClient methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetDeskBarSite(IUnknown *punkSite);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetModeDBC(DWORD dwMode);
|
||||
virtual HRESULT STDMETHODCALLTYPE UIActivateDBC(DWORD dwState);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSize(DWORD dwWhich, LPRECT prc);
|
||||
|
||||
// *** IOleCommandTarget methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
|
||||
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
|
||||
|
||||
// *** IBandSite specific methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk);
|
||||
virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID);
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState);
|
||||
virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, void **ppv);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo);
|
||||
|
||||
// *** IPersist methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
|
||||
|
||||
// *** IPersistStream methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE IsDirty();
|
||||
virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm);
|
||||
virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
|
||||
|
||||
// message handlers
|
||||
LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
|
||||
BEGIN_MSG_MAP(CBaseBarSite)
|
||||
MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
|
||||
END_MSG_MAP()
|
||||
|
||||
BEGIN_COM_MAP(CBaseBarSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow)
|
||||
// COM_INTERFACE_ENTRY_IID(IID_IDockingWindowSite, IDockingWindowSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDeskBarClient, IDeskBarClient)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IBandSite, IBandSite)
|
||||
// COM_INTERFACE_ENTRY_IID(IID_IBandSiteHelper, IBandSiteHelper)
|
||||
// COM_INTERFACE_ENTRY_IID(IID_IExplorerToolbar, IExplorerToolbar)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
CBaseBarSite::CBaseBarSite()
|
||||
{
|
||||
fCurrentActiveBar = NULL;
|
||||
fNextBandID = 1;
|
||||
}
|
||||
|
||||
CBaseBarSite::~CBaseBarSite()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBaseBarSite::InsertBar(IUnknown *newBar)
|
||||
{
|
||||
CComPtr<IPersist> persist;
|
||||
CComPtr<IObjectWithSite> site;
|
||||
CComPtr<IOleWindow> oleWindow;
|
||||
CComPtr<IDeskBand> deskBand;
|
||||
CComPtr<IDockingWindow> dockingWindow;
|
||||
CBarInfo *newInfo;
|
||||
REBARBANDINFOW bandInfo;
|
||||
DESKBANDINFO deskBandInfo;
|
||||
DWORD thisBandID;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = newBar->QueryInterface(IID_IPersist, (void **)&persist);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = newBar->QueryInterface(IID_IObjectWithSite, (void **)&site);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = newBar->QueryInterface(IID_IOleWindow, (void **)&oleWindow);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = newBar->QueryInterface(IID_IDeskBand, (void **)&deskBand);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = newBar->QueryInterface(IID_IDockingWindow, (void **)&dockingWindow);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = site->SetSite((IOleWindow *)this);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
newInfo = new CBarInfo;
|
||||
if (newInfo == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
thisBandID = fNextBandID++;
|
||||
newInfo->fTheBar = newBar;
|
||||
newInfo->fBandID = thisBandID;
|
||||
hResult = persist->GetClassID(&newInfo->fBarClass);
|
||||
deskBandInfo.dwMask = DBIM_MINSIZE | DBIM_ACTUAL | DBIM_TITLE;
|
||||
deskBandInfo.wszTitle[0] = 0;
|
||||
hResult = deskBand->GetBandInfo(0, 0, &deskBandInfo);
|
||||
memset(&bandInfo, 0, sizeof(bandInfo));
|
||||
bandInfo.cbSize = sizeof(bandInfo);
|
||||
bandInfo.fMask = RBBIM_STYLE | RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_IDEALSIZE | RBBIM_TEXT | RBBIM_LPARAM | RBBIM_ID;
|
||||
bandInfo.fStyle = RBBS_NOGRIPPER | RBBS_VARIABLEHEIGHT;
|
||||
bandInfo.lpText = deskBandInfo.wszTitle;
|
||||
hResult = oleWindow->GetWindow(&bandInfo.hwndChild);
|
||||
bandInfo.cxMinChild = 200; //deskBandInfo.ptMinSize.x;
|
||||
bandInfo.cyMinChild = 200; //deskBandInfo.ptMinSize.y;
|
||||
bandInfo.cx = 0;
|
||||
bandInfo.wID = thisBandID;
|
||||
bandInfo.cyChild = -1; //deskBandInfo.ptActual.y;
|
||||
bandInfo.cyMaxChild = 32000;
|
||||
bandInfo.cyIntegral = 1;
|
||||
bandInfo.cxIdeal = 0; //deskBandInfo.ptActual.x;
|
||||
bandInfo.lParam = (LPARAM)newInfo;
|
||||
SendMessage(RB_INSERTBANDW, -1, (LPARAM)&bandInfo);
|
||||
hResult = dockingWindow->ShowDW(TRUE); // this call is what makes the tree fill with contents
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
// for now
|
||||
fCurrentActiveBar = newInfo;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::GetWindow(HWND *lphwnd)
|
||||
{
|
||||
if (lphwnd == NULL)
|
||||
return E_POINTER;
|
||||
*lphwnd = m_hWnd;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::ContextSensitiveHelp(BOOL fEnterMode)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::UIActivateIO(BOOL fActivate, LPMSG lpMsg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::HasFocusIO()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::TranslateAcceleratorIO(LPMSG lpMsg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
|
||||
{
|
||||
CComPtr<IServiceProvider> serviceProvider;
|
||||
HRESULT hResult;
|
||||
|
||||
if (fDeskBarSite == NULL)
|
||||
return E_FAIL;
|
||||
hResult = fDeskBarSite->QueryInterface(IID_IServiceProvider, (void **)&serviceProvider);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
// called for SID_STopLevelBrowser, IID_IBrowserService to find top level browser
|
||||
// called for SID_IWebBrowserApp, IID_IConnectionPointContainer
|
||||
// connection point called for DIID_DWebBrowserEvents2 to establish connection
|
||||
return serviceProvider->QueryService(guidService, riid, ppvObject);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
|
||||
{
|
||||
CComPtr<IDeskBar> deskBar;
|
||||
CComPtr<IWinEventHandler> winEventHandler;
|
||||
NMHDR *notifyHeader;
|
||||
RECT newBounds;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = S_OK;
|
||||
if (uMsg == WM_NOTIFY)
|
||||
{
|
||||
notifyHeader = (NMHDR *)lParam;
|
||||
if (notifyHeader->hwndFrom == m_hWnd && notifyHeader->code == RBN_AUTOSIZE)
|
||||
{
|
||||
hResult = fDeskBarSite->QueryInterface(IID_IDeskBar, (void **)&deskBar);
|
||||
GetClientRect(&newBounds);
|
||||
hResult = deskBar->OnPosRectChangeDB(&newBounds);
|
||||
}
|
||||
}
|
||||
if (fCurrentActiveBar != NULL)
|
||||
{
|
||||
hResult = fCurrentActiveBar->fTheBar->QueryInterface(IID_IWinEventHandler, (void **)&winEventHandler);
|
||||
if (SUCCEEDED(hResult) && winEventHandler.p != NULL)
|
||||
hResult = winEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
|
||||
}
|
||||
return hResult;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::IsWindowOwner(HWND hWnd)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::OnFocusChangeIS (IUnknown *punkObj, BOOL fSetFocus)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::SetDeskBarSite(IUnknown *punkSite)
|
||||
{
|
||||
CComPtr<IOleWindow> oleWindow;
|
||||
HWND ownerWindow;
|
||||
HRESULT hResult;
|
||||
|
||||
if (punkSite == NULL)
|
||||
fDeskBarSite.Release();
|
||||
else
|
||||
{
|
||||
hResult = punkSite->QueryInterface(IID_IOleWindow, (void **)&oleWindow);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = punkSite->QueryInterface(IID_IUnknown, (void **)&fDeskBarSite);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = oleWindow->GetWindow(&ownerWindow);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
m_hWnd = CreateWindow(REBARCLASSNAMEW, _T(""), WS_VISIBLE | WS_CHILDWINDOW | WS_CLIPSIBLINGS |
|
||||
WS_CLIPCHILDREN |
|
||||
RBS_VARHEIGHT | RBS_REGISTERDROP | RBS_AUTOSIZE | RBS_VERTICALGRIPPER | RBS_DBLCLKTOGGLE |
|
||||
CCS_LEFT | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NORESIZE, 0, 0, 0, 0, ownerWindow, NULL,
|
||||
_AtlBaseModule.GetModuleInstance(), NULL);
|
||||
SendMessage(RB_SETTEXTCOLOR, 0, CLR_DEFAULT);
|
||||
SendMessage(RB_SETBKCOLOR, 0, CLR_DEFAULT);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::SetModeDBC(DWORD dwMode)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::UIActivateDBC(DWORD dwState)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::GetSize(DWORD dwWhich, LPRECT prc)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
|
||||
{
|
||||
if (IsEqualIID(*pguidCmdGroup, IID_IDeskBand))
|
||||
{
|
||||
switch (nCmdID)
|
||||
{
|
||||
case 1: // insert a new band
|
||||
if (V_VT(pvaIn) != VT_UNKNOWN)
|
||||
return E_INVALIDARG;
|
||||
return InsertBar(V_UNKNOWN(pvaIn));
|
||||
}
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::AddBand(IUnknown *punk)
|
||||
{
|
||||
return InsertBar(punk);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::EnumBands(UINT uBand, DWORD *pdwBandID)
|
||||
{
|
||||
if (uBand == 0xffffffff)
|
||||
{
|
||||
*pdwBandID = (DWORD)SendMessage(RB_GETBANDCOUNT, 0, 0);
|
||||
return S_OK;
|
||||
}
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::RemoveBand(DWORD dwBandID)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::GetBandObject(DWORD dwBandID, REFIID riid, void **ppv)
|
||||
{
|
||||
if (ppv == NULL)
|
||||
return E_POINTER;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::SetBandSiteInfo(const BANDSITEINFO *pbsinfo)
|
||||
{
|
||||
if (pbsinfo == NULL)
|
||||
return E_POINTER;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::GetBandSiteInfo(BANDSITEINFO *pbsinfo)
|
||||
{
|
||||
if (pbsinfo == NULL)
|
||||
return E_POINTER;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::GetClassID(CLSID *pClassID)
|
||||
{
|
||||
if (pClassID == NULL)
|
||||
return E_POINTER;
|
||||
// TODO: what class to return here?
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::IsDirty()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::Load(IStream *pStm)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::Save(IStream *pStm, BOOL fClearDirty)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBaseBarSite::GetSizeMax(ULARGE_INTEGER *pcbSize)
|
||||
{
|
||||
if (pcbSize == NULL)
|
||||
return E_POINTER;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
LRESULT CBaseBarSite::OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
NMHDR *notifyHeader;
|
||||
|
||||
notifyHeader = (NMHDR *)lParam;
|
||||
if (notifyHeader->hwndFrom == m_hWnd)
|
||||
{
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT CreateBaseBarSite(REFIID riid, void **ppv)
|
||||
{
|
||||
CComObject<CBaseBarSite> *theBaseBarSite;
|
||||
HRESULT hResult;
|
||||
|
||||
if (ppv == NULL)
|
||||
return E_POINTER;
|
||||
*ppv = NULL;
|
||||
ATLTRY (theBaseBarSite = new CComObject<CBaseBarSite>);
|
||||
if (theBaseBarSite == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
hResult = theBaseBarSite->QueryInterface (riid, (void **)ppv);
|
||||
if (FAILED (hResult))
|
||||
{
|
||||
delete theBaseBarSite;
|
||||
return hResult;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
483
reactos/dll/win32/browseui/brandband.cpp
Normal file
483
reactos/dll/win32/browseui/brandband.cpp
Normal file
|
@ -0,0 +1,483 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
Implements the logo band of a cabinet window. Most remarkable feature is the
|
||||
animation.
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <exdisp.h>
|
||||
#include <exdispid.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "resource.h"
|
||||
#include "brandband.h"
|
||||
|
||||
/*
|
||||
TODO:
|
||||
Add Exec command handlers
|
||||
Properly implement GetBandInfo
|
||||
Fix SetSite to revoke brand band service when site is cleared
|
||||
*/
|
||||
|
||||
inline void FillSolidRect(HDC dc, const RECT *bounds)
|
||||
{
|
||||
::ExtTextOut(dc, 0, 0, ETO_OPAQUE, bounds, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
inline void FillSolidRect(HDC dc, const RECT *bounds, COLORREF clr)
|
||||
{
|
||||
::SetBkColor(dc, clr);
|
||||
::ExtTextOut(dc, 0, 0, ETO_OPAQUE, bounds, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
long GetScreenDepth()
|
||||
{
|
||||
HDC tempDC;
|
||||
long depth;
|
||||
|
||||
tempDC = GetDC(NULL);
|
||||
depth = GetDeviceCaps(tempDC, BITSPIXEL) * GetDeviceCaps(tempDC, PLANES);
|
||||
ReleaseDC(NULL, tempDC);
|
||||
return depth;
|
||||
}
|
||||
|
||||
static const int gSmallImageSize = 22;
|
||||
static const int gMediumImageSize = 26;
|
||||
static const int gLargeImageSize = 38;
|
||||
|
||||
static const int gTrueColorResourceBase = 240;
|
||||
static const int g256ColorResourceBase = 245;
|
||||
|
||||
CBrandBand::CBrandBand()
|
||||
{
|
||||
fProfferCookie = 0;
|
||||
fCurrentFrame = 0;
|
||||
fMaxFrameCount = 0;
|
||||
fImageBitmap = NULL;
|
||||
fAdviseCookie = 0;
|
||||
}
|
||||
|
||||
CBrandBand::~CBrandBand()
|
||||
{
|
||||
DeleteObject(fImageBitmap);
|
||||
}
|
||||
|
||||
void CBrandBand::StartAnimation()
|
||||
{
|
||||
fCurrentFrame = 0;
|
||||
SetTimer(5678, 30, NULL);
|
||||
}
|
||||
|
||||
void CBrandBand::StopAnimation()
|
||||
{
|
||||
KillTimer(5678);
|
||||
fCurrentFrame = 0;
|
||||
Invalidate(FALSE);
|
||||
}
|
||||
|
||||
void CBrandBand::SelectImage()
|
||||
{
|
||||
int screenDepth;
|
||||
RECT clientRect;
|
||||
int clientWidth;
|
||||
int clientHeight;
|
||||
int clientSize;
|
||||
HINSTANCE shell32Instance;
|
||||
BITMAP bitmapInfo;
|
||||
int resourceID;
|
||||
|
||||
screenDepth = GetScreenDepth();
|
||||
GetClientRect(&clientRect);
|
||||
clientWidth = clientRect.right - clientRect.left;
|
||||
clientHeight = clientRect.bottom - clientRect.top;
|
||||
clientSize = min(clientWidth, clientHeight);
|
||||
if (screenDepth > 8)
|
||||
resourceID = gTrueColorResourceBase;
|
||||
else
|
||||
resourceID = g256ColorResourceBase;
|
||||
if (clientSize >= gLargeImageSize)
|
||||
resourceID += 2;
|
||||
else if (clientSize >= gMediumImageSize)
|
||||
resourceID += 1;
|
||||
shell32Instance = GetModuleHandle(L"shell32.dll");
|
||||
fImageBitmap = LoadBitmap(shell32Instance, MAKEINTRESOURCE(resourceID));
|
||||
GetObjectW(fImageBitmap, sizeof(bitmapInfo), &bitmapInfo);
|
||||
fBitmapSize = bitmapInfo.bmWidth;
|
||||
fMaxFrameCount = bitmapInfo.bmHeight / fBitmapSize;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi)
|
||||
{
|
||||
if (pdbi->dwMask & DBIM_MINSIZE)
|
||||
{
|
||||
pdbi->ptMinSize.x = 38;
|
||||
pdbi->ptMinSize.y = 22;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_MAXSIZE)
|
||||
{
|
||||
pdbi->ptMaxSize.x = 38;
|
||||
pdbi->ptMaxSize.y = 38;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_INTEGRAL)
|
||||
{
|
||||
pdbi->ptIntegral.x = 38;
|
||||
pdbi->ptIntegral.y = 38;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_ACTUAL)
|
||||
{
|
||||
pdbi->ptActual.x = 38;
|
||||
pdbi->ptActual.y = 38;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_TITLE)
|
||||
wcscpy(pdbi->wszTitle, L"");
|
||||
if (pdbi->dwMask & DBIM_MODEFLAGS)
|
||||
pdbi->dwModeFlags = DBIMF_UNDELETEABLE;
|
||||
if (pdbi->dwMask & DBIM_BKCOLOR)
|
||||
pdbi->crBkgnd = 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::SetSite(IUnknown* pUnkSite)
|
||||
{
|
||||
CComPtr<IBrowserService> browserService;
|
||||
CComPtr<IOleWindow> oleWindow;
|
||||
CComPtr<IServiceProvider> serviceProvider;
|
||||
CComPtr<IProfferService> profferService;
|
||||
HWND parentWindow;
|
||||
HWND hwnd;
|
||||
HRESULT hResult;
|
||||
|
||||
fSite.Release();
|
||||
if (pUnkSite == NULL)
|
||||
{
|
||||
hResult = AtlUnadvise(fSite, DIID_DWebBrowserEvents, fAdviseCookie);
|
||||
// TODO: revoke brand band service
|
||||
return S_OK;
|
||||
}
|
||||
hResult = pUnkSite->QueryInterface(IID_IDockingWindowSite, (void **)&fSite);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
parentWindow = NULL;
|
||||
hResult = pUnkSite->QueryInterface(IID_IOleWindow, (void **)&oleWindow);
|
||||
if (SUCCEEDED(hResult))
|
||||
hResult = oleWindow->GetWindow(&parentWindow);
|
||||
if (!::IsWindow(parentWindow))
|
||||
return E_FAIL;
|
||||
|
||||
hwnd = SHCreateWorkerWindowW(0, parentWindow, 0, WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, NULL, 0);
|
||||
if (hwnd == NULL)
|
||||
return E_FAIL;
|
||||
SubclassWindow(hwnd);
|
||||
hResult = pUnkSite->QueryInterface(IID_IServiceProvider, (void **)&serviceProvider);
|
||||
if (SUCCEEDED(hResult))
|
||||
{
|
||||
hResult = serviceProvider->QueryService(SID_SBrandBand, IID_IProfferService, (void **)&profferService);
|
||||
if (SUCCEEDED(hResult))
|
||||
hResult = profferService->ProfferService(SID_SBrandBand, (IServiceProvider *)this, &fProfferCookie);
|
||||
hResult = serviceProvider->QueryService(SID_SShellBrowser, IID_IBrowserService, (void **)&browserService);
|
||||
if (SUCCEEDED(hResult))
|
||||
hResult = AtlAdvise(browserService, (IDispatch *)this, DIID_DWebBrowserEvents, &fAdviseCookie);
|
||||
}
|
||||
// ignore any hResult errors up to here - they are nonfatal
|
||||
hResult = S_OK;
|
||||
SelectImage();
|
||||
return hResult;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::GetSite(REFIID riid, void **ppvSite)
|
||||
{
|
||||
if (ppvSite == NULL)
|
||||
return E_POINTER;
|
||||
if (fSite.p == NULL)
|
||||
{
|
||||
*ppvSite = NULL;
|
||||
return E_FAIL;
|
||||
}
|
||||
return fSite.p->QueryInterface(riid, ppvSite);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::GetWindow(HWND *lphwnd)
|
||||
{
|
||||
if (lphwnd == NULL)
|
||||
return E_POINTER;
|
||||
*lphwnd = m_hWnd;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::ContextSensitiveHelp(BOOL fEnterMode)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::CloseDW(DWORD dwReserved)
|
||||
{
|
||||
ShowDW(FALSE);
|
||||
|
||||
if (IsWindow())
|
||||
DestroyWindow();
|
||||
|
||||
m_hWnd = NULL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::ResizeBorderDW(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::ShowDW(BOOL fShow)
|
||||
{
|
||||
if (m_hWnd)
|
||||
{
|
||||
if (fShow)
|
||||
ShowWindow(SW_SHOW);
|
||||
else
|
||||
ShowWindow(SW_HIDE);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::HasFocusIO()
|
||||
{
|
||||
if (GetFocus() == m_hWnd)
|
||||
return S_OK;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::TranslateAcceleratorIO(LPMSG lpMsg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::UIActivateIO(BOOL fActivate, LPMSG lpMsg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::GetClassID(CLSID *pClassID)
|
||||
{
|
||||
if (pClassID == NULL)
|
||||
return E_POINTER;
|
||||
*pClassID = CLSID_BrandBand;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::IsDirty()
|
||||
{
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::Load(IStream *pStm)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::Save(IStream *pStm, BOOL fClearDirty)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::GetSizeMax(ULARGE_INTEGER *pcbSize)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::IsWindowOwner(HWND hWnd)
|
||||
{
|
||||
if (hWnd == m_hWnd)
|
||||
return S_OK;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
|
||||
{
|
||||
if (IsEqualIID(*pguidCmdGroup, CGID_PrivCITCommands))
|
||||
{
|
||||
}
|
||||
else if (IsEqualIID(*pguidCmdGroup, CGID_BrandCmdGroup))
|
||||
{
|
||||
switch (nCmdID)
|
||||
{
|
||||
case BBID_STARTANIMATION:
|
||||
StartAnimation();
|
||||
return S_OK;
|
||||
case BBID_STOPANIMATION:
|
||||
StopAnimation();
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
|
||||
{
|
||||
CComPtr<IServiceProvider> serviceProvider;
|
||||
HRESULT hResult;
|
||||
|
||||
if (IsEqualIID(guidService, SID_SBrandBand))
|
||||
return this->QueryInterface(riid, ppvObject);
|
||||
hResult = fSite->QueryInterface(IID_IServiceProvider, (void **)&serviceProvider);
|
||||
if (FAILED (hResult))
|
||||
return hResult;
|
||||
return serviceProvider->QueryService(guidService, riid, ppvObject);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::GetTypeInfoCount(UINT *pctinfo)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CBrandBand::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||
{
|
||||
if (pDispParams == NULL)
|
||||
return E_INVALIDARG;
|
||||
switch (dispIdMember)
|
||||
{
|
||||
case DISPID_DOWNLOADCOMPLETE:
|
||||
StopAnimation();
|
||||
break;
|
||||
case DISPID_DOWNLOADBEGIN:
|
||||
StartAnimation();
|
||||
break;
|
||||
}
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
LRESULT CBrandBand::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
Invalidate(FALSE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CBrandBand::OnEraseBkgnd (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
LRESULT CBrandBand::OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
PAINTSTRUCT paintInfo;
|
||||
HDC dc;
|
||||
POINT destinationPoint;
|
||||
HDC sourceDC;
|
||||
HBITMAP oldBitmap;
|
||||
RECT clientRect;
|
||||
RECT tempRect;
|
||||
|
||||
dc = BeginPaint(&paintInfo);
|
||||
GetClientRect(&clientRect);
|
||||
|
||||
destinationPoint.x = (clientRect.right - clientRect.left - fBitmapSize) / 2;
|
||||
destinationPoint.y = (clientRect.bottom - clientRect.top - fBitmapSize) / 2;
|
||||
|
||||
::SetBkColor(dc, RGB(255, 255, 255));
|
||||
|
||||
tempRect.left = 0;
|
||||
tempRect.top = 0;
|
||||
tempRect.right = clientRect.right;
|
||||
tempRect.bottom = destinationPoint.y;
|
||||
FillSolidRect(dc, &tempRect, RGB(255, 255, 255));
|
||||
|
||||
tempRect.left = 0;
|
||||
tempRect.top = destinationPoint.y + fBitmapSize;
|
||||
tempRect.right = clientRect.right;
|
||||
tempRect.bottom = clientRect.bottom;
|
||||
FillSolidRect(dc, &paintInfo.rcPaint, RGB(255, 255, 255));
|
||||
|
||||
tempRect.left = 0;
|
||||
tempRect.top = destinationPoint.y;
|
||||
tempRect.right = destinationPoint.x;
|
||||
tempRect.bottom = destinationPoint.y + fBitmapSize;
|
||||
FillSolidRect(dc, &paintInfo.rcPaint, RGB(255, 255, 255));
|
||||
|
||||
tempRect.left = destinationPoint.x + fBitmapSize;
|
||||
tempRect.top = destinationPoint.y;
|
||||
tempRect.right = clientRect.right;
|
||||
tempRect.bottom = destinationPoint.y + fBitmapSize;
|
||||
FillSolidRect(dc, &paintInfo.rcPaint, RGB(255, 255, 255));
|
||||
|
||||
sourceDC = CreateCompatibleDC(dc);
|
||||
oldBitmap = (HBITMAP)SelectObject(sourceDC, fImageBitmap);
|
||||
|
||||
BitBlt(dc, destinationPoint.x, destinationPoint.y, fBitmapSize, fBitmapSize, sourceDC, 0, fCurrentFrame * fBitmapSize, SRCCOPY);
|
||||
|
||||
SelectObject(sourceDC, oldBitmap);
|
||||
DeleteDC(sourceDC);
|
||||
|
||||
EndPaint(&paintInfo);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CBrandBand::OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
fCurrentFrame++;
|
||||
if (fCurrentFrame >= fMaxFrameCount)
|
||||
fCurrentFrame = 0;
|
||||
Invalidate(FALSE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT CreateBrandBand(REFIID riid, void **ppv)
|
||||
{
|
||||
CComObject<CBrandBand> *theMenuBar;
|
||||
HRESULT hResult;
|
||||
|
||||
if (ppv == NULL)
|
||||
return E_POINTER;
|
||||
*ppv = NULL;
|
||||
ATLTRY (theMenuBar = new CComObject<CBrandBand>);
|
||||
if (theMenuBar == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
hResult = theMenuBar->QueryInterface (riid, (void **)ppv);
|
||||
if (FAILED (hResult))
|
||||
{
|
||||
delete theMenuBar;
|
||||
return hResult;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
132
reactos/dll/win32/browseui/brandband.h
Normal file
132
reactos/dll/win32/browseui/brandband.h
Normal file
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77@reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _brandband_h
|
||||
#define _brandband_h
|
||||
|
||||
class CBrandBand :
|
||||
public CWindowImpl<CBrandBand, CWindow, CControlWinTraits>,
|
||||
public CComCoClass<CBrandBand, &CLSID_BrandBand>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IDeskBand,
|
||||
public IObjectWithSite,
|
||||
public IInputObject,
|
||||
public IPersistStream,
|
||||
public IWinEventHandler,
|
||||
public IOleCommandTarget,
|
||||
public IServiceProvider,
|
||||
public IDispatch
|
||||
{
|
||||
private:
|
||||
CComPtr<IDockingWindowSite> fSite;
|
||||
DWORD fProfferCookie;
|
||||
int fCurrentFrame;
|
||||
int fMaxFrameCount;
|
||||
HBITMAP fImageBitmap;
|
||||
int fBitmapSize;
|
||||
DWORD fAdviseCookie;
|
||||
public:
|
||||
CBrandBand();
|
||||
~CBrandBand();
|
||||
void StartAnimation();
|
||||
void StopAnimation();
|
||||
void SelectImage();
|
||||
public:
|
||||
// *** IDeskBand methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi);
|
||||
|
||||
// *** IObjectWithSite methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown* pUnkSite);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite);
|
||||
|
||||
// *** IOleWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
|
||||
|
||||
// *** IDockingWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved);
|
||||
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved);
|
||||
virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow);
|
||||
|
||||
// *** IInputObject methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE HasFocusIO();
|
||||
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg);
|
||||
virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg);
|
||||
|
||||
// *** IPersist methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
|
||||
|
||||
// *** IPersistStream methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE IsDirty();
|
||||
virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm);
|
||||
virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
|
||||
|
||||
// *** IWinEventHandler methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult);
|
||||
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd);
|
||||
|
||||
// *** IOleCommandTarget methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
|
||||
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
|
||||
|
||||
// *** IServiceProvider methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
|
||||
|
||||
// *** IDispatch methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
|
||||
virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
|
||||
|
||||
// message handlers
|
||||
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
|
||||
BEGIN_MSG_MAP(CBrandBand)
|
||||
// MESSAGE_HANDLER(WM_SIZE, OnSize)
|
||||
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
|
||||
MESSAGE_HANDLER(WM_PAINT, OnPaint)
|
||||
MESSAGE_HANDLER(WM_TIMER, OnTimer)
|
||||
END_MSG_MAP()
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_BRANDBAND)
|
||||
DECLARE_NOT_AGGREGATABLE(CBrandBand)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(CBrandBand)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDockingWindow, IDockingWindow)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDispatch, IDispatch)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
#endif // _brandband_h
|
128
reactos/dll/win32/browseui/browseui.cpp
Normal file
128
reactos/dll/win32/browseui/browseui.cpp
Normal file
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <shlwapi.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include <wine/debug.h>
|
||||
#include "resource.h"
|
||||
#include "aclmulti.h"
|
||||
#include "addressband.h"
|
||||
#include "addresseditbox.h"
|
||||
#include "bandproxy.h"
|
||||
#include "bandsite.h"
|
||||
#include "bandsitemenu.h"
|
||||
#include "brandband.h"
|
||||
#include "internettoolbar.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(browseui);
|
||||
|
||||
class CBrowseUIModule : public CComModule
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
BEGIN_OBJECT_MAP(ObjectMap)
|
||||
OBJECT_ENTRY(CLSID_ACLMulti, CACLMulti)
|
||||
OBJECT_ENTRY(CLSID_SH_AddressBand, CAddressBand)
|
||||
OBJECT_ENTRY(CLSID_AddressEditBox, CAddressEditBox)
|
||||
OBJECT_ENTRY(CLSID_BandProxy, CBandProxy)
|
||||
OBJECT_ENTRY(CLSID_RebarBandSite, CBandSite)
|
||||
OBJECT_ENTRY(CLSID_BandSiteMenu, CBandSiteMenu)
|
||||
OBJECT_ENTRY(CLSID_BrandBand, CBrandBand)
|
||||
OBJECT_ENTRY(CLSID_InternetToolbar, CInternetToolbar)
|
||||
END_OBJECT_MAP()
|
||||
|
||||
CBrowseUIModule gModule;
|
||||
CAtlWinModule gWinModule;
|
||||
|
||||
/*************************************************************************
|
||||
* BROWSEUI DllMain
|
||||
*/
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad)
|
||||
{
|
||||
TRACE("%p 0x%x %p\n", hInstance, dwReason, fImpLoad);
|
||||
if (dwReason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
gModule.Init(ObjectMap, hInstance, NULL);
|
||||
DisableThreadLibraryCalls (hInstance);
|
||||
}
|
||||
else if (dwReason == DLL_PROCESS_DETACH)
|
||||
{
|
||||
gModule.Term();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllCanUnloadNow (BROWSEUI.@)
|
||||
*/
|
||||
STDAPI DllCanUnloadNow()
|
||||
{
|
||||
return gModule.DllCanUnloadNow();
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject (BROWSEUI.@)
|
||||
*/
|
||||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
return gModule.DllGetClassObject(rclsid, riid, ppv);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (BROWSEUI.@)
|
||||
*/
|
||||
STDAPI DllRegisterServer()
|
||||
{
|
||||
return gModule.DllRegisterServer(FALSE);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllUnregisterServer (BROWSEUI.@)
|
||||
*/
|
||||
STDAPI DllUnregisterServer()
|
||||
{
|
||||
return gModule.DllUnregisterServer(FALSE);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetVersion (BROWSEUI.@)
|
||||
*/
|
||||
HRESULT WINAPI DllGetVersion(DLLVERSIONINFO *info)
|
||||
{
|
||||
if (info->cbSize != sizeof(DLLVERSIONINFO)) FIXME("support DLLVERSIONINFO2\n");
|
||||
|
||||
/* this is what IE6 on Windows 98 reports */
|
||||
info->dwMajorVersion = 6;
|
||||
info->dwMinorVersion = 0;
|
||||
info->dwBuildNumber = 2600;
|
||||
info->dwPlatformID = DLLVER_PLATFORM_WINDOWS;
|
||||
|
||||
return NOERROR;
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* Internal header for browseui.dll
|
||||
*
|
||||
* Copyright 2007 Mikolaj Zalewski
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_BROWSEUI_H
|
||||
#define __WINE_BROWSEUI_H
|
||||
|
||||
extern LONG BROWSEUI_refCount;
|
||||
|
||||
HRESULT WINAPI ACLMulti_Constructor(IUnknown *punkOuter, IUnknown **ppOut);
|
||||
HRESULT WINAPI BandSite_Constructor(IUnknown *punkOuter, IUnknown **ppOut);
|
||||
HRESULT WINAPI BandSiteMenu_Constructor(IUnknown *punkOuter, IUnknown **ppOut);
|
||||
|
||||
#endif /* __WINE_SHDOCVW_H */
|
|
@ -5,20 +5,44 @@
|
|||
<importlibrary definition="browseui.spec" />
|
||||
<include base="browseui">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
<include base="explorer_new">.</include>
|
||||
<include base="atlnew">.</include>
|
||||
<define name="__WINESRC__" />
|
||||
<define name="UNICODE" />
|
||||
<define name="_UNICODE" />
|
||||
<define name="ROS_Headers" />
|
||||
<redefine name="_WIN32_WINNT">0x600</redefine>
|
||||
<library>wine</library>
|
||||
<library>shlwapi</library>
|
||||
<library>shell32</library>
|
||||
<library>comctl32</library>
|
||||
<library>gdi32</library>
|
||||
<library>ole32</library>
|
||||
<library>oleaut32</library>
|
||||
<library>user32</library>
|
||||
<library>advapi32</library>
|
||||
<library>kernel32</library>
|
||||
<library>uuid</library>
|
||||
<library>ntdll</library>
|
||||
<file>aclmulti.c</file>
|
||||
<file>bandsite.c</file>
|
||||
<file>bandsitemenu.c</file>
|
||||
<file>browseui_main.c</file>
|
||||
<file>regsvr.c</file>
|
||||
<file>version.rc</file>
|
||||
<library>atlnew</library>
|
||||
<library>msvcrt</library>
|
||||
<file>aclmulti.cpp</file>
|
||||
<file>addressband.cpp</file>
|
||||
<file>addresseditbox.cpp</file>
|
||||
<file>bandproxy.cpp</file>
|
||||
<file>bandsite.cpp</file>
|
||||
<file>bandsitemenu.cpp</file>
|
||||
<file>basebar.cpp</file>
|
||||
<file>basebarsite.cpp</file>
|
||||
<file>brandband.cpp</file>
|
||||
<file>browseui.cpp</file>
|
||||
<file>browseuiord.cpp</file>
|
||||
<file>commonbrowser.cpp</file>
|
||||
<file>globalfoldersettings.cpp</file>
|
||||
<file>internettoolbar.cpp</file>
|
||||
<file>regtreeoptions.cpp</file>
|
||||
<file>shellbrowser.cpp</file>
|
||||
<file>toolsband.cpp</file>
|
||||
<file>travellog.cpp</file>
|
||||
<file>utility.cpp</file>
|
||||
<file>browseui.rc</file>
|
||||
</module>
|
||||
|
|
78
reactos/dll/win32/browseui/browseui.rc
Normal file
78
reactos/dll/win32/browseui/browseui.rc
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Top level resource file for browseui stuff
|
||||
*
|
||||
* Copyright 2009 Andrew Hill
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "shlobj.h"
|
||||
#include "resource.h"
|
||||
|
||||
#include "version.rc"
|
||||
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// REGISTRY
|
||||
//
|
||||
IDR_ADDRESSBAND REGISTRY "res\\addressband.rgs"
|
||||
IDR_ADDRESSEDITBOX REGISTRY "res\\addresseditbox.rgs"
|
||||
IDR_ACLMULTI REGISTRY "res\\autocompletecontainer.rgs"
|
||||
IDR_BANDPROXY REGISTRY "res\\bandproxy.rgs"
|
||||
IDR_BANDSITE REGISTRY "res\\rebarbandsite.rgs"
|
||||
IDR_BANDSITEMENU REGISTRY "res\\bandsitemenu.rgs"
|
||||
IDR_BRANDBAND REGISTRY "res\\brandband.rgs"
|
||||
IDR_COMMONBROWSER REGISTRY "res\\commonbrowser.rgs"
|
||||
IDR_GLOBALFOLDERSETTINGS REGISTRY "res\\globalfoldersettings.rgs"
|
||||
IDR_INTERNETTOOLBAR REGISTRY "res\\internettoolbar.rgs"
|
||||
IDR_REGTREEOPTIONS REGISTRY "res\\regtreeoptions.rgs"
|
||||
|
||||
|
||||
/*
|
||||
* Everything specific to any language goes
|
||||
* in one of the specific files.
|
||||
*/
|
||||
//#include "lang/bg-BG.rc"
|
||||
//#include "lang/ca-ES.rc"
|
||||
//#include "lang/cs-CZ.rc"
|
||||
//#include "lang/da-DK.rc"
|
||||
//#include "lang/de-DE.rc"
|
||||
//#include "lang/el-GR.rc"
|
||||
//#include "lang/en-GB.rc"
|
||||
#include "lang/en-US.rc"
|
||||
//#include "lang/es-ES.rc"
|
||||
//#include "lang/fi-FI.rc"
|
||||
//#include "lang/fr-FR.rc"
|
||||
//#include "lang/hu-HU.rc"
|
||||
//#include "lang/it-IT.rc"
|
||||
//#include "lang/ja-JP.rc"
|
||||
//#include "lang/ko-KR.rc"
|
||||
//#include "lang/nl-NL.rc"
|
||||
//#include "lang/no-NO.rc"
|
||||
//#include "lang/pl-PL.rc"
|
||||
//#include "lang/pt-BR.rc"
|
||||
//#include "lang/pt-PT.rc"
|
||||
//#include "lang/ro-RO.rc"
|
||||
//#include "lang/ru-RU.rc"
|
||||
//#include "lang/sl-SI.rc"
|
||||
//#include "lang/sk-SK.rc"
|
||||
//#include "lang/sv-SE.rc"
|
||||
//#include "lang/tr-TR.rc"
|
||||
//#include "lang/uk-UA.rc"
|
||||
//#include "lang/zh-CN.rc"
|
||||
//#include "lang/zh-TW.rc"
|
|
@ -1,6 +1,31 @@
|
|||
@ stdcall -private DllCanUnloadNow()
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
@ stdcall -private DllGetVersion(ptr)
|
||||
@ stub DllInstall
|
||||
@ stdcall -private DllRegisterServer()
|
||||
@ stdcall -private DllUnregisterServer()
|
||||
@ stdcall -private DllCanUnloadNow()
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
@ stdcall -private DllGetVersion(ptr)
|
||||
@ stub DllInstall
|
||||
@ stdcall -private DllRegisterServer()
|
||||
@ stdcall -private DllUnregisterServer()
|
||||
101 stdcall -noname InitOCHostClass(long)
|
||||
102 stdcall -noname SHOpenFolderWindow(ptr)
|
||||
103 stdcall -noname SHOpenNewFrame(ptr ptr long long)
|
||||
105 stdcall -noname SHCreateSavedWindows()
|
||||
106 stdcall -noname SHCreateFromDesktop(long)
|
||||
107 stdcall -noname SHExplorerParseCmdLine(wstr)
|
||||
118 stdcall -noname UEMRegisterNotify(long long)
|
||||
120 stdcall -noname SHCreateBandForPidl(ptr ptr long)
|
||||
121 stdcall -noname SHPidlFromDataObject(ptr ptr long ptr)
|
||||
122 stdcall -noname IDataObject_GetDeskBandState(long)
|
||||
123 stdcall -noname SHCreateIETHREADPARAM(long long ptr ptr)
|
||||
124 stdcall -noname SHCloneIETHREADPARAM(ptr)
|
||||
125 stdcall -noname SHParseIECommandLine(long long)
|
||||
126 stdcall -noname SHDestroyIETHREADPARAM(ptr)
|
||||
127 stdcall -noname SHOnCWMCommandLine(long)
|
||||
128 stdcall -noname Channel_GetFolderPidl()
|
||||
129 stdcall -noname ChannelBand_Create(ptr)
|
||||
130 stdcall -noname Channels_SetBandInfoSFB(ptr)
|
||||
131 stdcall -noname IUnknown_SetBandInfoSFB(ptr long)
|
||||
133 stdcall -noname Channel_QuickLaunch()
|
||||
134 stdcall -noname SHGetNavigateTarget(long long long long)
|
||||
135 stdcall -noname GetInfoTip(ptr long wstr long)
|
||||
136 stdcall -noname SHEnumClassesOfCategories(long long long long long)
|
||||
137 stdcall -noname SHWriteClassesOfCategories(long long long long long long long)
|
||||
138 stdcall -noname SHIsExplorerBrowser()
|
||||
|
|
|
@ -1,218 +0,0 @@
|
|||
/*
|
||||
* browseui - Internet Explorer / Windows Explorer standard UI
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
* Copyright 2004 Mike McCormack (for CodeWeavers)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "shlwapi.h"
|
||||
#include "shlguid.h"
|
||||
|
||||
#include "browseui.h"
|
||||
#include "shobjidl.h" /* for IShellFolder used in undoc.h */
|
||||
#include "initguid.h"
|
||||
#include "undoc.h" /* for CLSID_RebarBandSite */
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(browseui);
|
||||
|
||||
LONG BROWSEUI_refCount = 0;
|
||||
|
||||
HINSTANCE browseui_hinstance = 0;
|
||||
|
||||
typedef HRESULT (WINAPI *LPFNCONSTRUCTOR)(IUnknown *pUnkOuter, IUnknown **ppvOut);
|
||||
|
||||
/* undoc GUID */
|
||||
DEFINE_GUID(CLSID_RebarBandSite, 0xECD4FC4D, 0x521C, 0x11D0, 0xB7, 0x92, 0x00, 0xA0, 0xC9, 0x03, 0x12, 0xE1);
|
||||
|
||||
|
||||
static const struct {
|
||||
REFCLSID clsid;
|
||||
LPFNCONSTRUCTOR ctor;
|
||||
} ClassesTable[] = {
|
||||
{&CLSID_ACLMulti, ACLMulti_Constructor},
|
||||
{&CLSID_RebarBandSite, BandSite_Constructor},
|
||||
{&CLSID_IShellBandSiteMenu, BandSiteMenu_Constructor},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
typedef struct tagClassFactory
|
||||
{
|
||||
const IClassFactoryVtbl *vtbl;
|
||||
LONG ref;
|
||||
LPFNCONSTRUCTOR ctor;
|
||||
} ClassFactory;
|
||||
static const IClassFactoryVtbl ClassFactoryVtbl;
|
||||
|
||||
static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut)
|
||||
{
|
||||
ClassFactory *This = CoTaskMemAlloc(sizeof(ClassFactory));
|
||||
This->vtbl = &ClassFactoryVtbl;
|
||||
This->ref = 1;
|
||||
This->ctor = ctor;
|
||||
*ppvOut = (LPVOID)This;
|
||||
TRACE("Created class factory %p\n", This);
|
||||
BROWSEUI_refCount++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void ClassFactory_Destructor(ClassFactory *This)
|
||||
{
|
||||
TRACE("Destroying class factory %p\n", This);
|
||||
CoTaskMemFree(This);
|
||||
BROWSEUI_refCount--;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
*ppvOut = NULL;
|
||||
if (IsEqualIID(riid, &IID_IClassFactory) || IsEqualIID(riid, &IID_IUnknown)) {
|
||||
IClassFactory_AddRef(iface);
|
||||
*ppvOut = iface;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("Unknown interface %s\n", debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
|
||||
{
|
||||
ClassFactory *This = (ClassFactory *)iface;
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
|
||||
{
|
||||
ClassFactory *This = (ClassFactory *)iface;
|
||||
ULONG ret = InterlockedDecrement(&This->ref);
|
||||
|
||||
if (ret == 0)
|
||||
ClassFactory_Destructor(This);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *punkOuter, REFIID iid, LPVOID *ppvOut)
|
||||
{
|
||||
ClassFactory *This = (ClassFactory *)iface;
|
||||
HRESULT ret;
|
||||
IUnknown *obj;
|
||||
|
||||
TRACE("(%p, %p, %s, %p)\n", iface, punkOuter, debugstr_guid(iid), ppvOut);
|
||||
ret = This->ctor(punkOuter, &obj);
|
||||
if (FAILED(ret))
|
||||
return ret;
|
||||
ret = IUnknown_QueryInterface(obj, iid, ppvOut);
|
||||
IUnknown_Release(obj);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
|
||||
{
|
||||
ClassFactory *This = (ClassFactory *)iface;
|
||||
|
||||
TRACE("(%p)->(%x)\n", This, fLock);
|
||||
|
||||
if(fLock)
|
||||
InterlockedIncrement(&BROWSEUI_refCount);
|
||||
else
|
||||
InterlockedDecrement(&BROWSEUI_refCount);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IClassFactoryVtbl ClassFactoryVtbl = {
|
||||
/* IUnknown */
|
||||
ClassFactory_QueryInterface,
|
||||
ClassFactory_AddRef,
|
||||
ClassFactory_Release,
|
||||
|
||||
/* IClassFactory*/
|
||||
ClassFactory_CreateInstance,
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
* BROWSEUI DllMain
|
||||
*/
|
||||
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad)
|
||||
{
|
||||
TRACE("%p 0x%x %p\n", hinst, fdwReason, fImpLoad);
|
||||
switch (fdwReason)
|
||||
{
|
||||
case DLL_WINE_PREATTACH:
|
||||
return FALSE; /* prefer native version */
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls(hinst);
|
||||
browseui_hinstance = hinst;
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* DllCanUnloadNow (BROWSEUI.@)
|
||||
*/
|
||||
HRESULT WINAPI DllCanUnloadNow(void)
|
||||
{
|
||||
return BROWSEUI_refCount ? S_FALSE : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetVersion (BROWSEUI.@)
|
||||
*/
|
||||
HRESULT WINAPI DllGetVersion(DLLVERSIONINFO *info)
|
||||
{
|
||||
if (info->cbSize != sizeof(DLLVERSIONINFO)) FIXME("support DLLVERSIONINFO2\n");
|
||||
|
||||
/* this is what IE6 on Windows 98 reports */
|
||||
info->dwMajorVersion = 6;
|
||||
info->dwMinorVersion = 0;
|
||||
info->dwBuildNumber = 2600;
|
||||
info->dwPlatformID = DLLVER_PLATFORM_WINDOWS;
|
||||
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject (BROWSEUI.@)
|
||||
*/
|
||||
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *ppvOut)
|
||||
{
|
||||
int i;
|
||||
|
||||
*ppvOut = NULL;
|
||||
if (!IsEqualIID(iid, &IID_IUnknown) && !IsEqualIID(iid, &IID_IClassFactory))
|
||||
return E_NOINTERFACE;
|
||||
|
||||
for (i = 0; ClassesTable[i].clsid != NULL; i++)
|
||||
if (IsEqualCLSID(ClassesTable[i].clsid, clsid)) {
|
||||
return ClassFactory_Constructor(ClassesTable[i].ctor, ppvOut);
|
||||
}
|
||||
FIXME("CLSID %s not supported\n", debugstr_guid(clsid));
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
302
reactos/dll/win32/browseui/browseuiord.cpp
Normal file
302
reactos/dll/win32/browseui/browseuiord.cpp
Normal file
|
@ -0,0 +1,302 @@
|
|||
/*
|
||||
* ReactOS browseui
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <shlwapi_undoc.h>
|
||||
|
||||
extern DWORD WINAPI BrowserThreadProc(LPVOID lpThreadParameter);
|
||||
|
||||
/*************************************************************************
|
||||
* InitOCHostClass [BROWSEUI.101]
|
||||
*/
|
||||
extern "C" void WINAPI InitOCHostClass(long param8)
|
||||
{
|
||||
// forwards to shdocvw
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHOpenFolderWindow [BROWSEUI.102]
|
||||
*/
|
||||
extern "C" long WINAPI SHOpenFolderWindow(IEThreadParamBlock *param8)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHCreateSavedWindows [BROWSEUI.105]
|
||||
* Called to recreate explorer windows from previous session
|
||||
*/
|
||||
extern "C" void WINAPI SHCreateSavedWindows()
|
||||
{
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHCreateFromDesktop [BROWSEUI.106]
|
||||
* parameter is a FolderInfo
|
||||
*/
|
||||
extern "C" long WINAPI SHCreateFromDesktop(long param8)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHExplorerParseCmdLine [BROWSEUI.107]
|
||||
*/
|
||||
extern "C" long WINAPI SHExplorerParseCmdLine(LPCTSTR commandLine)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* UEMRegisterNotify [BROWSEUI.118]
|
||||
*/
|
||||
extern "C" void WINAPI UEMRegisterNotify(long param8, long paramC)
|
||||
{
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHCreateBandForPidl [BROWSEUI.120]
|
||||
*/
|
||||
extern "C" HRESULT WINAPI SHCreateBandForPidl(LPCITEMIDLIST param8, IUnknown *paramC, BOOL param10)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHPidlFromDataObject [BROWSEUI.121]
|
||||
*/
|
||||
extern "C" HRESULT WINAPI SHPidlFromDataObject(IDataObject *param8, long *paramC, long param10, FILEDESCRIPTORW *param14)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* IDataObject_GetDeskBandState [BROWSEUI.122]
|
||||
*/
|
||||
extern "C" long WINAPI IDataObject_GetDeskBandState(long param8)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHCreateIETHREADPARAM [BROWSEUI.123]
|
||||
*/
|
||||
extern "C" IEThreadParamBlock *WINAPI SHCreateIETHREADPARAM(long param8, long paramC, IUnknown *param10, IUnknown *param14)
|
||||
{
|
||||
IEThreadParamBlock *result;
|
||||
|
||||
result = (IEThreadParamBlock *)LocalAlloc(LMEM_ZEROINIT, 256);
|
||||
if (result == NULL)
|
||||
return NULL;
|
||||
result->offset0 = param8;
|
||||
result->offset8 = paramC;
|
||||
result->offsetC = param10;
|
||||
if (param10 != NULL)
|
||||
param10->AddRef();
|
||||
result->offset14 = param14;
|
||||
if (param14 != NULL)
|
||||
param14->AddRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHCloneIETHREADPARAM [BROWSEUI.124]
|
||||
*/
|
||||
extern "C" IEThreadParamBlock *WINAPI SHCloneIETHREADPARAM(IEThreadParamBlock *param)
|
||||
{
|
||||
IEThreadParamBlock *result;
|
||||
|
||||
result = (IEThreadParamBlock *)LocalAlloc(LMEM_FIXED, 256);
|
||||
if (result == NULL)
|
||||
return NULL;
|
||||
memcpy(result, param, 0x40 * 4);
|
||||
if (result->directoryPIDL != NULL)
|
||||
result->directoryPIDL = ILClone(result->directoryPIDL);
|
||||
if (result->offset7C != NULL)
|
||||
result->offset7C = ILClone(result->offset7C);
|
||||
if (result->offset80 != NULL)
|
||||
result->offset80 = ILClone(result->offset80);
|
||||
if (result->offset70 != NULL)
|
||||
result->offset70->AddRef();
|
||||
#if 0
|
||||
if (result->offsetC != NULL)
|
||||
result->offsetC->Method2C();
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHParseIECommandLine [BROWSEUI.125]
|
||||
*/
|
||||
extern "C" long WINAPI SHParseIECommandLine(long param8, long paramC)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHDestroyIETHREADPARAM [BROWSEUI.126]
|
||||
*/
|
||||
extern "C" void WINAPI SHDestroyIETHREADPARAM(IEThreadParamBlock *param)
|
||||
{
|
||||
if (param == NULL)
|
||||
return;
|
||||
if (param->directoryPIDL != NULL)
|
||||
ILFree(param->directoryPIDL);
|
||||
if (param->offset7C != NULL)
|
||||
ILFree(param->offset7C);
|
||||
if ((param->offset4 & 0x80000) == 0 && param->offset80 != NULL)
|
||||
ILFree(param->offset80);
|
||||
if (param->offset14 != NULL)
|
||||
param->offset14->Release();
|
||||
if (param->offset70 != NULL)
|
||||
param->offset70->Release();
|
||||
if (param->offset78 != NULL)
|
||||
param->offset78->Release();
|
||||
if (param->offsetC != NULL)
|
||||
param->offsetC->Release();
|
||||
if (param->offsetF8 != NULL)
|
||||
param->offsetF8->Release();
|
||||
LocalFree(param);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHOnCWMCommandLine [BROWSEUI.127]
|
||||
*/
|
||||
extern "C" HRESULT WINAPI SHOnCWMCommandLine(long param8)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Channel_GetFolderPidl [BROWSEUI.128]
|
||||
*/
|
||||
extern "C" LPITEMIDLIST WINAPI Channel_GetFolderPidl()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* ChannelBand_Create [BROWSEUI.129]
|
||||
*/
|
||||
extern "C" IUnknown *WINAPI ChannelBand_Create(LPITEMIDLIST pidl)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Channels_SetBandInfoSFB [BROWSEUI.130]
|
||||
*/
|
||||
extern "C" HRESULT WINAPI Channels_SetBandInfoSFB(IUnknown *param8)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* IUnknown_SetBandInfoSFB [BROWSEUI.131]
|
||||
*/
|
||||
extern "C" HRESULT WINAPI IUnknown_SetBandInfoSFB(IUnknown *param8, long paramC)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Channel_QuickLaunch [BROWSEUI.133]
|
||||
*/
|
||||
extern "C" HRESULT WINAPI Channel_QuickLaunch()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHGetNavigateTarget [BROWSEUI.134]
|
||||
*/
|
||||
extern "C" HRESULT WINAPI SHGetNavigateTarget(long param8, long paramC, long param10, long param14)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* GetInfoTip [BROWSEUI.135]
|
||||
*/
|
||||
extern "C" HRESULT WINAPI GetInfoTip(IUnknown *param8, long paramC, LPTSTR *param10, long cchMax)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHEnumClassesOfCategories [BROWSEUI.136]
|
||||
*/
|
||||
extern "C" HRESULT WINAPI SHEnumClassesOfCategories(long param8, long paramC, long param10, long param14, long param18)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHWriteClassesOfCategories [BROWSEUI.137]
|
||||
*/
|
||||
extern "C" HRESULT WINAPI SHWriteClassesOfCategories(long param8, long paramC, long param10, long param14, long param18, long param1C, long param20)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHIsExplorerBrowser [BROWSEUI.138]
|
||||
*/
|
||||
extern "C" BOOL WINAPI SHIsExplorerBrowser()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// 75FA56C1h
|
||||
// (pidl, 0, -1, 1)
|
||||
// this function should handle creating a new process if needed, but I'm leaving that out for now
|
||||
// this function always opens a new window - it does NOT check for duplicates
|
||||
/*************************************************************************
|
||||
* SHOpenNewFrame [BROWSEUI.103]
|
||||
*/
|
||||
extern "C" HRESULT WINAPI SHOpenNewFrame(LPITEMIDLIST pidl, IUnknown *paramC, long param10, long param14)
|
||||
{
|
||||
IEThreadParamBlock *parameters;
|
||||
HANDLE threadHandle;
|
||||
DWORD threadID;
|
||||
|
||||
parameters = SHCreateIETHREADPARAM(0, 1, paramC, NULL);
|
||||
if (parameters == NULL)
|
||||
{
|
||||
ILFree(pidl);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
if (paramC != NULL)
|
||||
parameters->offset10 = param10;
|
||||
parameters->directoryPIDL = pidl;
|
||||
parameters->offset4 = param14;
|
||||
threadHandle = CreateThread(NULL, 0x10000, BrowserThreadProc, parameters, 0, &threadID);
|
||||
if (threadHandle != NULL)
|
||||
{
|
||||
CloseHandle(threadHandle);
|
||||
return S_OK;
|
||||
}
|
||||
SHDestroyIETHREADPARAM(parameters);
|
||||
return E_FAIL;
|
||||
}
|
661
reactos/dll/win32/browseui/commonbrowser.cpp
Normal file
661
reactos/dll/win32/browseui/commonbrowser.cpp
Normal file
|
@ -0,0 +1,661 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <exdisp.h>
|
||||
#include <exdispid.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "resource.h"
|
||||
#include "commonbrowser.h"
|
||||
|
||||
CCommonBrowser::CCommonBrowser()
|
||||
{
|
||||
}
|
||||
|
||||
CCommonBrowser::~CCommonBrowser()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetParentSite(IOleInPlaceSite **ppipsite)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetTitle(IShellView *psv, LPCWSTR pszName)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetTitle(IShellView *psv, LPWSTR pszName, DWORD cchName)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetOleObject(IOleObject **ppobjv)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetTravelLog(ITravelLog **pptl)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::ShowControlWindow(UINT id, BOOL fShow)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::IsControlWindowShown(UINT id, BOOL *pfShown)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::IEGetDisplayName(LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::IEParseDisplayName(UINT uiCP, LPCWSTR pwszPath, LPCITEMIDLIST *ppidlOut)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::DisplayParseError(HRESULT hres, LPCWSTR pwszPath)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::NavigateToPidl(LPCITEMIDLIST pidl, DWORD grfHLNF)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetNavigateState(BNSTATE bnstate)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetNavigateState(BNSTATE *pbnstate)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::NotifyRedirect(IShellView *psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::UpdateWindowList()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::UpdateBackForwardState()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetFlags(DWORD dwFlags, DWORD dwFlagMask)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetFlags(DWORD *pdwFlags)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::CanNavigateNow( void)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetPidl(LPCITEMIDLIST *ppidl)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetReferrer(LPCITEMIDLIST pidl)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
DWORD STDMETHODCALLTYPE CCommonBrowser::GetBrowserIndex()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetBrowserByIndex(DWORD dwID, IUnknown **ppunk)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetHistoryObject(IOleObject **ppole, IStream **pstm, IBindCtx **ppbc)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetHistoryObject(IOleObject *pole, BOOL fIsLocalAnchor)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::CacheOLEServer(IOleObject *pole)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetSetCodePage(VARIANT *pvarIn, VARIANT *pvarOut)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::OnHttpEquiv(IShellView *psv, BOOL fDone, VARIANT *pvarargIn, VARIANT *pvarargOut)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetPalette(HPALETTE *hpal)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::RegisterWindow(BOOL fForceRegister, int swc)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
LRESULT STDMETHODCALLTYPE CCommonBrowser::WndProcBS(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetAsDefFolderSettings()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetViewRect(RECT *prc)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::OnSize(WPARAM wParam)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::OnCreate(struct tagCREATESTRUCTW *pcs)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
LRESULT STDMETHODCALLTYPE CCommonBrowser::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::OnDestroy()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
LRESULT STDMETHODCALLTYPE CCommonBrowser::OnNotify(struct tagNMHDR *pnm)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::OnSetFocus()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::OnFrameWindowActivateBS(BOOL fActive)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::ReleaseShellView()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::ActivatePendingView()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::CreateViewWindow(IShellView *psvNew, IShellView *psvOld, LPRECT prcView, HWND *phwnd)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::CreateBrowserPropSheetExt(REFIID riid, void **ppv)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetViewWindow(HWND *phwndView)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetBaseBrowserData(LPCBASEBROWSERDATA *pbbd)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
LPBASEBROWSERDATA CCommonBrowser::PutBaseBrowserData()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::InitializeTravelLog(ITravelLog *ptl, DWORD dw)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetTopBrowser()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::Offline(int iCmd)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::AllowViewResize(BOOL f)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetActivateState(UINT u)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::UpdateSecureLockIcon(int eSecureLock)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::InitializeDownloadManager()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::InitializeTransitionSite()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_Initialize(HWND hwnd, IUnknown *pauto)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_CancelPendingNavigationAsync( void)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_CancelPendingView()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_MaySaveChanges()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_PauseOrResumeView(BOOL fPaused)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_DisableModeless()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_NavigateToPidl(LPCITEMIDLIST pidl, DWORD grfHLNF, DWORD dwFlags)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_TryShell2Rename(IShellView *psv, LPCITEMIDLIST pidlNew)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_SwitchActivationNow()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_ExecChildren(IUnknown *punkBar, BOOL fBroadcast, const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn, VARIANTARG *pvarargOut)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_SendChildren(HWND hwndBar, BOOL fBroadcast, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetFolderSetData(struct tagFolderSetData *pfsd)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_OnFocusChange(UINT itb)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::v_ShowHideChildWindows(BOOL fChildOnly)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
UINT STDMETHODCALLTYPE CCommonBrowser::_get_itbLastFocus()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_put_itbLastFocus(UINT itbLastFocus)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_UIActivateView(UINT uState)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_GetViewBorderRect(RECT *prc)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_UpdateViewRectSize()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_ResizeNextBorder(UINT itb)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_ResizeView()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_GetEffectiveClientArea(LPRECT lprectBorder, HMONITOR hmon)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
IStream *STDMETHODCALLTYPE CCommonBrowser::v_GetViewStream(LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pwszName)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LRESULT STDMETHODCALLTYPE CCommonBrowser::ForwardViewMsg(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetAcceleratorMenu(HACCEL hacc)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
int STDMETHODCALLTYPE CCommonBrowser::_GetToolbarCount()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
LPTOOLBARITEM STDMETHODCALLTYPE CCommonBrowser::_GetToolbarItem(int itb)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_SaveToolbars(IStream *pstm)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_LoadToolbars(IStream *pstm)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_CloseAndReleaseToolbars(BOOL fClose)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::v_MayGetNextToolbarFocus(LPMSG lpMsg, UINT itbNext, int citb, LPTOOLBARITEM *pptbi, HWND *phwnd)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_ResizeNextBorderHelper(UINT itb, BOOL bUseHmonitor)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
UINT STDMETHODCALLTYPE CCommonBrowser::_FindTBar(IUnknown *punkSrc)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_SetFocus(LPTOOLBARITEM ptbi, HWND hwnd, LPMSG lpMsg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::v_MayTranslateAccelerator(MSG *pmsg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_GetBorderDWHelper(IUnknown *punkSrc, LPRECT lprectBorder, BOOL bUseHmonitor)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::v_CheckZoneCrossing(LPCITEMIDLIST pidl)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::_PositionViewWindow(HWND *, RECT *)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::IEParseDisplayNameEx(unsigned int, const unsigned short *, DWORD, LPITEMIDLIST *)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::RemoveMenusSB(HMENU hmenuShared)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetStatusTextSB(LPCOLESTR pszStatusText)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::EnableModelessSB(BOOL fEnable)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::TranslateAcceleratorSB(MSG *pmsg, WORD wID)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT wFlags)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetViewStateStream(DWORD grfMode, IStream **ppStrm)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetControlWindow(UINT id, HWND *lphwnd)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SendControlMsg(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::QueryActiveShellView(struct IShellView **ppshv)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::OnViewWindowActive(struct IShellView *ppshv)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetPropertyBag(long flags, REFIID riid, void **ppvObject)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetWindow(HWND *lphwnd)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::ContextSensitiveHelp(BOOL fEnterMode)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::GetBorderDW(IUnknown* punkObj, LPRECT prcBorder)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::RequestBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::SetBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::AddToolbar(IUnknown *punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::RemoveToolbar(IUnknown *punkSrc, DWORD dwRemoveFlags)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::FindToolbar(LPCWSTR pwszItem, REFIID riid, void **ppv)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::DragLeave()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CCommonBrowser::Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
210
reactos/dll/win32/browseui/commonbrowser.h
Normal file
210
reactos/dll/win32/browseui/commonbrowser.h
Normal file
|
@ -0,0 +1,210 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77@reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _commonbrowser_h
|
||||
#define _commonbrowser_h
|
||||
|
||||
class CCommonBrowser :
|
||||
public CComCoClass<CCommonBrowser, &CLSID_ACLMulti>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IServiceProvider,
|
||||
public IOleCommandTarget,
|
||||
public IBrowserService3,
|
||||
public IShellBrowser,
|
||||
public IShellBrowserService,
|
||||
public IDockingWindowSite,
|
||||
public IDockingWindowFrame,
|
||||
public IInputObjectSite,
|
||||
public IDropTarget
|
||||
{
|
||||
private:
|
||||
public:
|
||||
CCommonBrowser();
|
||||
~CCommonBrowser();
|
||||
|
||||
// *** IServiceProvider methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
|
||||
|
||||
// *** IOleCommandTarget methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
|
||||
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
|
||||
|
||||
// *** IBrowserService methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetParentSite(IOleInPlaceSite **ppipsite);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetTitle(IShellView *psv, LPCWSTR pszName);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetTitle(IShellView *psv, LPWSTR pszName, DWORD cchName);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetOleObject(IOleObject **ppobjv);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetTravelLog(ITravelLog **pptl);
|
||||
virtual HRESULT STDMETHODCALLTYPE ShowControlWindow(UINT id, BOOL fShow);
|
||||
virtual HRESULT STDMETHODCALLTYPE IsControlWindowShown(UINT id, BOOL *pfShown);
|
||||
virtual HRESULT STDMETHODCALLTYPE IEGetDisplayName(LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags);
|
||||
virtual HRESULT STDMETHODCALLTYPE IEParseDisplayName(UINT uiCP, LPCWSTR pwszPath, LPCITEMIDLIST *ppidlOut);
|
||||
virtual HRESULT STDMETHODCALLTYPE DisplayParseError(HRESULT hres, LPCWSTR pwszPath);
|
||||
virtual HRESULT STDMETHODCALLTYPE NavigateToPidl(LPCITEMIDLIST pidl, DWORD grfHLNF);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetNavigateState(BNSTATE bnstate);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetNavigateState(BNSTATE *pbnstate);
|
||||
virtual HRESULT STDMETHODCALLTYPE NotifyRedirect(IShellView *psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse);
|
||||
virtual HRESULT STDMETHODCALLTYPE UpdateWindowList();
|
||||
virtual HRESULT STDMETHODCALLTYPE UpdateBackForwardState();
|
||||
virtual HRESULT STDMETHODCALLTYPE SetFlags(DWORD dwFlags, DWORD dwFlagMask);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetFlags(DWORD *pdwFlags);
|
||||
virtual HRESULT STDMETHODCALLTYPE CanNavigateNow();
|
||||
virtual HRESULT STDMETHODCALLTYPE GetPidl(LPCITEMIDLIST *ppidl);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetReferrer(LPCITEMIDLIST pidl);
|
||||
virtual DWORD STDMETHODCALLTYPE GetBrowserIndex();
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBrowserByIndex(DWORD dwID, IUnknown **ppunk);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetHistoryObject(IOleObject **ppole, IStream **pstm, IBindCtx **ppbc);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetHistoryObject(IOleObject *pole, BOOL fIsLocalAnchor);
|
||||
virtual HRESULT STDMETHODCALLTYPE CacheOLEServer(IOleObject *pole);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSetCodePage(VARIANT *pvarIn, VARIANT *pvarOut);
|
||||
virtual HRESULT STDMETHODCALLTYPE OnHttpEquiv(IShellView *psv, BOOL fDone, VARIANT *pvarargIn, VARIANT *pvarargOut);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetPalette(HPALETTE *hpal);
|
||||
virtual HRESULT STDMETHODCALLTYPE RegisterWindow(BOOL fForceRegister, int swc);
|
||||
|
||||
// *** IBrowserService2 methods ***
|
||||
virtual LRESULT STDMETHODCALLTYPE WndProcBS(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetAsDefFolderSettings();
|
||||
virtual HRESULT STDMETHODCALLTYPE GetViewRect(RECT *prc);
|
||||
virtual HRESULT STDMETHODCALLTYPE OnSize(WPARAM wParam);
|
||||
virtual HRESULT STDMETHODCALLTYPE OnCreate(struct tagCREATESTRUCTW *pcs);
|
||||
virtual LRESULT STDMETHODCALLTYPE OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
virtual HRESULT STDMETHODCALLTYPE OnDestroy();
|
||||
virtual LRESULT STDMETHODCALLTYPE OnNotify(struct tagNMHDR *pnm);
|
||||
virtual HRESULT STDMETHODCALLTYPE OnSetFocus();
|
||||
virtual HRESULT STDMETHODCALLTYPE OnFrameWindowActivateBS(BOOL fActive);
|
||||
virtual HRESULT STDMETHODCALLTYPE ReleaseShellView();
|
||||
virtual HRESULT STDMETHODCALLTYPE ActivatePendingView();
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateViewWindow(IShellView *psvNew, IShellView *psvOld, LPRECT prcView, HWND *phwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateBrowserPropSheetExt(REFIID riid, void **ppv);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetViewWindow(HWND *phwndView);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBaseBrowserData(LPCBASEBROWSERDATA *pbbd);
|
||||
virtual LPBASEBROWSERDATA STDMETHODCALLTYPE PutBaseBrowserData();
|
||||
virtual HRESULT STDMETHODCALLTYPE InitializeTravelLog(ITravelLog *ptl, DWORD dw);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetTopBrowser();
|
||||
virtual HRESULT STDMETHODCALLTYPE Offline(int iCmd);
|
||||
virtual HRESULT STDMETHODCALLTYPE AllowViewResize(BOOL f);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetActivateState(UINT u);
|
||||
virtual HRESULT STDMETHODCALLTYPE UpdateSecureLockIcon(int eSecureLock);
|
||||
virtual HRESULT STDMETHODCALLTYPE InitializeDownloadManager();
|
||||
virtual HRESULT STDMETHODCALLTYPE InitializeTransitionSite();
|
||||
virtual HRESULT STDMETHODCALLTYPE _Initialize(HWND hwnd, IUnknown *pauto);
|
||||
virtual HRESULT STDMETHODCALLTYPE _CancelPendingNavigationAsync();
|
||||
virtual HRESULT STDMETHODCALLTYPE _CancelPendingView();
|
||||
virtual HRESULT STDMETHODCALLTYPE _MaySaveChanges();
|
||||
virtual HRESULT STDMETHODCALLTYPE _PauseOrResumeView(BOOL fPaused);
|
||||
virtual HRESULT STDMETHODCALLTYPE _DisableModeless();
|
||||
virtual HRESULT STDMETHODCALLTYPE _NavigateToPidl(LPCITEMIDLIST pidl, DWORD grfHLNF, DWORD dwFlags);
|
||||
virtual HRESULT STDMETHODCALLTYPE _TryShell2Rename(IShellView *psv, LPCITEMIDLIST pidlNew);
|
||||
virtual HRESULT STDMETHODCALLTYPE _SwitchActivationNow();
|
||||
virtual HRESULT STDMETHODCALLTYPE _ExecChildren(IUnknown *punkBar, BOOL fBroadcast, const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn, VARIANTARG *pvarargOut);
|
||||
virtual HRESULT STDMETHODCALLTYPE _SendChildren(HWND hwndBar, BOOL fBroadcast, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetFolderSetData(struct tagFolderSetData *pfsd);
|
||||
virtual HRESULT STDMETHODCALLTYPE _OnFocusChange(UINT itb);
|
||||
virtual HRESULT STDMETHODCALLTYPE v_ShowHideChildWindows(BOOL fChildOnly);
|
||||
virtual UINT STDMETHODCALLTYPE _get_itbLastFocus();
|
||||
virtual HRESULT STDMETHODCALLTYPE _put_itbLastFocus(UINT itbLastFocus);
|
||||
virtual HRESULT STDMETHODCALLTYPE _UIActivateView(UINT uState);
|
||||
virtual HRESULT STDMETHODCALLTYPE _GetViewBorderRect(RECT *prc);
|
||||
virtual HRESULT STDMETHODCALLTYPE _UpdateViewRectSize();
|
||||
virtual HRESULT STDMETHODCALLTYPE _ResizeNextBorder(UINT itb);
|
||||
virtual HRESULT STDMETHODCALLTYPE _ResizeView();
|
||||
virtual HRESULT STDMETHODCALLTYPE _GetEffectiveClientArea(LPRECT lprectBorder, HMONITOR hmon);
|
||||
virtual IStream *STDMETHODCALLTYPE v_GetViewStream(LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pwszName);
|
||||
virtual LRESULT STDMETHODCALLTYPE ForwardViewMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetAcceleratorMenu(HACCEL hacc);
|
||||
virtual int STDMETHODCALLTYPE _GetToolbarCount();
|
||||
virtual LPTOOLBARITEM STDMETHODCALLTYPE _GetToolbarItem(int itb);
|
||||
virtual HRESULT STDMETHODCALLTYPE _SaveToolbars(IStream *pstm);
|
||||
virtual HRESULT STDMETHODCALLTYPE _LoadToolbars(IStream *pstm);
|
||||
virtual HRESULT STDMETHODCALLTYPE _CloseAndReleaseToolbars(BOOL fClose);
|
||||
virtual HRESULT STDMETHODCALLTYPE v_MayGetNextToolbarFocus(LPMSG lpMsg, UINT itbNext, int citb, LPTOOLBARITEM *pptbi, HWND *phwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE _ResizeNextBorderHelper(UINT itb, BOOL bUseHmonitor);
|
||||
virtual UINT STDMETHODCALLTYPE _FindTBar(IUnknown *punkSrc);
|
||||
virtual HRESULT STDMETHODCALLTYPE _SetFocus(LPTOOLBARITEM ptbi, HWND hwnd, LPMSG lpMsg);
|
||||
virtual HRESULT STDMETHODCALLTYPE v_MayTranslateAccelerator(MSG *pmsg);
|
||||
virtual HRESULT STDMETHODCALLTYPE _GetBorderDWHelper(IUnknown *punkSrc, LPRECT lprectBorder, BOOL bUseHmonitor);
|
||||
virtual HRESULT STDMETHODCALLTYPE v_CheckZoneCrossing(LPCITEMIDLIST pidl);
|
||||
|
||||
// *** IBrowserService3 methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE _PositionViewWindow(HWND *, RECT *);
|
||||
virtual HRESULT STDMETHODCALLTYPE IEParseDisplayNameEx(unsigned int, const unsigned short *, DWORD, LPITEMIDLIST *);
|
||||
|
||||
// *** IShellBrowser methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject);
|
||||
virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR pszStatusText);
|
||||
virtual HRESULT STDMETHODCALLTYPE EnableModelessSB(BOOL fEnable);
|
||||
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB(MSG *pmsg, WORD wID);
|
||||
virtual HRESULT STDMETHODCALLTYPE BrowseObject(LPCITEMIDLIST pidl, UINT wFlags);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetViewStateStream(DWORD grfMode, IStream **ppStrm);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetControlWindow(UINT id, HWND *lphwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE SendControlMsg(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret);
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryActiveShellView(struct IShellView **ppshv);
|
||||
virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive(struct IShellView *ppshv);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags);
|
||||
|
||||
// *** IShellBowserService methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetPropertyBag(long flags, REFIID riid, void **ppvObject);
|
||||
|
||||
// *** IOleWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
|
||||
|
||||
// *** IDockingWindowSite methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBorderDW(IUnknown* punkObj, LPRECT prcBorder);
|
||||
virtual HRESULT STDMETHODCALLTYPE RequestBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw);
|
||||
|
||||
// *** IDockingWindowFrame methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE AddToolbar(IUnknown *punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags);
|
||||
virtual HRESULT STDMETHODCALLTYPE RemoveToolbar(IUnknown *punkSrc, DWORD dwRemoveFlags);
|
||||
virtual HRESULT STDMETHODCALLTYPE FindToolbar(LPCWSTR pwszItem, REFIID riid, void **ppv);
|
||||
|
||||
// *** IInputObjectSite specific methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus);
|
||||
|
||||
// *** IDropTarget methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
|
||||
virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
|
||||
virtual HRESULT STDMETHODCALLTYPE DragLeave();
|
||||
virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_COMMONBROWSER)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(CCommonBrowser)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IBrowserService, IBrowserService)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IBrowserService2, IBrowserService2)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IBrowserService3, IBrowserService3)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IShellBrowser, IShellBrowser)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IShellBrowserService, IShellBrowserService)
|
||||
COM_INTERFACE_ENTRY2_IID(IID_IOleWindow, IOleWindow, IDockingWindowSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDockingWindowSite, IDockingWindowSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDockingWindowFrame, IDockingWindowFrame)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDropTarget, IDropTarget)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
#endif // _commonbrowser_h
|
51
reactos/dll/win32/browseui/globalfoldersettings.cpp
Normal file
51
reactos/dll/win32/browseui/globalfoldersettings.cpp
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <exdisp.h>
|
||||
#include <exdispid.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "resource.h"
|
||||
#include "globalfoldersettings.h"
|
||||
|
||||
CGlobalFolderSettings::CGlobalFolderSettings()
|
||||
{
|
||||
}
|
||||
|
||||
CGlobalFolderSettings::~CGlobalFolderSettings()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CGlobalFolderSettings::Get(DEFFOLDERSETTINGS *paramC, int param10)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CGlobalFolderSettings::Set(const DEFFOLDERSETTINGS *paramC, int param10, unsigned int param14)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
48
reactos/dll/win32/browseui/globalfoldersettings.h
Normal file
48
reactos/dll/win32/browseui/globalfoldersettings.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77@reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _globalfoldersettings_h
|
||||
#define _globalfoldersettings_h
|
||||
|
||||
class CGlobalFolderSettings :
|
||||
public CComCoClass<CGlobalFolderSettings, &CLSID_ACLMulti>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IGlobalFolderSettings
|
||||
{
|
||||
private:
|
||||
public:
|
||||
CGlobalFolderSettings();
|
||||
~CGlobalFolderSettings();
|
||||
|
||||
// *** IGlobalFolderSettings methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE Get(DEFFOLDERSETTINGS *paramC, int param10);
|
||||
virtual HRESULT STDMETHODCALLTYPE Set(const DEFFOLDERSETTINGS *paramC, int param10, unsigned int param14);
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_GLOBALFOLDERSETTINGS)
|
||||
DECLARE_NOT_AGGREGATABLE(CGlobalFolderSettings)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(CGlobalFolderSettings)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IGlobalFolderSettings, IGlobalFolderSettings)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
#endif // _globalfoldersettings_h
|
1553
reactos/dll/win32/browseui/internettoolbar.cpp
Normal file
1553
reactos/dll/win32/browseui/internettoolbar.cpp
Normal file
File diff suppressed because it is too large
Load diff
243
reactos/dll/win32/browseui/internettoolbar.h
Normal file
243
reactos/dll/win32/browseui/internettoolbar.h
Normal file
|
@ -0,0 +1,243 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _internettoolbar_h
|
||||
#define _internettoolbar_h
|
||||
|
||||
static const int gBackCommandID = 0xa121;
|
||||
static const int gForwardCommandID = 0xa122;
|
||||
static const int gUpLevelCommandID = 0xa022;
|
||||
static const int gSearchCommandID = 1003;
|
||||
static const int gFoldersCommandID = 1004;
|
||||
static const int gMoveToCommandID = 0x701f;
|
||||
static const int gCopyToCommandID = 0x701e;
|
||||
static const int gDeleteCommandID = 0x7011;
|
||||
static const int gUndoCommandID = 0x701b;
|
||||
static const int gViewsCommandID = 0x7031;
|
||||
static const int gStopCommandID = 1010;
|
||||
static const int gRefreshCommandID = 0xa220;
|
||||
static const int gHomeCommandID = 1012;
|
||||
static const int gMapDriveCommandID = 41089;
|
||||
static const int gDisconnectCommandID = 41090;
|
||||
static const int gFavoritesCommandID = 1015;
|
||||
static const int gHistoryCommandID = 1016;
|
||||
static const int gFullScreenCommandID = 1017;
|
||||
static const int gPropertiesCommandID = 0x7013;
|
||||
static const int gCutCommandID = 0x7018;
|
||||
static const int gCopyCommandID = 0x7019;
|
||||
static const int gPasteCommandID = 0x701a;
|
||||
static const int gFolderOptionsCommandID = 41251;
|
||||
|
||||
class CMenuCallback :
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IShellMenuCallback
|
||||
{
|
||||
private:
|
||||
CComPtr<IShellMenu> fFavoritesMenu;
|
||||
public:
|
||||
CMenuCallback();
|
||||
~CMenuCallback();
|
||||
|
||||
HRESULT STDMETHODCALLTYPE GetObject(LPSMDATA psmd, REFIID riid, void **ppvObject);
|
||||
public:
|
||||
// *** IShellMenuCallback methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE CallbackSM(LPSMDATA psmd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
BEGIN_COM_MAP(CMenuCallback)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IShellMenuCallback, IShellMenuCallback)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
class CInternetToolbar :
|
||||
public CWindowImpl<CInternetToolbar, CWindow, CControlWinTraits>,
|
||||
public CComCoClass<CInternetToolbar, &CLSID_InternetToolbar>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IInputObject,
|
||||
public IDockingWindow,
|
||||
public IPersistStreamInit,
|
||||
public IOleCommandTarget,
|
||||
public IDispatch,
|
||||
public IExplorerToolbar,
|
||||
public IShellChangeNotify,
|
||||
public IObjectWithSite,
|
||||
public IServiceProvider,
|
||||
public IWinEventHandler,
|
||||
public IBandSite
|
||||
{
|
||||
public:
|
||||
CComPtr<IUnknown> fSite; // our site
|
||||
HWND fMainReBar; // rebar for top of window
|
||||
bool fLocked; // is bar locked to prevent changes?
|
||||
CComPtr<IShellMenu> fMenuBar; // the menu rebar
|
||||
HWND fMenuBandWindow;
|
||||
HWND fNavigationWindow;
|
||||
CComPtr<IUnknown> fLogoBar; // the reactos logo
|
||||
CComPtr<IUnknown> fControlsBar; // navigation controls
|
||||
CComPtr<IUnknown> fNavigationBar; // address bar
|
||||
CComObject<CMenuCallback> fMenuCallback;
|
||||
CComPtr<IOleCommandTarget> fCommandTarget;
|
||||
GUID fCommandCategory;
|
||||
HWND fToolbarWindow;
|
||||
DWORD fAdviseCookie;
|
||||
CComPtr<IBandProxy> fBandProxy;
|
||||
public:
|
||||
CInternetToolbar();
|
||||
~CInternetToolbar();
|
||||
void AddDockItem(IUnknown *newItem, int bandID, int flags);
|
||||
HRESULT ReserveBorderSpace();
|
||||
HRESULT CreateMenuBar(IShellMenu **menuBar);
|
||||
HRESULT CreateBrandBand(IUnknown **logoBar);
|
||||
HRESULT CreateToolsBar(IUnknown **toolsBar);
|
||||
HRESULT CreateAddressBand(IUnknown **toolsBar);
|
||||
HRESULT LockUnlockToolbars(bool locked);
|
||||
HRESULT CommandStateChanged(bool newValue, int commandID);
|
||||
HRESULT CreateAndInitBandProxy();
|
||||
public:
|
||||
// *** IInputObject specific methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg);
|
||||
virtual HRESULT STDMETHODCALLTYPE HasFocusIO();
|
||||
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg);
|
||||
|
||||
// *** IOleWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
|
||||
|
||||
// *** IDockingWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow);
|
||||
virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved);
|
||||
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved);
|
||||
|
||||
// *** IPersist methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
|
||||
|
||||
// *** IPersistStreamInit methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE IsDirty();
|
||||
virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm);
|
||||
virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
|
||||
virtual HRESULT STDMETHODCALLTYPE InitNew();
|
||||
|
||||
// *** IOleCommandTarget methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
|
||||
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
|
||||
|
||||
// *** IDispatch methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
|
||||
virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
|
||||
|
||||
// *** IExplorerToolbar methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetCommandTarget(IUnknown *theTarget, GUID *category, long param14);
|
||||
virtual HRESULT STDMETHODCALLTYPE Unknown1();
|
||||
virtual HRESULT STDMETHODCALLTYPE AddButtons(const GUID *pguidCmdGroup, long buttonCount, TBBUTTON *buttons);
|
||||
virtual HRESULT STDMETHODCALLTYPE AddString(const GUID *pguidCmdGroup, HINSTANCE param10, LPCTSTR param14, long *param18);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetButton(const GUID *pguidCmdGroup, long param10, long param14);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetState(const GUID *pguidCmdGroup, long commandID, long *theState);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetState(const GUID *pguidCmdGroup, long commandID, long theState);
|
||||
virtual HRESULT STDMETHODCALLTYPE AddBitmap(const GUID *pguidCmdGroup, long param10, long buttonCount, TBADDBITMAP *lParam, long *newIndex, COLORREF param20);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBitmapSize(long *paramC);
|
||||
virtual HRESULT STDMETHODCALLTYPE SendToolbarMsg(const GUID *pguidCmdGroup, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *result);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetImageList(const GUID *pguidCmdGroup, HIMAGELIST param10, HIMAGELIST param14, HIMAGELIST param18);
|
||||
virtual HRESULT STDMETHODCALLTYPE ModifyButton(const GUID *pguidCmdGroup, long param10, long param14);
|
||||
|
||||
// *** IShellChangeNotify methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnChange(LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
||||
|
||||
// *** IObjectWithSite methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite);
|
||||
|
||||
// *** IServiceProvider methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
|
||||
|
||||
// *** IWinEventHandler methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult);
|
||||
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd);
|
||||
|
||||
// *** IBandSite specific methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk);
|
||||
virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID);
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState);
|
||||
virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, void **ppv);
|
||||
virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo);
|
||||
|
||||
// message handlers
|
||||
LRESULT OnTravelBack(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
|
||||
LRESULT OnTravelForward(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
|
||||
LRESULT OnUpLevel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
|
||||
LRESULT OnSearch(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
|
||||
LRESULT OnFolders(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
|
||||
LRESULT OnForwardToCommandTarget(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
|
||||
LRESULT OnMenuDropDown(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled);
|
||||
LRESULT OnQueryInsert(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled);
|
||||
LRESULT OnQueryDelete(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled);
|
||||
LRESULT OnNavigateCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnSetCursor(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnTipText(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled);
|
||||
LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
|
||||
BEGIN_MSG_MAP(CInternetToolbar)
|
||||
COMMAND_ID_HANDLER(gBackCommandID, OnTravelBack)
|
||||
COMMAND_ID_HANDLER(gForwardCommandID, OnTravelForward)
|
||||
COMMAND_ID_HANDLER(gUpLevelCommandID, OnUpLevel)
|
||||
COMMAND_ID_HANDLER(gSearchCommandID, OnSearch)
|
||||
COMMAND_ID_HANDLER(gFoldersCommandID, OnFolders)
|
||||
COMMAND_RANGE_HANDLER(0x7000, 0x7fff, OnForwardToCommandTarget)
|
||||
NOTIFY_HANDLER(0, TBN_DROPDOWN, OnMenuDropDown)
|
||||
NOTIFY_HANDLER(0, TBN_QUERYINSERT, OnQueryInsert)
|
||||
NOTIFY_HANDLER(0, TBN_QUERYDELETE, OnQueryDelete)
|
||||
MESSAGE_HANDLER(WM_COMMAND, OnNavigateCommand)
|
||||
MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu)
|
||||
MESSAGE_HANDLER(WM_SIZE, OnSize)
|
||||
MESSAGE_HANDLER(WM_SETCURSOR, OnSetCursor)
|
||||
NOTIFY_CODE_HANDLER(TTN_NEEDTEXTW, OnTipText)
|
||||
MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
|
||||
END_MSG_MAP()
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_INTERNETTOOLBAR)
|
||||
DECLARE_NOT_AGGREGATABLE(CInternetToolbar)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(CInternetToolbar)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDockingWindow, IDockingWindow)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
|
||||
// COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersistStreamInit, IPersistStreamInit)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDispatch, IDispatch)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IExplorerToolbar, IExplorerToolbar)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IShellChangeNotify, IShellChangeNotify)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IBandSite, IBandSite)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
#endif // _internettoolbar_h
|
273
reactos/dll/win32/browseui/lang/en-US.rc
Normal file
273
reactos/dll/win32/browseui/lang/en-US.rc
Normal file
|
@ -0,0 +1,273 @@
|
|||
/*
|
||||
* Copyright 2009 Andrew Hill
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menus
|
||||
//
|
||||
|
||||
IDM_CABINET_CONTEXTMENU MENUEX
|
||||
BEGIN
|
||||
POPUP "", 264,MFT_STRING,MFS_ENABLED
|
||||
BEGIN
|
||||
MENUITEM "&Standard Buttons", IDM_TOOLBARS_STANDARDBUTTONS,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&Address Bar", IDM_TOOLBARS_ADDRESSBAR,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&Links", IDM_TOOLBARS_LINKSBAR,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Lock the Tool&bars", IDM_TOOLBARS_LOCKTOOLBARS,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&Customize...", IDM_TOOLBARS_CUSTOMIZE,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&Text Labels", IDM_TOOLBARS_TEXTLABELS,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&Go Button", IDM_TOOLBARS_GOBUTTON,MFT_STRING,MFS_ENABLED
|
||||
END
|
||||
END
|
||||
|
||||
IDM_CABINET_MAINMENU MENUEX
|
||||
BEGIN
|
||||
POPUP "&File", FCIDM_MENU_FILE
|
||||
BEGIN
|
||||
MENUITEM "", -1, MFT_SEPARATOR
|
||||
MENUITEM "&Close", IDM_FILE_CLOSE
|
||||
END
|
||||
POPUP "&Edit", FCIDM_MENU_EDIT
|
||||
BEGIN
|
||||
MENUITEM "", -1, MFT_SEPARATOR
|
||||
END
|
||||
POPUP "&View", FCIDM_MENU_VIEW
|
||||
BEGIN
|
||||
POPUP "&Toolbars", IDM_VIEW_TOOLBARS
|
||||
BEGIN
|
||||
MENUITEM "", -1, MFT_SEPARATOR
|
||||
END
|
||||
MENUITEM "Status &Bar", IDM_VIEW_STATUSBAR
|
||||
POPUP "&Explorer Bar", IDM_VIEW_EXPLORERBAR
|
||||
BEGIN
|
||||
MENUITEM "&Search\tCtrl+E", IDM_EXPLORERBAR_SEARCH
|
||||
MENUITEM "&Favorites\tCtrl+I", IDM_EXPLORERBAR_FAVORITES
|
||||
MENUITEM "&Media", IDM_EXPLORERBAR_MEDIA
|
||||
MENUITEM "&History\tCtrl+H", IDM_EXPLORERBAR_HISTORY
|
||||
MENUITEM "F&olders", IDM_EXPLORERBAR_FOLDERS
|
||||
MENUITEM "", IDM_EXPLORERBAR_SEPARATOR
|
||||
END
|
||||
MENUITEM "", FCIDM_MENU_VIEW_SEP_OPTIONS, MFT_SEPARATOR
|
||||
POPUP "G&o To", FCIDM_MENU_EXPLORE
|
||||
BEGIN
|
||||
MENUITEM "&Back\tAlt+Left Arrow", IDM_GOTO_BACK
|
||||
MENUITEM "&Forward\tAlt+Right Arrow", IDM_GOTO_FORWARD
|
||||
MENUITEM "&Up One Level", IDM_GOTO_UPONELEVEL
|
||||
MENUITEM "", -1, MFT_SEPARATOR
|
||||
MENUITEM "&Home Page\tAlt+Home", IDM_GOTO_HOMEPAGE
|
||||
END
|
||||
MENUITEM "&Refresh", IDM_VIEW_REFRESH
|
||||
END
|
||||
POPUP "F&avorites", FCIDM_MENU_FAVORITES
|
||||
BEGIN
|
||||
MENUITEM "&Add to Favorites...", IDM_FAVORITES_ADDTOFAVORITES
|
||||
MENUITEM "&Organize Favorites...", IDM_FAVORITES_ORGANIZEFAVORITES
|
||||
MENUITEM "", -1, MFT_SEPARATOR
|
||||
MENUITEM "(Empty)", IDM_FAVORITES_EMPTY
|
||||
END
|
||||
POPUP "&Tools", FCIDM_MENU_TOOLS
|
||||
BEGIN
|
||||
MENUITEM "Map &Network Drive...", IDM_TOOLS_MAPNETWORKDRIVE
|
||||
MENUITEM "&Disconnect Network Drive...", IDM_TOOLS_DISCONNECTNETWORKDRIVE
|
||||
MENUITEM "&Synchronize...", IDM_TOOLS_SYNCHRONIZE
|
||||
MENUITEM "", -1, MFT_SEPARATOR
|
||||
MENUITEM "Folder &Options...", IDM_TOOLS_FOLDEROPTIONS
|
||||
END
|
||||
POPUP "&Help", FCIDM_MENU_HELP
|
||||
BEGIN
|
||||
MENUITEM "Is this copy of ReactOS &legal?", IDM_HELP_ISTHISCOPYLEGAL
|
||||
MENUITEM "&About ReactOS", IDM_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialogs
|
||||
//
|
||||
|
||||
IDD_CUSTOMIZETOOLBAREX DIALOGEX 0, 0, 357, 33
|
||||
STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CAPTION
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "Te&xt options:",-1,4,2,48,15
|
||||
COMBOBOX IDC_TEXTOPTIONS,52,0,123,57,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Ico&n options:",-1,4,20,48,15
|
||||
COMBOBOX IDC_ICONOPTIONS,52,18,123,57,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accelerator
|
||||
//
|
||||
|
||||
IDR_ACCELERATORS ACCELERATORS
|
||||
BEGIN
|
||||
VK_F5, IDM_VIEW_REFRESH, VIRTKEY, NOINVERT
|
||||
VK_F5, IDM_VIEW_REFRESH, VIRTKEY, CONTROL, NOINVERT
|
||||
"R", IDM_VIEW_REFRESH, VIRTKEY, CONTROL, NOINVERT
|
||||
VK_HOME, IDM_GOTO_HOMEPAGE, VIRTKEY, ALT, NOINVERT
|
||||
"D", IDM_FAVORITES_ADDTOFAVORITES, VIRTKEY, CONTROL, NOINVERT
|
||||
"B", IDM_FAVORITES_ORGANIZEFAVORITES, VIRTKEY, CONTROL, NOINVERT
|
||||
VK_LEFT, IDM_GOTO_BACK, VIRTKEY, ALT
|
||||
VK_RIGHT, IDM_GOTO_FORWARD, VIRTKEY, ALT
|
||||
"W", IDM_FILE_CLOSE, VIRTKEY, CONTROL, NOINVERT
|
||||
"E", IDM_EXPLORERBAR_SEARCH, VIRTKEY, CONTROL, NOINVERT
|
||||
"I", IDM_EXPLORERBAR_FAVORITES, VIRTKEY, CONTROL, NOINVERT
|
||||
"H", IDM_EXPLORERBAR_HISTORY, VIRTKEY, CONTROL, NOINVERT
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Strings
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
800 "Contains commands for manipulating the selected items."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
864 "Contains edit commands."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
928 "Contains commands for manipulating the view."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
992 "Contains tools commands."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
1056 "Contains commands for displaying Help."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
9025 "Closes the window."
|
||||
9026 "Goes up one level."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
9121 "Connects to a network drive."
|
||||
9122 "Disconnects from a network drive."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
9250 "Displays program information, version number, and copyright."
|
||||
9252 "Displays information for debugging."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
9281 "Goes to the previous page."
|
||||
9282 "Goes to the next page."
|
||||
9283 "Enables you to change settings."
|
||||
9285 "Goes to your home page."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
9362 "Opens the Favorites folder."
|
||||
9363 "Adds the current page to your Favorites list."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
9505 "Shows or hides toolbars."
|
||||
9506 "Shows or hides the status bar."
|
||||
9508 "Displays the Standard Buttons toolbar."
|
||||
9509 "Displays the Address bar."
|
||||
9510 "Displays the Quick Links bar."
|
||||
9516 "Locks the sizes and positions of the toolbars."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
9533 "Customizes the toolbar."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
9552 "Shows or hides an Explorer bar."
|
||||
9553 "Shows the Search bar."
|
||||
9554 "Shows the Favorites bar."
|
||||
9555 "Shows the History bar."
|
||||
9557 "Shows the Folders bar."
|
||||
9559 "Shows the Media Bar."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SMALLICONS "Small icons"
|
||||
IDS_LARGEICONS "Large icons"
|
||||
IDS_SHOWTEXTLABELS "Show text labels"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_NOTEXTLABELS "No text labels"
|
||||
IDS_SELECTIVETEXTONRIGHT "Selective text on right"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_GOBUTTONLABEL "|Go||"
|
||||
IDS_GOBUTTONTIPTEMPLATE "Go to ""%s"""
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEARCHLABEL "Search"
|
||||
IDS_ADDRESSBANDLABEL "A&ddress"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_FOLDERSLABEL "Folders"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_HISTORYTEXT "&History\tCtrl+H"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_UP "Up"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_BACK "Back"
|
||||
IDS_FORWARD "Forward"
|
||||
END
|
||||
|
||||
|
90
reactos/dll/win32/browseui/newatlinterfaces.h
Normal file
90
reactos/dll/win32/browseui/newatlinterfaces.h
Normal file
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _newatlinteraces_h
|
||||
#define _newatlinteraces_h
|
||||
|
||||
template<class T>
|
||||
class IProfferServiceImpl : public IProfferService
|
||||
{
|
||||
public:
|
||||
STDMETHODIMP ProfferService(REFGUID rguidService, IServiceProvider *psp, DWORD *pdwCookie)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP RevokeService(DWORD dwCookie)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
This subclass corrects a problem with the ATL IConnectionPointImpl.
|
||||
IConnectionPointImpl queries for the exact interface that is published, but at least one
|
||||
implementor of IConnectionPoint (CShellBrowser) advertises DIID_DWebBrowserEvents,
|
||||
but fires events to IDispatch.
|
||||
*/
|
||||
template<class T, const IID *piid, class CDV = CComDynamicUnkArray>
|
||||
class MyIConnectionPointImpl : public IConnectionPointImpl<T, piid, CDV>
|
||||
{
|
||||
public:
|
||||
STDMETHODIMP Advise(IUnknown *pUnkSink, DWORD *pdwCookie)
|
||||
{
|
||||
IConnectionPointImpl<T, piid, CDV> *pThisCPImpl;
|
||||
T *pThis;
|
||||
IUnknown *adviseSink;
|
||||
DWORD newCookie;
|
||||
HRESULT hResult;
|
||||
|
||||
pThis = static_cast<T *>(this);
|
||||
pThisCPImpl = static_cast<IConnectionPointImpl<T, piid, CDV> *>(this);
|
||||
if (pdwCookie != NULL)
|
||||
*pdwCookie = 0;
|
||||
if (pUnkSink == NULL || pdwCookie == NULL)
|
||||
return E_POINTER;
|
||||
hResult = pUnkSink->QueryInterface(IID_IDispatch, (void **)&adviseSink);
|
||||
if (FAILED(hResult))
|
||||
{
|
||||
if (hResult == E_NOINTERFACE)
|
||||
return CONNECT_E_CANNOTCONNECT;
|
||||
return hResult;
|
||||
}
|
||||
pThis->Lock();
|
||||
newCookie = pThisCPImpl->m_vec.Add(adviseSink);
|
||||
pThis->Unlock();
|
||||
*pdwCookie = newCookie;
|
||||
if (newCookie != 0)
|
||||
hResult = S_OK;
|
||||
else
|
||||
{
|
||||
adviseSink->Release();
|
||||
hResult = CONNECT_E_ADVISELIMIT;
|
||||
}
|
||||
return hResult;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _newatlinteraces_h
|
|
@ -1,505 +0,0 @@
|
|||
/*
|
||||
* self-registerable dll functions for browseui.dll
|
||||
*
|
||||
* Copyright (C) 2004 Stefan Leichter
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "wingdi.h"
|
||||
#include "winreg.h"
|
||||
#include "winerror.h"
|
||||
|
||||
#include "ole2.h"
|
||||
#include "shlguid.h"
|
||||
#include "shobjidl.h" /* for IShellFolder used in undoc.h */
|
||||
#include "undoc.h" /* for CLSID_RebarBandSite */
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(browseui);
|
||||
|
||||
/*
|
||||
* Near the bottom of this file are the exported DllRegisterServer and
|
||||
* DllUnregisterServer, which make all this worthwhile.
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* interface for self-registering
|
||||
*/
|
||||
struct regsvr_interface
|
||||
{
|
||||
IID const *iid; /* NULL for end of list */
|
||||
LPCSTR name; /* can be NULL to omit */
|
||||
IID const *base_iid; /* can be NULL to omit */
|
||||
int num_methods; /* can be <0 to omit */
|
||||
CLSID const *ps_clsid; /* can be NULL to omit */
|
||||
CLSID const *ps_clsid32; /* can be NULL to omit */
|
||||
};
|
||||
|
||||
static HRESULT register_interfaces(struct regsvr_interface const *list);
|
||||
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
|
||||
|
||||
struct regsvr_coclass
|
||||
{
|
||||
CLSID const *clsid; /* NULL for end of list */
|
||||
LPCSTR name; /* can be NULL to omit */
|
||||
LPCSTR ips; /* can be NULL to omit */
|
||||
LPCSTR ips32; /* can be NULL to omit */
|
||||
LPCSTR ips32_tmodel; /* can be NULL to omit */
|
||||
LPCSTR progid; /* can be NULL to omit */
|
||||
LPCSTR viprogid; /* can be NULL to omit */
|
||||
LPCSTR progid_extra; /* can be NULL to omit */
|
||||
};
|
||||
|
||||
static HRESULT register_coclasses(struct regsvr_coclass const *list);
|
||||
static HRESULT unregister_coclasses(struct regsvr_coclass const *list);
|
||||
|
||||
/***********************************************************************
|
||||
* static string constants
|
||||
*/
|
||||
static WCHAR const interface_keyname[10] = {
|
||||
'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 };
|
||||
static WCHAR const base_ifa_keyname[14] = {
|
||||
'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c',
|
||||
'e', 0 };
|
||||
static WCHAR const num_methods_keyname[11] = {
|
||||
'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 };
|
||||
static WCHAR const ps_clsid_keyname[15] = {
|
||||
'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
|
||||
'i', 'd', 0 };
|
||||
static WCHAR const ps_clsid32_keyname[17] = {
|
||||
'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
|
||||
'i', 'd', '3', '2', 0 };
|
||||
static WCHAR const clsid_keyname[6] = {
|
||||
'C', 'L', 'S', 'I', 'D', 0 };
|
||||
static WCHAR const curver_keyname[7] = {
|
||||
'C', 'u', 'r', 'V', 'e', 'r', 0 };
|
||||
static WCHAR const ips_keyname[13] = {
|
||||
'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
|
||||
0 };
|
||||
static WCHAR const ips32_keyname[15] = {
|
||||
'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
|
||||
'3', '2', 0 };
|
||||
static WCHAR const progid_keyname[7] = {
|
||||
'P', 'r', 'o', 'g', 'I', 'D', 0 };
|
||||
static WCHAR const viprogid_keyname[25] = {
|
||||
'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p',
|
||||
'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D',
|
||||
0 };
|
||||
static char const tmodel_valuename[] = "ThreadingModel";
|
||||
|
||||
/***********************************************************************
|
||||
* static helper functions
|
||||
*/
|
||||
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid);
|
||||
static LONG register_key_defvalueW(HKEY base, WCHAR const *name,
|
||||
WCHAR const *value);
|
||||
static LONG register_key_defvalueA(HKEY base, WCHAR const *name,
|
||||
char const *value);
|
||||
static LONG register_progid(WCHAR const *clsid,
|
||||
char const *progid, char const *curver_progid,
|
||||
char const *name, char const *extra);
|
||||
|
||||
/***********************************************************************
|
||||
* register_interfaces
|
||||
*/
|
||||
static HRESULT register_interfaces(struct regsvr_interface const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY interface_key;
|
||||
|
||||
res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &interface_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->iid; ++list) {
|
||||
WCHAR buf[39];
|
||||
HKEY iid_key;
|
||||
|
||||
StringFromGUID2(list->iid, buf, 39);
|
||||
res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &iid_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_interface_key;
|
||||
|
||||
if (list->name) {
|
||||
res = RegSetValueExA(iid_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)(list->name),
|
||||
strlen(list->name) + 1);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (list->base_iid) {
|
||||
res = register_key_guid(iid_key, base_ifa_keyname, list->base_iid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (0 <= list->num_methods) {
|
||||
static WCHAR const fmt[3] = { '%', 'd', 0 };
|
||||
HKEY key;
|
||||
|
||||
res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
|
||||
wsprintfW(buf, fmt, list->num_methods);
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)buf,
|
||||
(lstrlenW(buf) + 1) * sizeof(WCHAR));
|
||||
RegCloseKey(key);
|
||||
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (list->ps_clsid) {
|
||||
res = register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (list->ps_clsid32) {
|
||||
res = register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
error_close_iid_key:
|
||||
RegCloseKey(iid_key);
|
||||
}
|
||||
|
||||
error_close_interface_key:
|
||||
RegCloseKey(interface_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* unregister_interfaces
|
||||
*/
|
||||
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY interface_key;
|
||||
|
||||
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0,
|
||||
KEY_READ | KEY_WRITE, &interface_key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return S_OK;
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->iid; ++list) {
|
||||
WCHAR buf[39];
|
||||
|
||||
StringFromGUID2(list->iid, buf, 39);
|
||||
res = RegDeleteTreeW(interface_key, buf);
|
||||
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
RegCloseKey(interface_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* register_coclasses
|
||||
*/
|
||||
static HRESULT register_coclasses(struct regsvr_coclass const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY coclass_key;
|
||||
|
||||
res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
|
||||
WCHAR buf[39];
|
||||
HKEY clsid_key;
|
||||
|
||||
StringFromGUID2(list->clsid, buf, 39);
|
||||
res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
|
||||
if (list->name) {
|
||||
res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)(list->name),
|
||||
strlen(list->name) + 1);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->ips) {
|
||||
res = register_key_defvalueA(clsid_key, ips_keyname, list->ips);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->ips32) {
|
||||
HKEY ips32_key;
|
||||
|
||||
res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL,
|
||||
&ips32_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
|
||||
res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)list->ips32,
|
||||
lstrlenA(list->ips32) + 1);
|
||||
if (res == ERROR_SUCCESS && list->ips32_tmodel)
|
||||
res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ,
|
||||
(CONST BYTE*)list->ips32_tmodel,
|
||||
strlen(list->ips32_tmodel) + 1);
|
||||
RegCloseKey(ips32_key);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->progid) {
|
||||
res = register_key_defvalueA(clsid_key, progid_keyname,
|
||||
list->progid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
|
||||
res = register_progid(buf, list->progid, NULL,
|
||||
list->name, list->progid_extra);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->viprogid) {
|
||||
res = register_key_defvalueA(clsid_key, viprogid_keyname,
|
||||
list->viprogid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
|
||||
res = register_progid(buf, list->viprogid, list->progid,
|
||||
list->name, list->progid_extra);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
error_close_clsid_key:
|
||||
RegCloseKey(clsid_key);
|
||||
}
|
||||
|
||||
error_close_coclass_key:
|
||||
RegCloseKey(coclass_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* unregister_coclasses
|
||||
*/
|
||||
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY coclass_key;
|
||||
|
||||
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0,
|
||||
KEY_READ | KEY_WRITE, &coclass_key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return S_OK;
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
|
||||
WCHAR buf[39];
|
||||
|
||||
StringFromGUID2(list->clsid, buf, 39);
|
||||
res = RegDeleteTreeW(coclass_key, buf);
|
||||
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
|
||||
if (list->progid) {
|
||||
res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid);
|
||||
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
}
|
||||
|
||||
if (list->viprogid) {
|
||||
res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid);
|
||||
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
}
|
||||
}
|
||||
|
||||
error_close_coclass_key:
|
||||
RegCloseKey(coclass_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* regsvr_key_guid
|
||||
*/
|
||||
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
|
||||
{
|
||||
WCHAR buf[39];
|
||||
|
||||
StringFromGUID2(guid, buf, 39);
|
||||
return register_key_defvalueW(base, name, buf);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* regsvr_key_defvalueW
|
||||
*/
|
||||
static LONG register_key_defvalueW(
|
||||
HKEY base,
|
||||
WCHAR const *name,
|
||||
WCHAR const *value)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegCreateKeyExW(base, name, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
|
||||
(lstrlenW(value) + 1) * sizeof(WCHAR));
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* regsvr_key_defvalueA
|
||||
*/
|
||||
static LONG register_key_defvalueA(
|
||||
HKEY base,
|
||||
WCHAR const *name,
|
||||
char const *value)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegCreateKeyExW(base, name, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
|
||||
lstrlenA(value) + 1);
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* regsvr_progid
|
||||
*/
|
||||
static LONG register_progid(
|
||||
WCHAR const *clsid,
|
||||
char const *progid,
|
||||
char const *curver_progid,
|
||||
char const *name,
|
||||
char const *extra)
|
||||
{
|
||||
LONG res;
|
||||
HKEY progid_key;
|
||||
|
||||
res = RegCreateKeyExA(HKEY_CLASSES_ROOT, progid, 0,
|
||||
NULL, 0, KEY_READ | KEY_WRITE, NULL,
|
||||
&progid_key, NULL);
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
|
||||
if (name) {
|
||||
res = RegSetValueExA(progid_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)name, strlen(name) + 1);
|
||||
if (res != ERROR_SUCCESS) goto error_close_progid_key;
|
||||
}
|
||||
|
||||
if (clsid) {
|
||||
res = register_key_defvalueW(progid_key, clsid_keyname, clsid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_progid_key;
|
||||
}
|
||||
|
||||
if (curver_progid) {
|
||||
res = register_key_defvalueA(progid_key, curver_keyname,
|
||||
curver_progid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_progid_key;
|
||||
}
|
||||
|
||||
if (extra) {
|
||||
HKEY extra_key;
|
||||
|
||||
res = RegCreateKeyExA(progid_key, extra, 0,
|
||||
NULL, 0, KEY_READ | KEY_WRITE, NULL,
|
||||
&extra_key, NULL);
|
||||
if (res == ERROR_SUCCESS)
|
||||
RegCloseKey(extra_key);
|
||||
}
|
||||
|
||||
error_close_progid_key:
|
||||
RegCloseKey(progid_key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* coclass list
|
||||
*/
|
||||
static struct regsvr_coclass const coclass_list[] = {
|
||||
{
|
||||
&CLSID_ACLMulti,
|
||||
"Multiple AutoComplete List Container",
|
||||
NULL,
|
||||
"browseui.dll",
|
||||
"Apartment"
|
||||
},
|
||||
{
|
||||
&CLSID_RebarBandSite,
|
||||
"Shell Rebar Band Site",
|
||||
NULL,
|
||||
"browseui.dll",
|
||||
"Apartment"
|
||||
},
|
||||
{
|
||||
&CLSID_IShellBandSiteMenu,
|
||||
"Band Site Menu",
|
||||
NULL,
|
||||
"browseui.dll",
|
||||
"Apartment"
|
||||
},
|
||||
{ NULL } /* list terminator */
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* interface list
|
||||
*/
|
||||
|
||||
static struct regsvr_interface const interface_list[] = {
|
||||
{ NULL } /* list terminator */
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (HHCTRL.@)
|
||||
*/
|
||||
HRESULT WINAPI DllRegisterServer(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
hr = register_coclasses(coclass_list);
|
||||
if (SUCCEEDED(hr))
|
||||
hr = register_interfaces(interface_list);
|
||||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllUnregisterServer (HHCTRL.@)
|
||||
*/
|
||||
HRESULT WINAPI DllUnregisterServer(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
hr = unregister_coclasses(coclass_list);
|
||||
if (SUCCEEDED(hr))
|
||||
hr = unregister_interfaces(interface_list);
|
||||
return hr;
|
||||
}
|
71
reactos/dll/win32/browseui/regtreeoptions.cpp
Normal file
71
reactos/dll/win32/browseui/regtreeoptions.cpp
Normal file
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <exdisp.h>
|
||||
#include <exdispid.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "resource.h"
|
||||
#include "regtreeoptions.h"
|
||||
|
||||
CRegTreeOptions::CRegTreeOptions()
|
||||
{
|
||||
}
|
||||
|
||||
CRegTreeOptions::~CRegTreeOptions()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CRegTreeOptions::InitTree(HWND paramC, HKEY param10, char const *param14, char const *param18)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CRegTreeOptions::WalkTree(WALK_TREE_CMD paramC)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CRegTreeOptions::ToggleItem(HTREEITEM paramC)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CRegTreeOptions::ShowHelp(HTREEITEM paramC, unsigned long param10)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CRegTreeOptions::SetSite(IUnknown *pUnkSite)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CRegTreeOptions::GetSite(REFIID riid, void **ppvSite)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
56
reactos/dll/win32/browseui/regtreeoptions.h
Normal file
56
reactos/dll/win32/browseui/regtreeoptions.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _regtreeoptions_h
|
||||
#define _regtreeoptions_h
|
||||
|
||||
class CRegTreeOptions :
|
||||
public CComCoClass<CRegTreeOptions, &CLSID_ACLMulti>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IRegTreeOptions,
|
||||
public IObjectWithSite
|
||||
{
|
||||
private:
|
||||
public:
|
||||
CRegTreeOptions();
|
||||
~CRegTreeOptions();
|
||||
|
||||
// *** IRegTreeOptions methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE InitTree(HWND paramC, HKEY param10, char const *param14, char const *param18);
|
||||
virtual HRESULT STDMETHODCALLTYPE WalkTree(WALK_TREE_CMD paramC);
|
||||
virtual HRESULT STDMETHODCALLTYPE ToggleItem(HTREEITEM paramC);
|
||||
virtual HRESULT STDMETHODCALLTYPE ShowHelp(HTREEITEM paramC, unsigned long param10);
|
||||
|
||||
// *** IObjectWithSite methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite);
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_REGTREEOPTIONS)
|
||||
DECLARE_NOT_AGGREGATABLE(CRegTreeOptions)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(CRegTreeOptions)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IRegTreeOptions, IRegTreeOptions)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
#endif // _regtreeoptions_h
|
18
reactos/dll/win32/browseui/res/addressband.rgs
Normal file
18
reactos/dll/win32/browseui/res/addressband.rgs
Normal file
|
@ -0,0 +1,18 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
val MenuTextPUI = s '@browseui.dll,-13137'
|
||||
ForceRemove {01E04581-4EEE-11d0-BFE9-00AA005B4383} = s '&Address'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'Implemented Categories'
|
||||
{
|
||||
{00021492-0000-0000-C000-000000000046}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
reactos/dll/win32/browseui/res/addresseditbox.rgs
Normal file
13
reactos/dll/win32/browseui/res/addresseditbox.rgs
Normal file
|
@ -0,0 +1,13 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {A08C11D2-A228-11d0-825B-00AA005B4383} = s 'Address EditBox'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
reactos/dll/win32/browseui/res/autocompletecontainer.rgs
Normal file
13
reactos/dll/win32/browseui/res/autocompletecontainer.rgs
Normal file
|
@ -0,0 +1,13 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {00BB2765-6A77-11D0-A535-00C04FD7D062} = s 'ReactOS Multiple AutoComplete List Container'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
reactos/dll/win32/browseui/res/bandproxy.rgs
Normal file
13
reactos/dll/win32/browseui/res/bandproxy.rgs
Normal file
|
@ -0,0 +1,13 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {F61FFEC1-754F-11d0-80CA-00AA005B4383} = s 'BandProxy'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
reactos/dll/win32/browseui/res/bandsitemenu.rgs
Normal file
13
reactos/dll/win32/browseui/res/bandsitemenu.rgs
Normal file
|
@ -0,0 +1,13 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {ECD4FC4E-521C-11D0-B792-00A0C90312E1} = s 'Shell Band Site Menu'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
reactos/dll/win32/browseui/res/brandband.rgs
Normal file
13
reactos/dll/win32/browseui/res/brandband.rgs
Normal file
|
@ -0,0 +1,13 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {22BF0C20-6DA7-11D0-B373-00A0C9034938} = s 'Download Status'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
reactos/dll/win32/browseui/res/commonbrowser.rgs
Normal file
13
reactos/dll/win32/browseui/res/commonbrowser.rgs
Normal file
|
@ -0,0 +1,13 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {AF604EFE-8897-11D1-B944-00A0C90312E1} = s 'ReactOS Common Browser Architecture'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
reactos/dll/win32/browseui/res/globalfoldersettings.rgs
Normal file
13
reactos/dll/win32/browseui/res/globalfoldersettings.rgs
Normal file
|
@ -0,0 +1,13 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {EF8AD2D1-AE36-11D1-B2D2-006097DF8C11} = s 'Global Folder Settings'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
reactos/dll/win32/browseui/res/internettoolbar.rgs
Normal file
13
reactos/dll/win32/browseui/res/internettoolbar.rgs
Normal file
|
@ -0,0 +1,13 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {5E6AB780-7743-11CF-A12B-00AA004AE837} = s 'ReactOS Internet Toolbar'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
reactos/dll/win32/browseui/res/rebarbandsite.rgs
Normal file
13
reactos/dll/win32/browseui/res/rebarbandsite.rgs
Normal file
|
@ -0,0 +1,13 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {ECD4FC4D-521C-11D0-B792-00A0C90312E1} = s 'Shell Rebar BandSite'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
reactos/dll/win32/browseui/res/regtreeoptions.rgs
Normal file
13
reactos/dll/win32/browseui/res/regtreeoptions.rgs
Normal file
|
@ -0,0 +1,13 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {AF4F6510-F982-11d0-8595-00AA004CD6D8} = s 'Registry Tree Options Utility'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
100
reactos/dll/win32/browseui/resource.h
Normal file
100
reactos/dll/win32/browseui/resource.h
Normal file
|
@ -0,0 +1,100 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define IDM_FILE_CLOSE 0xA021
|
||||
#define IDM_FILE_EXPLORE_MENU 0xA027
|
||||
#define IDM_EXPLORE_ITEM_FIRST 0xA470
|
||||
#define IDM_EXPLORE_ITEM_LAST 0xA570
|
||||
#define IDM_FILE_EXPLORE_SEP 0xA028
|
||||
#define IDM_VIEW_TOOLBARS 0xA201
|
||||
#define IDM_TOOLBARS_STANDARDBUTTONS 0xA204
|
||||
#define IDM_TOOLBARS_ADDRESSBAR 0xA205
|
||||
#define IDM_TOOLBARS_LINKSBAR 0xA206
|
||||
#define IDM_TOOLBARS_LOCKTOOLBARS 0xA20C
|
||||
#define IDM_TOOLBARS_CUSTOMIZE 0xA21D
|
||||
#define IDM_TOOLBARS_TEXTLABELS 0xA207
|
||||
#define IDM_TOOLBARS_GOBUTTON 0xA20B
|
||||
#define IDM_VIEW_STATUSBAR 0xA202
|
||||
#define IDM_VIEW_EXPLORERBAR 0xA230
|
||||
#define IDM_EXPLORERBAR_SEARCH 0xA231
|
||||
#define IDM_EXPLORERBAR_FAVORITES 0xA232
|
||||
#define IDM_EXPLORERBAR_MEDIA 0xA237
|
||||
#define IDM_EXPLORERBAR_HISTORY 0xA233
|
||||
#define IDM_EXPLORERBAR_FOLDERS 0xA235
|
||||
#define IDM_EXPLORERBAR_SEPARATOR 0xA23B
|
||||
#define IDM_GOTO_BACK 0xA121
|
||||
#define IDM_GOTO_FORWARD 0xA122
|
||||
#define IDM_GOTO_UPONELEVEL 0xA022
|
||||
#define IDM_GOTO_HOMEPAGE 0xA125
|
||||
#define IDM_VIEW_REFRESH 0xA220
|
||||
#define IDM_FAVORITES_ADDTOFAVORITES 0xA173
|
||||
#define IDM_FAVORITES_ORGANIZEFAVORITES 0xA172
|
||||
#define IDM_FAVORITES_EMPTY 0xA17E
|
||||
#define IDM_TOOLS_MAPNETWORKDRIVE 0xA081
|
||||
#define IDM_TOOLS_DISCONNECTNETWORKDRIVE 0xA082
|
||||
#define IDM_TOOLS_SYNCHRONIZE 0xA176
|
||||
#define IDM_TOOLS_FOLDEROPTIONS 0xA123
|
||||
#define IDM_HELP_ISTHISCOPYLEGAL 0xA104
|
||||
#define IDM_HELP_ABOUT 0xA102
|
||||
|
||||
#define IDM_GOTO_TRAVEL_FIRST 0xA141
|
||||
#define IDM_GOTO_TRAVEL_LAST 0xA151
|
||||
#define IDM_GOTO_TRAVEL_SEP IDM_GOTO_TRAVEL_FIRST
|
||||
#define IDM_GOTO_TRAVEL_FIRSTTARGET IDM_GOTO_TRAVEL_FIRST+1
|
||||
#define IDM_GOTO_TRAVEL_LASTTARGET IDM_GOTO_TRAVEL_LAST
|
||||
|
||||
#define IDM_CABINET_CONTEXTMENU 103
|
||||
#define IDM_CABINET_MAINMENU 104
|
||||
|
||||
#define IDR_ACLMULTI 128
|
||||
#define IDR_ADDRESSBAND 129
|
||||
#define IDR_ADDRESSEDITBOX 130
|
||||
#define IDR_BANDPROXY 131
|
||||
#define IDR_BANDSITE 132
|
||||
#define IDR_BANDSITEMENU 133
|
||||
#define IDR_BRANDBAND 134
|
||||
#define IDR_COMMONBROWSER 135
|
||||
#define IDR_INTERNETTOOLBAR 136
|
||||
#define IDR_GLOBALFOLDERSETTINGS 137
|
||||
#define IDR_REGTREEOPTIONS 138
|
||||
|
||||
#define IDS_SMALLICONS 12301
|
||||
#define IDS_LARGEICONS 12302
|
||||
#define IDS_SHOWTEXTLABELS 12303
|
||||
#define IDS_NOTEXTLABELS 12304
|
||||
#define IDS_SELECTIVETEXTONRIGHT 12305
|
||||
#define IDS_GOBUTTONLABEL 12656
|
||||
#define IDS_GOBUTTONTIPTEMPLATE 12657
|
||||
#define IDS_SEARCHLABEL 12897
|
||||
#define IDS_ADDRESSBANDLABEL 12902
|
||||
#define IDS_FOLDERSLABEL 12919
|
||||
#define IDS_HISTORYTEXT 13169
|
||||
#define IDS_UP 58434
|
||||
#define IDS_BACK 58689
|
||||
#define IDS_FORWARD 58690
|
||||
|
||||
#define IDR_ACCELERATORS 256
|
||||
|
||||
#define IDI_CABINET 103
|
||||
|
||||
#define IDD_CUSTOMIZETOOLBAREX 256
|
||||
|
||||
#define IDC_TEXTOPTIONS 4096
|
||||
#define IDC_ICONOPTIONS 4097
|
3224
reactos/dll/win32/browseui/shellbrowser.cpp
Normal file
3224
reactos/dll/win32/browseui/shellbrowser.cpp
Normal file
File diff suppressed because it is too large
Load diff
428
reactos/dll/win32/browseui/toolsband.cpp
Normal file
428
reactos/dll/win32/browseui/toolsband.cpp
Normal file
|
@ -0,0 +1,428 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
Implements the toolbar band of a cabinet window
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
|
||||
/*
|
||||
TODO:
|
||||
**Fix GetBandInfo to calculate size correctly
|
||||
*/
|
||||
static const int gBackCommandID = 0xa121;
|
||||
static const int gForwardCommandID = 0xa122;
|
||||
static const int gUpLevelCommandID = 0xa022;
|
||||
static const int gSearchCommandID = 1003;
|
||||
static const int gFoldersCommandID = 1004;
|
||||
static const int gMoveToCommandID = 0x701f;
|
||||
static const int gCopyToCommandID = 0x701e;
|
||||
static const int gDeleteCommandID = 0x7011;
|
||||
static const int gUndoCommandID = 0x701b;
|
||||
static const int gViewsCommandID = 0x7031;
|
||||
static const int gStopCommandID = 1010;
|
||||
static const int gRefreshCommandID = 0xa220;
|
||||
static const int gHomeCommandID = 1012;
|
||||
static const int gMapDriveCommandID = 41089;
|
||||
static const int gDisconnectCommandID = 41090;
|
||||
static const int gFavoritesCommandID = 1015;
|
||||
static const int gHistoryCommandID = 1016;
|
||||
static const int gFullScreenCommandID = 1017;
|
||||
static const int gPropertiesCommandID = 0x7013;
|
||||
static const int gCutCommandID = 0x7018;
|
||||
static const int gCopyCommandID = 0x7019;
|
||||
static const int gPasteCommandID = 0x701a;
|
||||
static const int gFolderOptionsCommandID = 41251;
|
||||
|
||||
class CToolsBand :
|
||||
public CWindowImpl<CToolsBand, CWindow, CControlWinTraits>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IDeskBand,
|
||||
public IObjectWithSite,
|
||||
public IInputObject,
|
||||
public IPersistStream
|
||||
{
|
||||
private:
|
||||
IDockingWindowSite *fDockSite;
|
||||
GUID fExecCommandCategory;
|
||||
CComPtr<IOleCommandTarget> fExecCommandTarget;
|
||||
public:
|
||||
CToolsBand();
|
||||
~CToolsBand();
|
||||
public:
|
||||
// *** IDeskBand methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi);
|
||||
|
||||
// *** IObjectWithSite methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown* pUnkSite);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite);
|
||||
|
||||
// *** IOleWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
|
||||
|
||||
// *** IDockingWindow methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved);
|
||||
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved);
|
||||
virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow);
|
||||
|
||||
// *** IInputObject methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE HasFocusIO();
|
||||
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg);
|
||||
virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg);
|
||||
|
||||
// *** IPersist methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
|
||||
|
||||
// *** IPersistStream methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE IsDirty();
|
||||
virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm);
|
||||
virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
|
||||
|
||||
// message handlers
|
||||
LRESULT OnGetButtonInfo(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled);
|
||||
|
||||
BEGIN_MSG_MAP(CToolsBand)
|
||||
// MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
|
||||
// MESSAGE_HANDLER(WM_KILLFOCUS, OnKillFocus)
|
||||
NOTIFY_HANDLER(0, TBN_GETBUTTONINFOW, OnGetButtonInfo)
|
||||
END_MSG_MAP()
|
||||
|
||||
BEGIN_COM_MAP(CToolsBand)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IDockingWindow, IDockingWindow)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
CToolsBand::CToolsBand()
|
||||
{
|
||||
fDockSite = NULL;
|
||||
}
|
||||
|
||||
CToolsBand::~CToolsBand()
|
||||
{
|
||||
if (fDockSite)
|
||||
fDockSite->Release();
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi)
|
||||
{
|
||||
if (pdbi->dwMask & DBIM_MINSIZE)
|
||||
{
|
||||
pdbi->ptMinSize.x = 400;
|
||||
pdbi->ptMinSize.y = 38;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_MAXSIZE)
|
||||
{
|
||||
pdbi->ptMaxSize.x = 0;
|
||||
pdbi->ptMaxSize.y = 0;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_INTEGRAL)
|
||||
{
|
||||
pdbi->ptIntegral.x = 0;
|
||||
pdbi->ptIntegral.y = 0;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_ACTUAL)
|
||||
{
|
||||
pdbi->ptActual.x = 400;
|
||||
pdbi->ptActual.y = 38;
|
||||
}
|
||||
if (pdbi->dwMask & DBIM_TITLE)
|
||||
wcscpy(pdbi->wszTitle, L"");
|
||||
if (pdbi->dwMask & DBIM_MODEFLAGS)
|
||||
pdbi->dwModeFlags = DBIMF_UNDELETEABLE;
|
||||
if (pdbi->dwMask & DBIM_BKCOLOR)
|
||||
pdbi->crBkgnd = 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const int backImageIndex = 0;
|
||||
static const int forwardImageIndex = 1;
|
||||
static const int favoritesImageIndex = 2;
|
||||
// 3
|
||||
// 4
|
||||
static const int cutImageIndex = 5;
|
||||
static const int copyImageIndex = 6;
|
||||
static const int pasteImageIndex = 7;
|
||||
static const int undoImageIndex = 8;
|
||||
static const int redoImageIndex = 9;
|
||||
static const int deleteImageIndex = 10;
|
||||
// 11
|
||||
// 12
|
||||
// 13
|
||||
// 14
|
||||
static const int propertiesImageIndex = 15;
|
||||
// 16
|
||||
static const int searchImageIndex = 17;
|
||||
// 18
|
||||
// 19
|
||||
// 20
|
||||
// 21
|
||||
static const int viewsImageIndex = 22;
|
||||
// 23
|
||||
// 24
|
||||
// 25
|
||||
// 26
|
||||
// 27
|
||||
static const int upImageIndex = 28;
|
||||
static const int mapDriveImageIndex = 29;
|
||||
static const int disconnectImageIndex = 30;
|
||||
// 31
|
||||
static const int viewsAltImageIndex = 32; // same image as viewsImageIndex
|
||||
// 33
|
||||
// 34
|
||||
// 35
|
||||
// 36
|
||||
// 37
|
||||
static const int viewsAlt2ImageIndex = 38; // same image as viewsAltImageIndex & viewsImageIndex
|
||||
// 39
|
||||
// 40
|
||||
// 41
|
||||
// 42
|
||||
static const int foldersImageIndex = 43;
|
||||
static const int moveToImageIndex = 44;
|
||||
static const int copyToImageIndex = 45;
|
||||
static const int folderOptionsImageIndex = 46;
|
||||
|
||||
const int numShownButtons = 13;
|
||||
const int numHiddenButtons = 13;
|
||||
TBBUTTON tbButtonsAdd[numShownButtons + numHiddenButtons] =
|
||||
{
|
||||
{backImageIndex, gBackCommandID, TBSTATE_ENABLED, BTNS_DROPDOWN | BTNS_SHOWTEXT, {0}, 0, (INT_PTR)_T("Back")},
|
||||
{forwardImageIndex, gForwardCommandID, TBSTATE_ENABLED, BTNS_DROPDOWN, {0}, 0, (INT_PTR)_T("Forward")},
|
||||
{upImageIndex, gUpLevelCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Up")},
|
||||
{6, -1, TBSTATE_ENABLED, BTNS_SEP},
|
||||
{searchImageIndex, gSearchCommandID, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_SHOWTEXT, {0}, 0, (INT_PTR)_T("Search")},
|
||||
{foldersImageIndex, gFoldersCommandID, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_SHOWTEXT, {0}, 0, (INT_PTR)_T("Folders")},
|
||||
{6, -1, TBSTATE_ENABLED, BTNS_SEP},
|
||||
{moveToImageIndex, gMoveToCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Move To")},
|
||||
{copyToImageIndex, gCopyToCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Copy To")},
|
||||
{deleteImageIndex, gDeleteCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Delete")},
|
||||
{undoImageIndex, gUndoCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Undo")},
|
||||
{6, -1, TBSTATE_ENABLED, BTNS_SEP},
|
||||
{viewsImageIndex, gViewsCommandID, TBSTATE_ENABLED, BTNS_WHOLEDROPDOWN, {0}, 0, (INT_PTR)_T("Views")},
|
||||
|
||||
{0, gStopCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Stop")},
|
||||
{0, gRefreshCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Refresh")},
|
||||
{0, gHomeCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Home")},
|
||||
{mapDriveImageIndex, gMapDriveCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Map Drive")},
|
||||
{disconnectImageIndex, gDisconnectCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Disconnect")},
|
||||
{favoritesImageIndex, gFavoritesCommandID, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_SHOWTEXT, {0}, 0, (INT_PTR)_T("Favorites")},
|
||||
{0, gHistoryCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("History")},
|
||||
{0, gFullScreenCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Full Screen")},
|
||||
{propertiesImageIndex, gPropertiesCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Properties")},
|
||||
{cutImageIndex, gCutCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Cut")},
|
||||
{copyImageIndex, gCopyCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Copy")},
|
||||
{pasteImageIndex, gPasteCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Paste")},
|
||||
{folderOptionsImageIndex, gFolderOptionsCommandID, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, (INT_PTR)_T("Folder Options")},
|
||||
};
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::SetSite(IUnknown* pUnkSite)
|
||||
{
|
||||
HWND parentWindow;
|
||||
IOleWindow *oleWindow;
|
||||
HWND toolbar;
|
||||
HRESULT hResult;
|
||||
|
||||
if (fDockSite != NULL)
|
||||
fDockSite->Release();
|
||||
if (pUnkSite == NULL)
|
||||
return S_OK;
|
||||
hResult = pUnkSite->QueryInterface(IID_IDockingWindowSite, (void **)&fDockSite);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
parentWindow = NULL;
|
||||
hResult = pUnkSite->QueryInterface(IID_IOleWindow, (void **)&oleWindow);
|
||||
if (SUCCEEDED(hResult))
|
||||
{
|
||||
oleWindow->GetWindow(&parentWindow);
|
||||
oleWindow->Release();
|
||||
}
|
||||
if (!::IsWindow(parentWindow))
|
||||
return E_FAIL;
|
||||
|
||||
toolbar = CreateWindowEx(TBSTYLE_EX_DOUBLEBUFFER, TOOLBARCLASSNAMEW, _T(""), WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |
|
||||
WS_CLIPCHILDREN | TBSTYLE_TOOLTIPS | TBSTYLE_TRANSPARENT | TBSTYLE_REGISTERDROP | TBSTYLE_LIST | TBSTYLE_FLAT |
|
||||
CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NORESIZE | CCS_TOP, 0, 0, 500, 20, parentWindow, NULL,
|
||||
_AtlBaseModule.GetModuleInstance(), 0);
|
||||
if (toolbar == NULL)
|
||||
return E_FAIL;
|
||||
SubclassWindow(toolbar);
|
||||
|
||||
SendMessage(WM_USER + 100, GetSystemMetrics(SM_CXEDGE) / 2, 0);
|
||||
SendMessage(TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
|
||||
SendMessage(TB_SETMAXTEXTROWS, 1, 0);
|
||||
SendMessage(TB_SETEXTENDEDSTYLE, TBSTYLE_EX_HIDECLIPPEDBUTTONS | TBSTYLE_EX_MIXEDBUTTONS | TBSTYLE_EX_DRAWDDARROWS, TBSTYLE_EX_HIDECLIPPEDBUTTONS | TBSTYLE_EX_MIXEDBUTTONS | TBSTYLE_EX_DRAWDDARROWS);
|
||||
|
||||
HINSTANCE shell32Instance = GetModuleHandle(_T("shell32.dll"));
|
||||
HBITMAP imageBitmap = (HBITMAP)LoadImage(shell32Instance, MAKEINTRESOURCE(214), IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_CREATEDIBSECTION);
|
||||
|
||||
DIBSECTION bitmapInfo;
|
||||
GetObjectW(imageBitmap, sizeof(bitmapInfo), &bitmapInfo);
|
||||
HIMAGELIST imageList = ImageList_Create(bitmapInfo.dsBm.bmHeight, bitmapInfo.dsBm.bmHeight, ILC_COLOR32, 4, 4);
|
||||
|
||||
ImageList_Add(imageList, imageBitmap, NULL);
|
||||
DeleteObject(imageBitmap);
|
||||
|
||||
SendMessage(TB_SETIMAGELIST, 0, (LPARAM)imageList);
|
||||
|
||||
SendMessage(TB_ADDBUTTONSW, numShownButtons, (LPARAM)&tbButtonsAdd);
|
||||
|
||||
return hResult;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::GetSite(REFIID riid, void **ppvSite)
|
||||
{
|
||||
if (fDockSite == NULL)
|
||||
return E_FAIL;
|
||||
return fDockSite->QueryInterface(riid, ppvSite);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::GetWindow(HWND *lphwnd)
|
||||
{
|
||||
if (lphwnd == NULL)
|
||||
return E_POINTER;
|
||||
*lphwnd = m_hWnd;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::ContextSensitiveHelp(BOOL fEnterMode)
|
||||
{
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::CloseDW(DWORD dwReserved)
|
||||
{
|
||||
ShowDW(FALSE);
|
||||
|
||||
if (IsWindow())
|
||||
DestroyWindow();
|
||||
|
||||
m_hWnd = NULL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::ResizeBorderDW(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::ShowDW(BOOL fShow)
|
||||
{
|
||||
if (m_hWnd)
|
||||
{
|
||||
if (fShow)
|
||||
ShowWindow(SW_SHOW);
|
||||
else
|
||||
ShowWindow(SW_HIDE);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::HasFocusIO()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::TranslateAcceleratorIO(LPMSG lpMsg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::UIActivateIO(BOOL fActivate, LPMSG lpMsg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::GetClassID(CLSID *pClassID)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::IsDirty()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::Load(IStream *pStm)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::Save(IStream *pStm, BOOL fClearDirty)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CToolsBand::GetSizeMax(ULARGE_INTEGER *pcbSize)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
LRESULT CToolsBand::OnGetButtonInfo(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled)
|
||||
{
|
||||
TBNOTIFYW *pTBntf = (TBNOTIFYW *)pNMHDR;
|
||||
|
||||
if (pTBntf->iItem >= 0 && pTBntf->iItem < (numShownButtons + numHiddenButtons))
|
||||
{
|
||||
pTBntf->tbButton = tbButtonsAdd[pTBntf->iItem];
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT CreateToolsBar(REFIID riid, void **ppv)
|
||||
{
|
||||
CComObject<CToolsBand> *theMenuBar;
|
||||
HRESULT hResult;
|
||||
|
||||
if (ppv == NULL)
|
||||
return E_POINTER;
|
||||
*ppv = NULL;
|
||||
ATLTRY (theMenuBar = new CComObject<CToolsBand>);
|
||||
if (theMenuBar == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
hResult = theMenuBar->QueryInterface (riid, (void **)ppv);
|
||||
if (FAILED (hResult))
|
||||
{
|
||||
delete theMenuBar;
|
||||
return hResult;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
592
reactos/dll/win32/browseui/travellog.cpp
Normal file
592
reactos/dll/win32/browseui/travellog.cpp
Normal file
|
@ -0,0 +1,592 @@
|
|||
/*
|
||||
* ReactOS Explorer
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
Implements a class that keeps track of a PIDL history and allows
|
||||
navigation forward and backward. This really should be in shdocvw, but it
|
||||
is not registered for external instantiation, and the entire IBrowserService
|
||||
hierarchy that normally spans browseui and shdocvw are collapsed into one
|
||||
hierarchy in browseui, so I am moving it to browseui for now. If someone
|
||||
decides to refactor code later, it wouldn't be difficult to move it.
|
||||
|
||||
TODO:
|
||||
****Does original travel log update the current item in the Travel method before or after calling ITravelEntry::Invoke?
|
||||
****Change to load maximum size from registry
|
||||
****Add code to track current size
|
||||
****Fix InsertMenuEntries to not exceed limit of menu item ids provided. Perhaps the method should try to be intelligent and if there are
|
||||
too many items, center around the current item? Could cause dispatch problems...
|
||||
****Move tool tip text templates to resources
|
||||
**Simplify code in InsertMenuEntries
|
||||
Implement UpdateExternal
|
||||
Implement FindTravelEntry
|
||||
Implement Clone
|
||||
Implement Revert
|
||||
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <tchar.h>
|
||||
#include <perhist.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
|
||||
class CTravelEntry :
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public ITravelEntry
|
||||
{
|
||||
public:
|
||||
CTravelEntry *fNextEntry;
|
||||
CTravelEntry *fPreviousEntry;
|
||||
private:
|
||||
LPITEMIDLIST fPIDL;
|
||||
HGLOBAL fPersistState;
|
||||
public:
|
||||
CTravelEntry();
|
||||
~CTravelEntry();
|
||||
HRESULT GetToolTipText(IUnknown *punk, LPWSTR pwzText) const;
|
||||
long GetSize() const;
|
||||
|
||||
// *** ITravelEntry methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE Invoke(IUnknown *punk);
|
||||
virtual HRESULT STDMETHODCALLTYPE Update(IUnknown *punk, BOOL fIsLocalAnchor);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetPidl(LPITEMIDLIST *ppidl);
|
||||
|
||||
BEGIN_COM_MAP(CTravelEntry)
|
||||
COM_INTERFACE_ENTRY_IID(IID_ITravelEntry, ITravelEntry)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
class CTravelLog :
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public ITravelLog
|
||||
{
|
||||
private:
|
||||
CTravelEntry *fListHead;
|
||||
CTravelEntry *fListTail;
|
||||
CTravelEntry *fCurrentEntry;
|
||||
long fMaximumSize;
|
||||
long fCurrentSize;
|
||||
unsigned long fEntryCount;
|
||||
public:
|
||||
CTravelLog();
|
||||
~CTravelLog();
|
||||
HRESULT Initialize();
|
||||
HRESULT FindRelativeEntry(int offset, CTravelEntry **foundEntry);
|
||||
void DeleteChain(CTravelEntry *startHere);
|
||||
void AppendEntry(CTravelEntry *afterEntry, CTravelEntry *newEntry);
|
||||
public:
|
||||
|
||||
// *** ITravelLog methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE AddEntry(IUnknown *punk, BOOL fIsLocalAnchor);
|
||||
virtual HRESULT STDMETHODCALLTYPE UpdateEntry(IUnknown *punk, BOOL fIsLocalAnchor);
|
||||
virtual HRESULT STDMETHODCALLTYPE UpdateExternal(IUnknown *punk, IUnknown *punkHLBrowseContext);
|
||||
virtual HRESULT STDMETHODCALLTYPE Travel(IUnknown *punk, int iOffset);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetTravelEntry(IUnknown *punk, int iOffset, ITravelEntry **ppte);
|
||||
virtual HRESULT STDMETHODCALLTYPE FindTravelEntry(IUnknown *punk, LPCITEMIDLIST pidl, ITravelEntry **ppte);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetToolTipText(IUnknown *punk, int iOffset, int idsTemplate, LPWSTR pwzText, DWORD cchText);
|
||||
virtual HRESULT STDMETHODCALLTYPE InsertMenuEntries(IUnknown *punk, HMENU hmenu, int nPos, int idFirst, int idLast, DWORD dwFlags);
|
||||
virtual HRESULT STDMETHODCALLTYPE Clone(ITravelLog **pptl);
|
||||
virtual DWORD STDMETHODCALLTYPE CountEntries(IUnknown *punk);
|
||||
virtual HRESULT STDMETHODCALLTYPE Revert();
|
||||
|
||||
BEGIN_COM_MAP(CTravelLog)
|
||||
COM_INTERFACE_ENTRY_IID(IID_ITravelLog, ITravelLog)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
CTravelEntry::CTravelEntry()
|
||||
{
|
||||
fNextEntry = NULL;
|
||||
fPreviousEntry = NULL;
|
||||
fPIDL = NULL;
|
||||
fPersistState = NULL;
|
||||
}
|
||||
|
||||
CTravelEntry::~CTravelEntry()
|
||||
{
|
||||
ILFree(fPIDL);
|
||||
GlobalFree(fPersistState);
|
||||
}
|
||||
|
||||
HRESULT CTravelEntry::GetToolTipText(IUnknown *punk, LPWSTR pwzText) const
|
||||
{
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = ILGetDisplayNameEx(NULL, fPIDL, pwzText, ILGDN_NORMAL);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
long CTravelEntry::GetSize() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelEntry::Invoke(IUnknown *punk)
|
||||
{
|
||||
CComPtr<IPersistHistory> persistHistory;
|
||||
CComPtr<IStream> globalStream;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = punk->QueryInterface(IID_IPersistHistory, (void **)&persistHistory);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = CreateStreamOnHGlobal(fPersistState, FALSE, &globalStream);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = persistHistory->LoadHistory(globalStream, NULL);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelEntry::Update(IUnknown *punk, BOOL fIsLocalAnchor)
|
||||
{
|
||||
CComPtr<ITravelLogClient> travelLogClient;
|
||||
CComPtr<IPersistHistory> persistHistory;
|
||||
CComPtr<IStream> globalStream;
|
||||
WINDOWDATA windowData;
|
||||
HGLOBAL globalStorage;
|
||||
HRESULT hResult;
|
||||
|
||||
ILFree(fPIDL);
|
||||
fPIDL = NULL;
|
||||
GlobalFree(fPersistState);
|
||||
fPersistState = NULL;
|
||||
hResult = punk->QueryInterface(IID_ITravelLogClient, (void **)&travelLogClient);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = travelLogClient->GetWindowData(&windowData);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
fPIDL = windowData.pidl;
|
||||
// TODO: Properly free the windowData
|
||||
hResult = punk->QueryInterface(IID_IPersistHistory, (void **)&persistHistory);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
globalStorage = GlobalAlloc(GMEM_FIXED, 0);
|
||||
hResult = CreateStreamOnHGlobal(globalStorage, FALSE, &globalStream);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = persistHistory->SaveHistory(globalStream);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = GetHGlobalFromStream(globalStream, &fPersistState);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelEntry::GetPidl(LPITEMIDLIST *ppidl)
|
||||
{
|
||||
if (ppidl == NULL)
|
||||
return E_POINTER;
|
||||
*ppidl = ILClone(fPIDL);
|
||||
if (*ppidl == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CTravelLog::CTravelLog()
|
||||
{
|
||||
fListHead = NULL;
|
||||
fListTail = NULL;
|
||||
fCurrentEntry = NULL;
|
||||
fMaximumSize = 0;
|
||||
fCurrentSize = 0;
|
||||
fEntryCount = 0;
|
||||
}
|
||||
|
||||
CTravelLog::~CTravelLog()
|
||||
{
|
||||
CTravelEntry *anEntry;
|
||||
CTravelEntry *next;
|
||||
|
||||
anEntry = fListHead;
|
||||
while (anEntry != NULL)
|
||||
{
|
||||
next = anEntry->fNextEntry;
|
||||
anEntry->Release();
|
||||
anEntry = next;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CTravelLog::Initialize()
|
||||
{
|
||||
fMaximumSize = 1024 * 1024; // TODO: change to read this from registry
|
||||
// Software\Microsoft\Windows\CurrentVersion\Explorer\TravelLog
|
||||
// MaxSize
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CTravelLog::FindRelativeEntry(int offset, CTravelEntry **foundEntry)
|
||||
{
|
||||
CTravelEntry *curEntry;
|
||||
|
||||
*foundEntry = NULL;
|
||||
curEntry = fCurrentEntry;
|
||||
if (offset < 0)
|
||||
{
|
||||
while (offset < 0 && curEntry != NULL)
|
||||
{
|
||||
curEntry = curEntry->fPreviousEntry;
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (offset > 0 && curEntry != NULL)
|
||||
{
|
||||
curEntry = curEntry->fNextEntry;
|
||||
offset--;
|
||||
}
|
||||
}
|
||||
if (curEntry == NULL)
|
||||
return E_INVALIDARG;
|
||||
*foundEntry = curEntry;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTravelLog::DeleteChain(CTravelEntry *startHere)
|
||||
{
|
||||
CTravelEntry *saveNext;
|
||||
long itemSize;
|
||||
|
||||
if (startHere->fPreviousEntry != NULL)
|
||||
{
|
||||
startHere->fPreviousEntry->fNextEntry = NULL;
|
||||
fListTail = startHere->fPreviousEntry;
|
||||
}
|
||||
else
|
||||
{
|
||||
fListHead = NULL;
|
||||
fListTail = NULL;
|
||||
}
|
||||
while (startHere != NULL)
|
||||
{
|
||||
saveNext = startHere->fNextEntry;
|
||||
itemSize = startHere->GetSize();
|
||||
fCurrentSize -= itemSize;
|
||||
startHere->Release();
|
||||
startHere = saveNext;
|
||||
fEntryCount--;
|
||||
}
|
||||
}
|
||||
|
||||
void CTravelLog::AppendEntry(CTravelEntry *afterEntry, CTravelEntry *newEntry)
|
||||
{
|
||||
if (afterEntry == NULL)
|
||||
{
|
||||
fListHead = newEntry;
|
||||
fListTail = newEntry;
|
||||
}
|
||||
else
|
||||
{
|
||||
newEntry->fNextEntry = afterEntry->fNextEntry;
|
||||
afterEntry->fNextEntry = newEntry;
|
||||
newEntry->fPreviousEntry = afterEntry;
|
||||
if (newEntry->fNextEntry == NULL)
|
||||
fListTail = newEntry;
|
||||
else
|
||||
newEntry->fNextEntry->fPreviousEntry = newEntry;
|
||||
}
|
||||
fEntryCount++;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelLog::AddEntry(IUnknown *punk, BOOL fIsLocalAnchor)
|
||||
{
|
||||
CComObject<CTravelEntry> *newEntry;
|
||||
long itemSize;
|
||||
|
||||
if (punk == NULL)
|
||||
return E_INVALIDARG;
|
||||
ATLTRY (newEntry = new CComObject<CTravelEntry>);
|
||||
if (newEntry == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
newEntry->AddRef();
|
||||
if (fCurrentEntry != NULL && fCurrentEntry->fNextEntry != NULL)
|
||||
DeleteChain(fCurrentEntry->fNextEntry);
|
||||
AppendEntry(fCurrentEntry, newEntry);
|
||||
itemSize = newEntry->GetSize();
|
||||
fCurrentSize += itemSize;
|
||||
fCurrentEntry = newEntry;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelLog::UpdateEntry(IUnknown *punk, BOOL fIsLocalAnchor)
|
||||
{
|
||||
if (punk == NULL)
|
||||
return E_INVALIDARG;
|
||||
if (fCurrentEntry == NULL)
|
||||
return E_UNEXPECTED;
|
||||
return fCurrentEntry->Update(punk, fIsLocalAnchor);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelLog::UpdateExternal(IUnknown *punk, IUnknown *punkHLBrowseContext)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelLog::Travel(IUnknown *punk, int iOffset)
|
||||
{
|
||||
CTravelEntry *destinationEntry;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = FindRelativeEntry(iOffset, &destinationEntry);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
fCurrentEntry = destinationEntry;
|
||||
hResult = destinationEntry->Invoke(punk);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelLog::GetTravelEntry(IUnknown *punk, int iOffset, ITravelEntry **ppte)
|
||||
{
|
||||
CTravelEntry *destinationEntry;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = FindRelativeEntry(iOffset, &destinationEntry);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return destinationEntry->QueryInterface(IID_ITravelEntry, (void **)ppte);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelLog::FindTravelEntry(IUnknown *punk, LPCITEMIDLIST pidl, ITravelEntry **ppte)
|
||||
{
|
||||
if (ppte == NULL)
|
||||
return E_POINTER;
|
||||
if (punk == NULL || pidl == NULL)
|
||||
return E_INVALIDARG;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelLog::GetToolTipText(IUnknown *punk, int iOffset, int idsTemplate, LPWSTR pwzText, DWORD cchText)
|
||||
{
|
||||
CTravelEntry *destinationEntry;
|
||||
wchar_t tempString[MAX_PATH];
|
||||
wchar_t templateString[200];
|
||||
HRESULT hResult;
|
||||
|
||||
if (pwzText == NULL)
|
||||
return E_POINTER;
|
||||
if (punk == NULL || cchText == 0)
|
||||
return E_INVALIDARG;
|
||||
hResult = FindRelativeEntry(iOffset, &destinationEntry);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = destinationEntry->GetToolTipText(punk, tempString);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
if (iOffset < 0)
|
||||
{
|
||||
wcscpy(templateString, L"Back to %s");
|
||||
}
|
||||
else
|
||||
{
|
||||
wcscpy(templateString, L"Forward to %s");
|
||||
}
|
||||
_snwprintf(pwzText, cchText, templateString, tempString);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void FixAmpersands(wchar_t *buffer)
|
||||
{
|
||||
wchar_t tempBuffer[MAX_PATH * 2];
|
||||
wchar_t ch;
|
||||
wchar_t *srcPtr;
|
||||
wchar_t *dstPtr;
|
||||
|
||||
srcPtr = buffer;
|
||||
dstPtr = tempBuffer;
|
||||
while (*srcPtr != 0)
|
||||
{
|
||||
ch = *srcPtr++;
|
||||
*dstPtr++ = ch;
|
||||
if (ch == '&')
|
||||
*dstPtr++ = '&';
|
||||
}
|
||||
*dstPtr = 0;
|
||||
wcscpy(buffer, tempBuffer);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelLog::InsertMenuEntries(IUnknown *punk, HMENU hmenu, int nPos, int idFirst, int idLast, DWORD dwFlags)
|
||||
{
|
||||
CTravelEntry *currentItem;
|
||||
MENUITEMINFO menuItemInfo;
|
||||
wchar_t itemTextBuffer[MAX_PATH * 2];
|
||||
HRESULT hResult;
|
||||
|
||||
// TLMENUF_BACK - include back entries
|
||||
// TLMENUF_INCLUDECURRENT - include current entry, if TLMENUF_CHECKCURRENT then check the entry
|
||||
// TLMENUF_FORE - include next entries
|
||||
// if fore+back, list from oldest to newest
|
||||
// if back, list from newest to oldest
|
||||
// if fore, list from newest to oldest
|
||||
|
||||
// don't forget to patch ampersands before adding to menu
|
||||
if (punk == NULL)
|
||||
return E_INVALIDARG;
|
||||
if (idLast <= idFirst)
|
||||
return E_INVALIDARG;
|
||||
menuItemInfo.cbSize = sizeof(menuItemInfo);
|
||||
menuItemInfo.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STATE | MIIM_STRING;
|
||||
menuItemInfo.fType = MFT_STRING;
|
||||
menuItemInfo.wID = idFirst;
|
||||
menuItemInfo.fState = MFS_ENABLED;
|
||||
menuItemInfo.dwTypeData = itemTextBuffer;
|
||||
if ((dwFlags & TLMENUF_BACK) != 0)
|
||||
{
|
||||
if ((dwFlags & TLMENUF_FORE) != 0)
|
||||
{
|
||||
currentItem = fCurrentEntry;
|
||||
if (currentItem != NULL)
|
||||
{
|
||||
while (currentItem->fPreviousEntry != NULL)
|
||||
currentItem = currentItem->fPreviousEntry;
|
||||
}
|
||||
while (currentItem != fCurrentEntry)
|
||||
{
|
||||
hResult = currentItem->GetToolTipText(punk, itemTextBuffer);
|
||||
if (SUCCEEDED(hResult))
|
||||
{
|
||||
FixAmpersands(itemTextBuffer);
|
||||
if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
|
||||
{
|
||||
nPos++;
|
||||
menuItemInfo.wID++;
|
||||
}
|
||||
}
|
||||
currentItem = currentItem->fNextEntry;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currentItem = fCurrentEntry;
|
||||
if (currentItem != NULL)
|
||||
currentItem = currentItem->fPreviousEntry;
|
||||
while (currentItem != NULL)
|
||||
{
|
||||
hResult = currentItem->GetToolTipText(punk, itemTextBuffer);
|
||||
if (SUCCEEDED(hResult))
|
||||
{
|
||||
FixAmpersands(itemTextBuffer);
|
||||
if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
|
||||
{
|
||||
nPos++;
|
||||
menuItemInfo.wID++;
|
||||
}
|
||||
}
|
||||
currentItem = currentItem->fPreviousEntry;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((dwFlags & TLMENUF_INCLUDECURRENT) != 0)
|
||||
{
|
||||
if (fCurrentEntry != NULL)
|
||||
{
|
||||
hResult = fCurrentEntry->GetToolTipText(punk, itemTextBuffer);
|
||||
if (SUCCEEDED(hResult))
|
||||
{
|
||||
FixAmpersands(itemTextBuffer);
|
||||
if ((dwFlags & TLMENUF_CHECKCURRENT) != 0)
|
||||
menuItemInfo.fState |= MFS_CHECKED;
|
||||
if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
|
||||
{
|
||||
nPos++;
|
||||
menuItemInfo.wID++;
|
||||
}
|
||||
menuItemInfo.fState &= ~MFS_CHECKED;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((dwFlags & TLMENUF_FORE) != 0)
|
||||
{
|
||||
currentItem = fCurrentEntry;
|
||||
if (currentItem != NULL)
|
||||
currentItem = currentItem->fNextEntry;
|
||||
while (currentItem != NULL)
|
||||
{
|
||||
hResult = currentItem->GetToolTipText(punk, itemTextBuffer);
|
||||
if (SUCCEEDED(hResult))
|
||||
{
|
||||
FixAmpersands(itemTextBuffer);
|
||||
if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
|
||||
{
|
||||
nPos++;
|
||||
menuItemInfo.wID++;
|
||||
}
|
||||
}
|
||||
currentItem = currentItem->fNextEntry;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelLog::Clone(ITravelLog **pptl)
|
||||
{
|
||||
if (pptl == NULL)
|
||||
return E_POINTER;
|
||||
*pptl = NULL;
|
||||
// duplicate the log
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
DWORD STDMETHODCALLTYPE CTravelLog::CountEntries(IUnknown *punk)
|
||||
{
|
||||
if (punk == NULL)
|
||||
return E_INVALIDARG;
|
||||
return fEntryCount;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CTravelLog::Revert()
|
||||
{
|
||||
// remove the current entry?
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT CreateTravelLog(REFIID riid, void **ppv)
|
||||
{
|
||||
CComObject<CTravelLog> *theTravelLog;
|
||||
HRESULT hResult;
|
||||
|
||||
if (ppv == NULL)
|
||||
return E_POINTER;
|
||||
*ppv = NULL;
|
||||
ATLTRY (theTravelLog = new CComObject<CTravelLog>);
|
||||
if (theTravelLog == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
hResult = theTravelLog->QueryInterface (riid, (void **)ppv);
|
||||
if (FAILED (hResult))
|
||||
{
|
||||
delete theTravelLog;
|
||||
return hResult;
|
||||
}
|
||||
hResult = theTravelLog->Initialize();
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
return S_OK;
|
||||
}
|
14
reactos/dll/win32/browseui/utility.cpp
Normal file
14
reactos/dll/win32/browseui/utility.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include "utility.h"
|
||||
|
||||
void *operator new(size_t size)
|
||||
{
|
||||
return LocalAlloc(LMEM_ZEROINIT, size);
|
||||
}
|
||||
|
||||
void operator delete(void *p)
|
||||
{
|
||||
LocalFree(p);
|
||||
}
|
||||
|
8
reactos/dll/win32/browseui/utility.h
Normal file
8
reactos/dll/win32/browseui/utility.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
#ifndef _utility_h
|
||||
#define _utility_h
|
||||
|
||||
void *operator new(size_t size);
|
||||
void operator delete(void *p);
|
||||
|
||||
#endif // _utility_h
|
|
@ -45,7 +45,7 @@ typedef struct _SHDESK
|
|||
HWND hWnd;
|
||||
HWND hWndShellView;
|
||||
HWND hWndDesktopListView;
|
||||
IShellDesktop *ShellDesk;
|
||||
IShellDesktopTray *ShellDesk;
|
||||
IShellView *DesktopView;
|
||||
IShellBrowser *DefaultShellBrowser;
|
||||
LPITEMIDLIST pidlDesktopDirectory;
|
||||
|
@ -104,7 +104,7 @@ static void
|
|||
SHDESK_Free(SHDESK *This)
|
||||
{
|
||||
if (This->ShellDesk != NULL)
|
||||
IShellDesktop_Release(This->ShellDesk);
|
||||
IShellDesktopTray_Release(This->ShellDesk);
|
||||
|
||||
if (This->DesktopView != NULL)
|
||||
{
|
||||
|
@ -202,12 +202,12 @@ static PSHDESK
|
|||
SHDESK_Create(HWND hWnd, LPCREATESTRUCT lpCreateStruct)
|
||||
{
|
||||
IShellFolder *psfDesktopFolder;
|
||||
IShellDesktop *ShellDesk;
|
||||
IShellDesktopTray *ShellDesk;
|
||||
CSFV csfv;
|
||||
SHDESK *This;
|
||||
HRESULT hRet;
|
||||
|
||||
ShellDesk = (IShellDesktop *)lpCreateStruct->lpCreateParams;
|
||||
ShellDesk = (IShellDesktopTray *)lpCreateStruct->lpCreateParams;
|
||||
if (ShellDesk == NULL)
|
||||
{
|
||||
WARN("No IShellDesk interface provided!");
|
||||
|
@ -226,7 +226,7 @@ SHDESK_Create(HWND hWnd, LPCREATESTRUCT lpCreateStruct)
|
|||
This->Ref = 1;
|
||||
This->hWnd = hWnd;
|
||||
This->ShellDesk = ShellDesk;
|
||||
IShellDesktop_AddRef(ShellDesk);
|
||||
IShellDesktopTray_AddRef(ShellDesk);
|
||||
|
||||
This->pidlDesktopDirectory = SHCloneSpecialIDList(This->hWnd, CSIDL_DESKTOPDIRECTORY, FALSE);
|
||||
hRet = SHGetSpecialFolderLocation(This->hWnd, CSIDL_DESKTOP, &This->pidlDesktop);
|
||||
|
@ -632,7 +632,7 @@ ProgmanWindowProc(IN HWND hwnd,
|
|||
|
||||
case WM_CREATE:
|
||||
{
|
||||
IShellDesktop_RegisterDesktopWindow(This->ShellDesk,
|
||||
IShellDesktopTray_RegisterDesktopWindow(This->ShellDesk,
|
||||
This->hWnd);
|
||||
|
||||
if (!SHDESK_CreateDeskWnd(This))
|
||||
|
@ -698,7 +698,7 @@ RegisterProgmanWindowClass(VOID)
|
|||
* SHCreateDesktop [SHELL32.200]
|
||||
*
|
||||
*/
|
||||
HANDLE WINAPI SHCreateDesktop(IShellDesktop *ShellDesk)
|
||||
HANDLE WINAPI SHCreateDesktop(IShellDesktopTray *ShellDesk)
|
||||
{
|
||||
HWND hWndDesk;
|
||||
RECT rcDesk;
|
||||
|
|
|
@ -22,8 +22,10 @@
|
|||
#include <windows.h>
|
||||
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <shlwapi.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shldisp.h>
|
||||
#include <commdlg.h>
|
||||
#include <commctrl.h>
|
||||
|
|
|
@ -81,7 +81,7 @@ typedef struct {
|
|||
|
||||
#define MRUF_STRING_LIST 0
|
||||
|
||||
typedef int (WINAPI *CREATEMRULISTW)(
|
||||
typedef int (WINAPI *CREATEMRULISTPROCW)(
|
||||
LPMRUINFO lpmi
|
||||
);
|
||||
|
||||
|
@ -111,9 +111,9 @@ void LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, WCHAR * szExt);
|
|||
void InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName);
|
||||
|
||||
static HMODULE hModule = NULL;
|
||||
static CREATEMRULISTW CreateMRUListW = NULL;
|
||||
static CREATEMRULISTPROCW CreateMRUListProcW = NULL;
|
||||
static ENUMMRULISTW EnumMRUListW = NULL;
|
||||
static FREEMRULIST FreeMRUList = NULL;
|
||||
static FREEMRULIST FreeMRUListProc = NULL;
|
||||
static ADDMRUSTRINGW AddMRUStringW = NULL;
|
||||
|
||||
|
||||
|
@ -161,11 +161,11 @@ static HRESULT WINAPI SHEOWCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid
|
|||
IsEqualIID(riid, &IID_IContextMenu) ||
|
||||
IsEqualIID(riid, &IID_IContextMenu2))
|
||||
{
|
||||
*ppvObj = &This->lpVtblContextMenu;
|
||||
*ppvObj = (void *)&This->lpVtblContextMenu;
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IShellExtInit))
|
||||
{
|
||||
*ppvObj = &This->lpvtblShellExtInit;
|
||||
*ppvObj = (void *)&This->lpvtblShellExtInit;
|
||||
}
|
||||
|
||||
if(*ppvObj)
|
||||
|
@ -451,7 +451,7 @@ StoreNewSettings(LPCWSTR szFileName, WCHAR *szAppName)
|
|||
result = (*AddMRUStringW)((HANDLE)hList, szAppName);
|
||||
|
||||
/* close mru list */
|
||||
(*FreeMRUList)((HANDLE)hList);
|
||||
(*FreeMRUListProc)((HANDLE)hList);
|
||||
/* create mru list key */
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
@ -1008,12 +1008,12 @@ OpenMRUList(HKEY hKey)
|
|||
wcscat(szPath, L"comctl32.dll");
|
||||
hModule = LoadLibraryExW(szPath, NULL, 0);
|
||||
}
|
||||
CreateMRUListW = (CREATEMRULISTW)GetProcAddress(hModule, MAKEINTRESOURCEA(400));
|
||||
CreateMRUListProcW = (CREATEMRULISTPROCW)GetProcAddress(hModule, MAKEINTRESOURCEA(400));
|
||||
EnumMRUListW = (ENUMMRULISTW)GetProcAddress(hModule, MAKEINTRESOURCEA(403));
|
||||
FreeMRUList = (FREEMRULIST)GetProcAddress(hModule, MAKEINTRESOURCEA(152));
|
||||
FreeMRUListProc = (FREEMRULIST)GetProcAddress(hModule, MAKEINTRESOURCEA(152));
|
||||
AddMRUStringW = (ADDMRUSTRINGW)GetProcAddress(hModule, MAKEINTRESOURCEA(401));
|
||||
|
||||
if (!CreateMRUListW || !EnumMRUListW || !FreeMRUList || !AddMRUStringW)
|
||||
if (!CreateMRUListProcW || !EnumMRUListW || !FreeMRUListProc || !AddMRUStringW)
|
||||
return 0;
|
||||
|
||||
/* initialize mru list info */
|
||||
|
@ -1025,7 +1025,7 @@ OpenMRUList(HKEY hKey)
|
|||
info.lpfnCompare = NULL;
|
||||
|
||||
/* load list */
|
||||
return (*CreateMRUListW)(&info);
|
||||
return (*CreateMRUListProcW)(&info);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -54,7 +54,7 @@ static HRESULT WINAPI ShellItem_QueryInterface(IShellItem *iface, REFIID riid,
|
|||
}
|
||||
else if (IsEqualIID(&IID_IPersist, riid) || IsEqualIID(&IID_IPersistIDList, riid))
|
||||
{
|
||||
*ppv = &(This->lpIPersistIDListVtbl);
|
||||
*ppv = (IPersistIDListVtbl *)&(This->lpIPersistIDListVtbl);
|
||||
}
|
||||
else {
|
||||
FIXME("not implemented for %s\n", shdebugstr_guid(riid));
|
||||
|
|
|
@ -219,35 +219,35 @@ static HRESULT ShellLink_QueryInterface( IShellLinkImpl *This, REFIID riid, LPV
|
|||
}
|
||||
else if(IsEqualIID(riid, &IID_IShellLinkW))
|
||||
{
|
||||
*ppvObj = &(This->lpvtblw);
|
||||
*ppvObj = (void *)&(This->lpvtblw);
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IPersistFile))
|
||||
{
|
||||
*ppvObj = &(This->lpvtblPersistFile);
|
||||
*ppvObj = (void *)&(This->lpvtblPersistFile);
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IPersistStream))
|
||||
{
|
||||
*ppvObj = &(This->lpvtblPersistStream);
|
||||
*ppvObj = (void *)&(This->lpvtblPersistStream);
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IShellLinkDataList))
|
||||
{
|
||||
*ppvObj = &(This->lpvtblShellLinkDataList);
|
||||
*ppvObj = (void *)&(This->lpvtblShellLinkDataList);
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IShellExtInit))
|
||||
{
|
||||
*ppvObj = &(This->lpvtblShellExtInit);
|
||||
*ppvObj = (void *)&(This->lpvtblShellExtInit);
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IContextMenu))
|
||||
{
|
||||
*ppvObj = &(This->lpvtblContextMenu);
|
||||
*ppvObj = (void *)&(This->lpvtblContextMenu);
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IObjectWithSite))
|
||||
{
|
||||
*ppvObj = &(This->lpvtblObjectWithSite);
|
||||
*ppvObj = (void *)&(This->lpvtblObjectWithSite);
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IShellPropSheetExt))
|
||||
{
|
||||
*ppvObj = &(This->lpvtblPropSheetExt);
|
||||
*ppvObj = (void *)&(This->lpvtblPropSheetExt);
|
||||
}
|
||||
|
||||
if(*ppvObj)
|
||||
|
|
|
@ -1124,7 +1124,7 @@ BOOL WINAPI DAD_DragEnter(HWND hwnd)
|
|||
* DAD_DragEnterEx [SHELL32.131]
|
||||
*
|
||||
*/
|
||||
BOOL WINAPI DAD_DragEnterEx(HWND hwnd, const POINT p)
|
||||
BOOL WINAPI DAD_DragEnterEx(HWND hwnd, POINT p)
|
||||
{
|
||||
FIXME("hwnd = %p (%d,%d)\n",hwnd,p.x,p.y);
|
||||
return FALSE;
|
||||
|
|
|
@ -81,11 +81,11 @@ static HRESULT WINAPI ISF_Desktop_fnQueryInterface(
|
|||
else if (IsEqualIID (riid, &IID_IPersistFolder) ||
|
||||
IsEqualIID (riid, &IID_IPersistFolder2))
|
||||
{
|
||||
*ppvObj = &This->lpPF2;
|
||||
*ppvObj = (void *)&This->lpPF2;
|
||||
}
|
||||
else if (IsEqualIID(riid, &IID_ISFHelper))
|
||||
{
|
||||
*ppvObj = &This->lpvtblSFHelper;
|
||||
*ppvObj = (void *)&This->lpvtblSFHelper;
|
||||
}
|
||||
if (*ppvObj)
|
||||
{
|
||||
|
|
|
@ -76,7 +76,7 @@ static HRESULT WINAPI ISF_MyDocuments_fnQueryInterface(
|
|||
else if (IsEqualIID (riid, &IID_IPersistFolder) ||
|
||||
IsEqualIID (riid, &IID_IPersistFolder2))
|
||||
{
|
||||
*ppvObj = &This->lpPF2;
|
||||
*ppvObj = (void *)&This->lpPF2;
|
||||
}
|
||||
if (*ppvObj)
|
||||
{
|
||||
|
|
|
@ -119,7 +119,7 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnQueryInterface (IShellFolder2 *iface,
|
|||
IsEqualIID (riid, &IID_IPersistFolder) ||
|
||||
IsEqualIID (riid, &IID_IPersistFolder2))
|
||||
{
|
||||
*ppvObj = _IPersistFolder2_ (This);
|
||||
*ppvObj = (void *)_IPersistFolder2_ (This);
|
||||
}
|
||||
|
||||
if (*ppvObj)
|
||||
|
|
|
@ -152,16 +152,16 @@ static HRESULT WINAPI RecycleBin_QueryInterface(IShellFolder2 *iface, REFIID rii
|
|||
|
||||
if (IsEqualGUID(riid, &IID_IPersist) || IsEqualGUID(riid, &IID_IPersistFolder)
|
||||
|| IsEqualGUID(riid, &IID_IPersistFolder2))
|
||||
*ppvObject = &This->lpPersistFolderVtbl;
|
||||
*ppvObject = (void *)&This->lpPersistFolderVtbl;
|
||||
|
||||
else if (IsEqualIID(riid, &IID_IContextMenu) || IsEqualGUID(riid, &IID_IContextMenu2))
|
||||
{
|
||||
This->lpContextMenu2 = &recycleBincmVtblFolder;
|
||||
*ppvObject = &This->lpContextMenu2;
|
||||
*ppvObject = (void *)&This->lpContextMenu2;
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IShellExtInit))
|
||||
{
|
||||
*ppvObject = &(This->lpSEI);
|
||||
*ppvObject = (void *)&(This->lpSEI);
|
||||
}
|
||||
|
||||
if (*ppvObject != NULL)
|
||||
|
@ -429,7 +429,7 @@ static HRESULT WINAPI RecycleBin_CreateViewObject(IShellFolder2 *iface, HWND hwn
|
|||
else if (IsEqualIID (riid, &IID_IContextMenu) || IsEqualIID (riid, &IID_IContextMenu2))
|
||||
{
|
||||
This->lpContextMenu2 = &recycleBincmVtblFolder;
|
||||
*ppv = &This->lpContextMenu2;
|
||||
*ppv = (void *)&This->lpContextMenu2;
|
||||
This->refCount++;
|
||||
hr = S_OK;
|
||||
}
|
||||
|
|
|
@ -579,11 +579,11 @@ static HRESULT WINAPI INewItem_fnQueryInterface(INewMenuImpl * This, REFIID riid
|
|||
IsEqualIID(riid, &IID_IContextMenu) ||
|
||||
IsEqualIID(riid, &IID_IContextMenu2))
|
||||
{
|
||||
*ppvObj = &This->lpVtblContextMenu;
|
||||
*ppvObj = (void *)&This->lpVtblContextMenu;
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IShellExtInit))
|
||||
{
|
||||
*ppvObj = &This->lpvtblShellExtInit;
|
||||
*ppvObj = (void *)&This->lpvtblShellExtInit;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -103,15 +103,15 @@ static HRESULT WINAPI StartMenu_QueryInterface(IMenuPopup *iface, REFIID iid, LP
|
|||
if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IOleWindow)
|
||||
|| IsEqualIID(iid, &IID_IDeskBar) || IsEqualIID(iid, &IID_IMenuPopup))
|
||||
{
|
||||
*ppvOut = &This->vtbl;
|
||||
*ppvOut = (void *)&This->vtbl;
|
||||
}
|
||||
else if (IsEqualIID(iid, &IID_IObjectWithSite))
|
||||
{
|
||||
*ppvOut = &This->objectSiteVtbl;
|
||||
*ppvOut = (void *)&This->objectSiteVtbl;
|
||||
}
|
||||
else if (IsEqualIID(iid, &IID_IInitializeObject))
|
||||
{
|
||||
*ppvOut = &This->initObjectVtbl;
|
||||
*ppvOut = (void *)&This->initObjectVtbl;
|
||||
}
|
||||
|
||||
if (*ppvOut)
|
||||
|
|
|
@ -14,6 +14,41 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
HLOCAL
|
||||
WINAPI
|
||||
SHLocalAlloc(UINT uFlags, SIZE_T uBytes)
|
||||
{
|
||||
FIXME("SHLocalAlloc() stub\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
HLOCAL
|
||||
WINAPI
|
||||
SHLocalFree(HLOCAL hMem)
|
||||
{
|
||||
FIXME("SHLocalFree() stub\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
HLOCAL
|
||||
WINAPI
|
||||
SHLocalReAlloc(HLOCAL hMem,
|
||||
SIZE_T uBytes,
|
||||
UINT uFlags)
|
||||
{
|
||||
FIXME("SHLocalReAlloc() stub\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
|
@ -901,7 +936,7 @@ PifMgr_CloseProperties(HANDLE hHandle, UINT uUnknown)
|
|||
BOOL
|
||||
WINAPI
|
||||
DAD_DragEnterEx2(HWND hwndTarget,
|
||||
const POINT ptStart,
|
||||
POINT ptStart,
|
||||
IDataObject *pdtObject)
|
||||
{
|
||||
FIXME("DAD_DragEnterEx2() stub\n");
|
||||
|
|
|
@ -548,33 +548,8 @@ BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
|
|||
|
||||
/* Shell Desktop functions */
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IShellDesktop
|
||||
DECLARE_INTERFACE_(IShellDesktop,IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IShellDesktopTray ***/
|
||||
STDMETHOD_(ULONG,GetState)(THIS) PURE;
|
||||
STDMETHOD(GetTrayWindow)(THIS_ HWND*) PURE;
|
||||
STDMETHOD(RegisterDesktopWindow)(THIS_ HWND) PURE;
|
||||
STDMETHOD(Unknown)(THIS_ DWORD,DWORD) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#define IShellDesktop_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IShellDesktop_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IShellDesktop_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IShellDesktop_GetState(T) (T)->lpVtbl->GetState(T)
|
||||
#define IShellDesktop_GetTrayWindow(T,a) (T)->lpVtbl->GetTrayWindow(T,a)
|
||||
#define IShellDesktop_RegisterDesktopWindow(T,a) (T)->lpVtbl->RegisterDesktopWindow(T,a)
|
||||
#define IShellDesktop_Unknown(T,a,b) (T)->lpVtbl->Unknown(T,a,b)
|
||||
|
||||
#define WM_GETISHELLBROWSER (WM_USER+7)
|
||||
|
||||
HANDLE WINAPI SHCreateDesktop(IShellDesktop*);
|
||||
BOOL WINAPI SHDesktopMessageLoop(HANDLE);
|
||||
|
||||
#define CSIDL_FOLDER_MASK 0x00ff
|
||||
|
|
|
@ -420,10 +420,6 @@ interface IOverlayNotify : IUnknown
|
|||
|
||||
typedef IOverlayNotify *POVERLAYNOTIFY;
|
||||
|
||||
cpp_quote("#if 0")
|
||||
typedef HANDLE HMONITOR;
|
||||
cpp_quote("#endif /* 0 */")
|
||||
|
||||
[
|
||||
object,
|
||||
local,
|
||||
|
|
|
@ -1935,6 +1935,8 @@ static const WCHAR REBARCLASSNAMEW[] = { 'R','e','B','a','r',
|
|||
#define RBN_MINMAX (RBN_FIRST-21)
|
||||
#define RBN_AUTOBREAK (RBN_FIRST-22)
|
||||
|
||||
#define RBSTR_CHANGERECT 0x0001
|
||||
|
||||
typedef struct tagREBARINFO
|
||||
{
|
||||
UINT cbSize;
|
||||
|
|
|
@ -110,6 +110,16 @@ typedef GUID FMTID,*LPFMTID;
|
|||
#endif /* !defined(__cplusplus) && !defined(CINTERFACE) */
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
__inline int InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
|
||||
{
|
||||
return (
|
||||
((unsigned long *) &rguid1)[0] == ((unsigned long *) &rguid2)[0] &&
|
||||
((unsigned long *) &rguid1)[1] == ((unsigned long *) &rguid2)[1] &&
|
||||
((unsigned long *) &rguid1)[2] == ((unsigned long *) &rguid2)[2] &&
|
||||
((unsigned long *) &rguid1)[3] == ((unsigned long *) &rguid2)[3]);
|
||||
}
|
||||
|
||||
#define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID)))
|
||||
#else /* defined(__cplusplus) && !defined(CINTERFACE) */
|
||||
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
|
||||
|
|
|
@ -166,8 +166,23 @@ DEFINE_GUID(VID_Tile, 0x65f125e5, 0x7be1, 0x4810, 0xba, 0x9d, 0xd2, 0x71,
|
|||
DEFINE_GUID(VID_ThumbStrip, 0x8eefa624, 0xd1e9, 0x445b, 0x94, 0xb7, 0x74, 0xfb, 0xce, 0x2e, 0xa1, 0x1a);
|
||||
|
||||
/* REACTOS ONLY */
|
||||
DEFINE_GUID(CLSID_NewMenu, 0xd969A300L,0xe7FF,0x11D0,0xA9,0x3B,0x00,0xA0,0xC9,0x0F,0x27,0x19);
|
||||
DEFINE_GUID(IID_IShellFolderViewCB, 0x2047E320L, 0xF2A9, 0x11CE, 0xAE, 0x65, 0x08, 0x00, 0x2B, 0x2E, 0x12, 0x62);
|
||||
DEFINE_GUID(CLSID_NewMenu, 0xd969A300, 0xe7FF, 0x11D0, 0xA9, 0x3B, 0x0, 0xA0, 0xC9, 0x0F, 0x27, 0x19);
|
||||
DEFINE_GUID(IID_IShellFolderViewCB, 0x2047E320, 0xF2A9, 0x11CE, 0xAE, 0x65, 0x8, 0x00, 0x2B, 0x2E, 0x12, 0x62);
|
||||
DEFINE_GUID(CLSID_InternetButtons, 0x1E796980, 0x9CC5, 0x11D1, 0xA8, 0x3F, 0x0, 0xC0, 0x4F, 0xC9, 0x9D, 0x61);
|
||||
|
||||
DEFINE_GUID(SID_SMenuBandChild, 0xed9cc020, 0x08b9, 0x11d1, 0x98, 0x23, 0x0, 0xc0, 0x4f, 0xd9, 0x19, 0x72);
|
||||
DEFINE_GUID(SID_SMenuBandParent, 0x8c278eec, 0x3eab, 0x11d1, 0x8c, 0xb0, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0);
|
||||
DEFINE_GUID(SID_SMenuPopup, 0xD1E7AFEB, 0x6A2E, 0x11d0, 0x8C, 0x78, 0x0, 0xC0, 0x4F, 0xD9, 0x18, 0xB4);
|
||||
DEFINE_GUID(SID_SMenuBandBottomSelected, 0x165ebaf4, 0x6d51, 0x11d2, 0x83, 0xad, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0);
|
||||
DEFINE_GUID(SID_SMenuBandBottom, 0x743ca664, 0x0deb, 0x11d1, 0x98, 0x25, 0x0, 0xc0, 0x4f, 0xd9, 0x19, 0x72);
|
||||
DEFINE_GUID(CLSID_ShellFldSetExt, 0x6D5313C0, 0x8C62, 0x11D1, 0xB2, 0xCD, 0x0, 0x60, 0x97, 0xDF, 0x8C, 0x11);
|
||||
DEFINE_GUID(CGID_DefView, 0x4af07f10, 0xd231, 0x11d0, 0xb9, 0x42, 0x0, 0xa0, 0xc9, 0x03, 0x12, 0xe1);
|
||||
DEFINE_GUID(CLSID_MenuBand, 0x5b4dae26, 0xb807, 0x11d0, 0x98, 0x15, 0x0, 0xc0, 0x4f, 0xd9, 0x19, 0x72);
|
||||
//DEFINE_GUID(IID_IShellMenuCallback, 0xcb728b20, 0xf786, 0x11ce, 0xb9, 0x42, 0x0, 0xa0, 0xc9, 0x03, 0x12, 0xe1);
|
||||
DEFINE_GUID(IID_IDeskBarClient, 0xEB0FE175, 0x1A3A, 0x11D0, 0x89, 0xB3, 0x0, 0xA0, 0xC9, 0x0A, 0x90, 0xAC);
|
||||
|
||||
#define CGID_InternetButtons CLSID_InternetButtons
|
||||
|
||||
/* END REACTOS ONLY */
|
||||
|
||||
#endif /* __WINE_SHLGUID_H */
|
||||
|
|
77
reactos/include/psdk/shlguid_undoc.h
Normal file
77
reactos/include/psdk/shlguid_undoc.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
|
||||
DEFINE_GUID(CLSID_RebarBandSite, 0xECD4FC4D, 0x521C, 0x11D0, 0xB7, 0x92, 0x00, 0xA0, 0xC9, 0x03, 0x12, 0xE1);
|
||||
DEFINE_GUID(CLSID_BandSiteMenu, 0xECD4FC4E, 0x521C, 0x11D0, 0xB7, 0x92, 0x00, 0xA0, 0xC9, 0x03, 0x12, 0xE1);
|
||||
DEFINE_GUID(IID_IBandSiteHelper, 0xD1E7AFEA, 0x6A2E, 0x11D0, 0x8C, 0x78, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xB4);
|
||||
DEFINE_GUID(CLSID_PersonalStartMenu, 0x3F6953F0, 0x5359, 0x47FC, 0xBD, 0x99, 0x9F, 0x2C, 0xB9, 0x5A, 0x62, 0xFD);
|
||||
DEFINE_GUID(IID_ITrayPriv, 0x4622AD10, 0xFF23, 0x11D0, 0x8D, 0x34, 0x00, 0xA0, 0xC9, 0x0F, 0x27, 0x19);
|
||||
DEFINE_GUID(IID_ITrayPriv2, 0x9E83C057, 0xFF23, 0x6823, 0x1F, 0x4F, 0xBF, 0xA3, 0x74, 0x61, 0xD4, 0x0A);
|
||||
DEFINE_GUID(IID_IShellMenu2, 0x6F51C646, 0x0EFE, 0x4370, 0x88, 0x2A, 0xC1, 0xF6, 0x1C, 0xB2, 0x7C, 0x3B);
|
||||
DEFINE_GUID(IID_IWinEventHandler, 0xEA5F2D61, 0xE008, 0x11CF, 0x99, 0xCB, 0x00, 0xC0, 0x4F, 0xD6, 0x44, 0x97);
|
||||
DEFINE_GUID(IID_IShellMenuAcc, 0xFAF6FE96, 0xCE5E, 0x11D1, 0x83, 0x71, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0);
|
||||
DEFINE_GUID(IID_IShellBrowserService, 0x1307EE17, 0xEA83, 0x49EB, 0x96, 0xB2, 0x3A, 0x28, 0xE2, 0xD7, 0x04, 0x8A);
|
||||
DEFINE_GUID(IID_IFolderView, 0xCDE725B0, 0xCCC9, 0x4519, 0x91, 0x7E, 0x32, 0x5D, 0x72, 0xFA, 0xB4, 0xCE);
|
||||
|
||||
DEFINE_GUID(SID_SProxyBrowser, 0x20C46561, 0x8491, 0x11CF, 0x96, 0x0C, 0x00, 0x80, 0xC7, 0xF4, 0xEE, 0x85);
|
||||
|
||||
// this class lives in shell32.dll
|
||||
DEFINE_GUID(IID_IGlobalFolderSettings, 0xEF8AD2D3, 0xAE36, 0x11D1, 0xB2, 0xD2, 0x00, 0x60, 0x97, 0xDF, 0x8C, 0x11);
|
||||
DEFINE_GUID(CLSID_GlobalFolderSettings, 0xEF8AD2D1, 0xAE36, 0x11D1, 0xB2, 0xD2, 0x00, 0x60, 0x97, 0xDF, 0x8C, 0x11);
|
||||
DEFINE_GUID(IID_IRegTreeOptions, 0xAF4F6511, 0xF982, 0x11D0, 0x85, 0x95, 0x00, 0xAA, 0x00, 0x4C, 0xD6, 0xD8);
|
||||
DEFINE_GUID(CLSID_CRegTreeOptions, 0xAF4F6510, 0xF982, 0x11D0, 0x85, 0x95, 0x00, 0xAA, 0x00, 0x4C, 0xD6, 0xD8);
|
||||
DEFINE_GUID(IID_IExplorerToolbar, 0x8455F0C1, 0x158F, 0x11D0, 0x89, 0xAE, 0x00, 0xA0, 0xC9, 0x0A, 0x90, 0xAC);
|
||||
|
||||
// not registered, lives in browseui.dll
|
||||
DEFINE_GUID(CLSID_BrowserBar, 0x9581015C, 0xD08E, 0x11D0, 0x8D, 0x36, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
|
||||
|
||||
DEFINE_GUID(CGID_DefViewFrame, 0x710EB7A1, 0x45ED, 0x11D0, 0x92, 0x4A, 0x00, 0x20, 0xAF, 0xC7, 0xAC, 0x4D);
|
||||
|
||||
// browseui.dll
|
||||
DEFINE_GUID(CLSID_SH_AddressBand, 0x01E04581, 0x4EEE, 0x11D0, 0xBF, 0xE9, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83);
|
||||
DEFINE_GUID(CLSID_AddressEditBox, 0xA08C11D2, 0xA228, 0x11D0, 0x82, 0x5B, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83);
|
||||
DEFINE_GUID(IID_IAddressEditBox, 0xA08C11D1, 0xA228, 0x11D0, 0x82, 0x5B, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83);
|
||||
|
||||
DEFINE_GUID(IID_IAddressBand, 0x106E86E1, 0x52B5, 0x11D0, 0xBF, 0xED, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83);
|
||||
DEFINE_GUID(CLSID_BrandBand, 0x22BF0C20, 0x6DA7, 0x11D0, 0xB3, 0x73, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0x38);
|
||||
DEFINE_GUID(SID_SBrandBand, 0x82A62DE8, 0x32AC, 0x4E4A, 0x99, 0x35, 0x90, 0x46, 0xC3, 0x78, 0xCF, 0x90);
|
||||
DEFINE_GUID(CLSID_InternetToolbar, 0x5E6AB780, 0x7743, 0x11CF, 0xA1, 0x2B, 0x00, 0xAA, 0x00, 0x4A, 0xE8, 0x37);
|
||||
|
||||
DEFINE_GUID(CGID_PrivCITCommands, 0x67077B95, 0x4F9D, 0x11D0, 0xB8, 0x84, 0x00, 0xAA, 0x00, 0xB6, 0x01, 0x04);
|
||||
DEFINE_GUID(CGID_Theater, 0x0F12079C, 0xC193, 0x11D0, 0x8D, 0x49, 0x00, 0xC0, 0x4F, 0xC9, 0x9D, 0x61);
|
||||
DEFINE_GUID(CGID_ShellBrowser, 0x3531F060, 0x22B3, 0x11D0, 0x96, 0x9E, 0x00, 0xAA, 0x00, 0xB6, 0x01, 0x04);
|
||||
|
||||
DEFINE_GUID(CLSID_SearchBand, 0x2559A1F0, 0x21D7, 0x11D4, 0xBD, 0xAF, 0x00, 0xC0, 0x4F, 0x60, 0xB9, 0xF0);
|
||||
DEFINE_GUID(CLSID_TipOfTheDayBand, 0x4D5C8C25, 0xD075, 0x11D0, 0xB4, 0x16, 0x00, 0xC0, 0x4F, 0xB9, 0x03, 0x76);
|
||||
DEFINE_GUID(CLSID_DiscussBand, 0xBDEADE7F, 0xC265, 0x11D0, 0xBC, 0xED, 0x00, 0xA0, 0xC9, 0x0A, 0xB5, 0x0F);
|
||||
DEFINE_GUID(CLSID_SH_FavBand, 0xEFA24E61, 0xB078, 0x11D0, 0x89, 0xE4, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E);
|
||||
DEFINE_GUID(CLSID_SH_HistBand, 0xEFA24E62, 0xB078, 0x11D0, 0x89, 0xE4, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E);
|
||||
DEFINE_GUID(CLSID_ExplorerBand, 0xEFA24E64, 0xB078, 0x11D0, 0x89, 0xE4, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E);
|
||||
DEFINE_GUID(CLSID_SH_SearchBand, 0x21569614, 0xB795, 0x46B1, 0x85, 0xF4, 0xE7, 0x37, 0xA8, 0xDC, 0x09, 0xAD);
|
||||
DEFINE_GUID(CLSID_FileSearchBand, 0xC4EE31F3, 0x4768, 0x11D2, 0x5C, 0xBE, 0x00, 0xA0, 0xC9, 0xA8, 0x3D, 0xA1);
|
||||
// missing ResearchBand
|
||||
|
||||
DEFINE_GUID(IID_IBandNavigate, 0x3697C30B, 0xCD88, 0x11D0, 0x8A, 0x3E, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E);
|
||||
DEFINE_GUID(IID_INamespaceProxy, 0xCF1609EC, 0xFA4B, 0x4818, 0xAB, 0x01, 0x55, 0x64, 0x33, 0x67, 0xE6, 0x6D);
|
||||
DEFINE_GUID(IID_IBandProxy, 0x208CE801, 0x754B, 0x11D0, 0x80, 0xCA, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83);
|
||||
DEFINE_GUID(CLSID_BandProxy, 0xF61FFEC1, 0x754F, 0x11D0, 0x80, 0xCA, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83);
|
||||
DEFINE_GUID(SID_IBandProxy, 0x80243AC1, 0x0569, 0x11D1, 0xA7, 0xAE, 0x00, 0x60, 0x97, 0xDF, 0x5B, 0xD4);
|
||||
DEFINE_GUID(CLSID_ShellSearchExt, 0x169A0691, 0x8DF9, 0x11D1, 0xA1, 0xC4, 0x00, 0xC0, 0x4F, 0xD7, 0x5D, 0x13);
|
||||
|
||||
DEFINE_GUID(CLSID_CommonButtons, 0x1E79697E, 0x9CC5, 0x11D1, 0xA8, 0x3F, 0x00, 0xC0, 0x4F, 0xC9, 0x9D, 0x61);
|
||||
|
||||
DEFINE_GUID(CGID_BrandCmdGroup, 0x25019D8C, 0x9EE0, 0x45C0, 0x88, 0x3B, 0x97, 0x2D, 0x48, 0x32, 0x5E, 0x18);
|
||||
|
||||
DEFINE_GUID(IID_INSCTree, 0x43A8F463, 0x4222, 0x11D2, 0xB6, 0x41, 0x00, 0x60, 0x97, 0xDF, 0x5B, 0xD4);
|
||||
DEFINE_GUID(IID_INSCTree2, 0x801C1AD5, 0xC47C, 0x428C, 0x97, 0xAF, 0xE9, 0x91, 0xE4, 0x85, 0x7D, 0x97);
|
||||
|
||||
DEFINE_GUID(IID_IInitializeObject, 0x4622AD16, 0xFF23, 0x11D0, 0x8D, 0x34, 0x00, 0xA0, 0xC9, 0x0F, 0x27, 0x19);
|
||||
DEFINE_GUID(IID_IBanneredBar, 0x596A9A94, 0x013E, 0x11D1, 0x8D, 0x34, 0x00, 0xA0, 0xC9, 0x0F, 0x27, 0x19);
|
||||
|
||||
#define CGID_IExplorerToolbar IID_IExplorerToolbar
|
||||
#define SID_IExplorerToolbar IID_IExplorerToolbar
|
||||
#define SID_ITargetFrame2 IID_ITargetFrame2
|
||||
#define SID_IWebBrowserApp IID_IWebBrowserApp
|
||||
#define CGID_IDeskBand IID_IDeskBand
|
||||
#define CGID_MenuBand CLSID_MenuBand
|
||||
#define SID_STravelLogCursor IID_ITravelLogStg
|
||||
#define SID_IBandSite IID_IBandSite
|
||||
|
|
@ -467,7 +467,7 @@ DECLARE_INTERFACE_(IProgressDialog,IUnknown)
|
|||
|
||||
/* IDeskBarClient interface */
|
||||
#define INTERFACE IDeskBarClient
|
||||
DECLARE_INTERFACE_(IDeskBarClient,IUnknown)
|
||||
DECLARE_INTERFACE_(IDeskBarClient,IOleWindow)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||
|
@ -1576,29 +1576,6 @@ HRESULT WINAPI SHOpenWithDialog(
|
|||
const OPENASINFO *poainfo
|
||||
);
|
||||
|
||||
/*****************************************************************************
|
||||
* IInitializeObject interface
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IInitializeObject
|
||||
|
||||
DECLARE_INTERFACE_(IInitializeObject, IUnknown)//, "4622AD16-FF23-11d0-8D34-00A0C90F2719")
|
||||
{
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
STDMETHOD(Initialize)(THIS) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IInitializeObject_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IInitializeObject_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IInitializeObject_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IInitializeObject_Initialize(T) (T)->lpVtbl->Initialize(T)
|
||||
#endif
|
||||
|
||||
|
||||
#define INTERFACE IShellIconOverlayIdentifier
|
||||
|
||||
DEFINE_GUID(IID_IShellIconOverlayIdentifier, 0x0c6c4200L, 0xc589, 0x11d0, 0x99, 0x9a, 0x00, 0xc0, 0x4f, 0xd6, 0x55, 0xe1);
|
||||
|
@ -1618,37 +1595,40 @@ DECLARE_INTERFACE_(IShellIconOverlayIdentifier, IUnknown)
|
|||
|
||||
#undef INTERFACE
|
||||
|
||||
/*****************************************************************************
|
||||
* IBanneredBar interface
|
||||
/****************************************************************************
|
||||
* Travel log
|
||||
*/
|
||||
enum
|
||||
{
|
||||
BMICON_LARGE = 0,
|
||||
BMICON_SMALL
|
||||
};
|
||||
#define INTERFACE IBanneredBar
|
||||
DECLARE_INTERFACE_(IBanneredBar, IUnknown)//, "596A9A94-013E-11d1-8D34-00A0C90F2719")
|
||||
{
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
STDMETHOD(SetIconSize)(THIS_ DWORD iIcon) PURE;
|
||||
STDMETHOD(GetIconSize)(THIS_ DWORD* piIcon) PURE;
|
||||
STDMETHOD(SetBitmap)(THIS_ HBITMAP hBitmap) PURE;
|
||||
STDMETHOD(GetBitmap)(THIS_ HBITMAP* phBitmap) PURE;
|
||||
#define TLOG_BACK -1
|
||||
#define TLOG_FORE 1
|
||||
|
||||
#define TLMENUF_INCLUDECURRENT 0x00000001
|
||||
#define TLMENUF_CHECKCURRENT (TLMENUF_INCLUDECURRENT | 0x00000002)
|
||||
#define TLMENUF_BACK 0x00000010 // Default
|
||||
#define TLMENUF_FORE 0x00000020
|
||||
#define TLMENUF_BACKANDFORTH (TLMENUF_BACK | TLMENUF_FORE | TLMENUF_INCLUDECURRENT)
|
||||
|
||||
/*****************************************************************************
|
||||
* IDockingWindowSite interface
|
||||
*/
|
||||
#define INTERFACE IDockingWindowSite
|
||||
DECLARE_INTERFACE_(IDockingWindowSite, IOleWindow)
|
||||
{
|
||||
// *** IUnknown methods ***
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
// *** IOleWindow methods ***
|
||||
STDMETHOD(GetWindow)(THIS_ HWND *lphwnd) PURE;
|
||||
STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL fEnterMode) PURE;
|
||||
|
||||
// *** IDockingWindowSite methods ***
|
||||
STDMETHOD(GetBorderDW)(THIS_ IUnknown *punkObj, LPRECT prcBorder) PURE;
|
||||
STDMETHOD(RequestBorderSpaceDW)(THIS_ IUnknown *punkObj, LPCBORDERWIDTHS pbw) PURE;
|
||||
STDMETHOD(SetBorderSpaceDW)(THIS_ IUnknown *punkObj, LPCBORDERWIDTHS pbw) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IBanneredBar_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IBanneredBar_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IBanneredBar_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IBanneredBar_SetIconSize(T,a) (T)->lpVtbl->SetIconSize(T,a)
|
||||
#define IBanneredBar_GetIconSize(T,a) (T)->lpVtbl->GetIconSize(T,a)
|
||||
#define IBanneredBar_SetBitmap(T,a) (T)->lpVtbl->SetBitmap(T,a)
|
||||
#define IBanneredBar_GetBitmap(T,a) (T)->lpVtbl->GetBitmap(T,a)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
|
828
reactos/include/psdk/shlobj_undoc.h
Normal file
828
reactos/include/psdk/shlobj_undoc.h
Normal file
|
@ -0,0 +1,828 @@
|
|||
/*
|
||||
* ReactOS undocumented shell interface
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __SHLOBJ_UNDOC__H
|
||||
#define __SHLOBJ_UNDOC__H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
/*****************************************************************************
|
||||
* New shellstate structure
|
||||
*/
|
||||
struct SHELLSTATE2
|
||||
{
|
||||
SHELLSTATE oldState;
|
||||
long newState1;
|
||||
long newState2;
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
* Header for persisted view state in cabinet windows
|
||||
*/
|
||||
struct persistState
|
||||
{
|
||||
long dwSize;
|
||||
long browseType;
|
||||
long alwaysZero;
|
||||
long browserIndex;
|
||||
CLSID persistClass;
|
||||
ULONG pidlSize;
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
* IInitializeObject interface
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IInitializeObject
|
||||
|
||||
DECLARE_INTERFACE_(IInitializeObject, IUnknown)//, "4622AD16-FF23-11d0-8D34-00A0C90F2719")
|
||||
{
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
STDMETHOD(Initialize)(THIS) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IInitializeObject_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IInitializeObject_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IInitializeObject_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IInitializeObject_Initialize(T) (T)->lpVtbl->Initialize(T)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IBanneredBar interface
|
||||
*/
|
||||
enum
|
||||
{
|
||||
BMICON_LARGE = 0,
|
||||
BMICON_SMALL
|
||||
};
|
||||
#define INTERFACE IBanneredBar
|
||||
DECLARE_INTERFACE_(IBanneredBar, IUnknown)//, "596A9A94-013E-11d1-8D34-00A0C90F2719")
|
||||
{
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
STDMETHOD(SetIconSize)(THIS_ DWORD iIcon) PURE;
|
||||
STDMETHOD(GetIconSize)(THIS_ DWORD* piIcon) PURE;
|
||||
STDMETHOD(SetBitmap)(THIS_ HBITMAP hBitmap) PURE;
|
||||
STDMETHOD(GetBitmap)(THIS_ HBITMAP* phBitmap) PURE;
|
||||
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IBanneredBar_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IBanneredBar_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IBanneredBar_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IBanneredBar_SetIconSize(T,a) (T)->lpVtbl->SetIconSize(T,a)
|
||||
#define IBanneredBar_GetIconSize(T,a) (T)->lpVtbl->GetIconSize(T,a)
|
||||
#define IBanneredBar_SetBitmap(T,a) (T)->lpVtbl->SetBitmap(T,a)
|
||||
#define IBanneredBar_GetBitmap(T,a) (T)->lpVtbl->GetBitmap(T,a)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IGlobalFolderSettings interface
|
||||
*/
|
||||
struct DEFFOLDERSETTINGS
|
||||
{
|
||||
long offset0;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IGlobalFolderSettings
|
||||
DECLARE_INTERFACE_(IGlobalFolderSettings, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IGlobalFolderSettings ***/
|
||||
STDMETHOD(Get)(THIS_ struct DEFFOLDERSETTINGS *buffer, int theSize) PURE;
|
||||
STDMETHOD(Set)(THIS_ const struct DEFFOLDERSETTINGS *buffer, int theSize, unsigned int param14) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
/*****************************************************************************
|
||||
* IStartMenuCallback interface
|
||||
*/
|
||||
#define INTERFACE IStartMenuCallback
|
||||
DECLARE_INTERFACE_(IStartMenuCallback, IOleWindow)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IOleWindow methods ***/
|
||||
STDMETHOD_(HRESULT,GetWindow)(THIS_ HWND*) PURE;
|
||||
STDMETHOD_(HRESULT,ContextSensitiveHelp)(THIS_ BOOL) PURE;
|
||||
/*** IStartMenuCallback ***/
|
||||
STDMETHOD_(HRESULT,Execute)(THIS_ IShellFolder*,LPCITEMIDLIST) PURE;
|
||||
STDMETHOD_(HRESULT,Unknown)(THIS_ PVOID,PVOID,PVOID,PVOID) PURE;
|
||||
STDMETHOD_(HRESULT,AppendMenu)(THIS_ HMENU*) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IStartMenuCallback_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IStartMenuCallback_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IStartMenuCallback_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IStartMenuCallback_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a)
|
||||
#define IStartMenuCallback_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a)
|
||||
#define IStartMenuCallback_Execute(T,a,b) (T)->lpVtbl->Execute(T,a,b)
|
||||
#define IStartMenuCallback_Unknown(T,a,b,c,d) (T)->lpVtbl->Unknown(T,a,b,c,d)
|
||||
#define IStartMenuCallback_AppendMenu(T,a) (T)->lpVtbl->AppendMenu(T,a)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IBandSiteStreamCallback interface
|
||||
*/
|
||||
#define INTERFACE IBandSiteStreamCallback
|
||||
DECLARE_INTERFACE_(IBandSiteStreamCallback, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IBandSiteStreamCallback ***/
|
||||
STDMETHOD_(HRESULT,OnLoad)(THIS_ IStream *pStm, REFIID riid, PVOID *pvObj) PURE;
|
||||
STDMETHOD_(HRESULT,OnSave)(THIS_ IUnknown *pUnk, IStream *pStm) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IBandSiteStreamCallback_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IBandSiteStreamCallback_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IBandSiteStreamCallback_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IBandSiteStreamCallback_OnLoad(T,a,b,c) (T)->lpVtbl->OnLoad(T,a,b,c)
|
||||
#define IBandSiteStreamCallback_OnSave(T,a,b) (T)->lpVtbl->OnSave(T,a,b)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IShellDesktopTray interface
|
||||
*/
|
||||
#define INTERFACE IShellDesktopTray
|
||||
DECLARE_INTERFACE_(IShellDesktopTray, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IShellDesktopTray ***/
|
||||
STDMETHOD_(ULONG,GetState)(THIS) PURE;
|
||||
STDMETHOD(GetTrayWindow)(THIS_ HWND*) PURE;
|
||||
STDMETHOD(RegisterDesktopWindow)(THIS_ HWND) PURE;
|
||||
STDMETHOD(Unknown)(THIS_ DWORD,DWORD) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IShellDesktopTray_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IShellDesktopTray_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IShellDesktopTray_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IShellDesktopTray_GetState(T) (T)->lpVtbl->GetState(T)
|
||||
#define IShellDesktopTray_GetTrayWindow(T,a) (T)->lpVtbl->GetTrayWindow(T,a)
|
||||
#define IShellDesktopTray_RegisterDesktopWindow(T,a) (T)->lpVtbl->RegisterDesktopWindow(T,a)
|
||||
#define IShellDesktopTray_Unknown(T,a,b) (T)->lpVtbl->Unknown(T,a,b)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* INscTree interface
|
||||
*/
|
||||
#define INTERFACE INscTree
|
||||
DECLARE_INTERFACE_(INscTree, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** INscTree ***/
|
||||
STDMETHOD(CreateTree)(THIS_ long paramC, long param10, long param14) PURE;
|
||||
STDMETHOD(Initialize)(THIS_ long paramC, long param10, long param14) PURE;
|
||||
STDMETHOD(ShowWindow)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(Refresh)(THIS) PURE;
|
||||
STDMETHOD(GetSelectedItem)(THIS_ long paramC, long param10) PURE;
|
||||
STDMETHOD(SetSelectedItem)(THIS_ long paramC, long param10, long param14, long param18) PURE;
|
||||
STDMETHOD(GetNscMode)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(SetNscMode)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(GetSelectedItemName)(THIS_ long paramC, long param10) PURE;
|
||||
STDMETHOD(BindToSelectedItemParent)(THIS_ long paramC, long param10, long param14) PURE;
|
||||
STDMETHOD(InLabelEdit)(THIS) PURE;
|
||||
STDMETHOD(RightPaneNavigationStarted)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(RightPaneNavigationFinished)(THIS_ long paramC) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define INscTree_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define INscTree_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define INscTree_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define INscTree_CreateTree(T,a,b,c) (T)->lpVtbl->CreateTree(T,a,b,c)
|
||||
#define INscTree_Initialize(T,a,b,c) (T)->lpVtbl->Initialize(T,a,b,c)
|
||||
#define INscTree_ShowWindow(T,a) (T)->lpVtbl->ShowWindow(T,a)
|
||||
#define INscTree_Refresh(T) (T)->lpVtbl->Refresh(T)
|
||||
#define INscTree_GetSelectedItem(T,a,b) (T)->lpVtbl->GetSelectedItem(T,a,b)
|
||||
#define INscTree_SetSelectedItem(T,a,b,c,d) (T)->lpVtbl->SetSelectedItem(T,a,b,c,d)
|
||||
#define INscTree_GetNscMode(T,a) (T)->lpVtbl->GetNscMode(T,a)
|
||||
#define INscTree_SetNscMode(T,a) (T)->lpVtbl->SetNscMode(T,a)
|
||||
#define INscTree_GetSelectedItemName(T,a,b) (T)->lpVtbl->GetSelectedItemName(T,a,b)
|
||||
#define INscTree_BindToSelectedItemParent(T,a,b,c) (T)->lpVtbl->BindToSelectedItemParent(T,a,b,c)
|
||||
#define INscTree_InLabelEdit(T) (T)->lpVtbl->InLabelEdit(T)
|
||||
#define INscTree_RightPaneNavigationStarted(T,a) (T)->lpVtbl->RightPaneNavigationStarted(T,a)
|
||||
#define INscTree_RightPaneNavigationFinished(T,a) (T)->lpVtbl->RightPaneNavigationFinished(T,a)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* INscTree2 interface
|
||||
*/
|
||||
#define INTERFACE INscTree2
|
||||
DECLARE_INTERFACE_(INscTree2, INscTree)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** INscTree ***/
|
||||
STDMETHOD(CreateTree)(THIS_ long paramC, long param10, long param14) PURE;
|
||||
STDMETHOD(Initialize)(THIS_ long paramC, long param10, long param14) PURE;
|
||||
STDMETHOD(ShowWindow)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(Refresh)(THIS) PURE;
|
||||
STDMETHOD(GetSelectedItem)(THIS_ long paramC, long param10) PURE;
|
||||
STDMETHOD(SetSelectedItem)(THIS_ long paramC, long param10, long param14, long param18) PURE;
|
||||
STDMETHOD(GetNscMode)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(SetNscMode)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(GetSelectedItemName)(THIS_ long paramC, long param10) PURE;
|
||||
STDMETHOD(BindToSelectedItemParent)(THIS_ long paramC, long param10, long param14) PURE;
|
||||
STDMETHOD(InLabelEdit)(THIS) PURE;
|
||||
STDMETHOD(RightPaneNavigationStarted)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(RightPaneNavigationFinished)(THIS_ long paramC) PURE;
|
||||
/*** INscTree2 ***/
|
||||
STDMETHOD(CreateTree2)(THIS_ long paramC, long param10, long param14, long param18) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define INscTree2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define INscTree2_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define INscTree2_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define INscTree2_CreateTree(T,a,b,c) (T)->lpVtbl->CreateTree(T,a,b,c)
|
||||
#define INscTree2_Initialize(T,a,b,c) (T)->lpVtbl->Initialize(T,a,b,c)
|
||||
#define INscTree2_ShowWindow(T,a) (T)->lpVtbl->ShowWindow(T,a)
|
||||
#define INscTree2_Refresh(T) (T)->lpVtbl->Refresh(T)
|
||||
#define INscTree2_GetSelectedItem(T,a,b) (T)->lpVtbl->GetSelectedItem(T,a,b)
|
||||
#define INscTree2_SetSelectedItem(T,a,b,c,d) (T)->lpVtbl->SetSelectedItem(T,a,b,c,d)
|
||||
#define INscTree2_GetNscMode(T,a) (T)->lpVtbl->GetNscMode(T,a)
|
||||
#define INscTree2_SetNscMode(T,a) (T)->lpVtbl->SetNscMode(T,a)
|
||||
#define INscTree2_GetSelectedItemName(T,a,b) (T)->lpVtbl->GetSelectedItemName(T,a,b)
|
||||
#define INscTree2_BindToSelectedItemParent(T,a,b,c) (T)->lpVtbl->BindToSelectedItemParent(T,a,b,c)
|
||||
#define INscTree2_InLabelEdit(T) (T)->lpVtbl->InLabelEdit(T)
|
||||
#define INscTree2_RightPaneNavigationStarted(T,a) (T)->lpVtbl->RightPaneNavigationStarted(T,a)
|
||||
#define INscTree2_RightPaneNavigationFinished(T,a) (T)->lpVtbl->RightPaneNavigationFinished(T,a)
|
||||
#define INscTree2_CreateTree2(T,a,b,c,d) (T)->lpVtbl->CreateTree2(T,a,b,c,d)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IAddressEditBox interface
|
||||
*/
|
||||
#define INTERFACE IAddressEditBox
|
||||
DECLARE_INTERFACE_(IAddressEditBox, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IAddressEditBox ***/
|
||||
STDMETHOD(Init)(THIS_ HWND comboboxEx, HWND editControl, long param14, IUnknown *param18) PURE;
|
||||
STDMETHOD(SetCurrentDir)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(ParseNow)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(Execute)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(Save)(THIS_ long paramC) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IAddressEditBox_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IAddressEditBox_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IAddressEditBox_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IAddressEditBox_Init(T,a,b,c,d) (T)->lpVtbl->Init(T,a,b,c,d)
|
||||
#define IAddressEditBox_SetCurrentDir(T,a) (T)->lpVtbl->SetCurrentDir(T,a)
|
||||
#define IAddressEditBox_ParseNow(T,a) (T)->lpVtbl->ParseNow(T,a)
|
||||
#define IAddressEditBox_Execute(T,a) (T)->lpVtbl->Execute(T,a)
|
||||
#define IAddressEditBox_Save(T,a) (T)->lpVtbl->Save(T,a)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IBandProxy interface
|
||||
*/
|
||||
#define INTERFACE IBandProxy
|
||||
DECLARE_INTERFACE_(IBandProxy, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IBandProxy ***/
|
||||
STDMETHOD(SetSite)(THIS_ IUnknown *paramC) PURE;
|
||||
STDMETHOD(CreateNewWindow)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(GetBrowserWindow)(THIS_ IUnknown **paramC) PURE;
|
||||
STDMETHOD(IsConnected)(THIS) PURE;
|
||||
STDMETHOD(NavigateToPIDL)(THIS_ LPCITEMIDLIST pidl) PURE;
|
||||
STDMETHOD(NavigateToURL)(THIS_ long paramC, long param10) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IBandProxy_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IBandProxy_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IBandProxy_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IBandProxy_SetSite(T,a) (T)->lpVtbl->SetSite(T,a)
|
||||
#define IBandProxy_CreateNewWindow(T,a) (T)->lpVtbl->CreateNewWindow(T,a)
|
||||
#define IBandProxy_GetBrowserWindow(T,a) (T)->lpVtbl->GetBrowserWindow(T,a)
|
||||
#define IBandProxy_IsConnected(T) (T)->lpVtbl->IsConnected(T)
|
||||
#define IBandProxy_NavigateToPIDL(T,a) (T)->lpVtbl->NavigateToPIDL(T,a)
|
||||
#define IBandProxy_NavigateToURL(T,a,b) (T)->lpVtbl->NavigateToURL(T,a,b)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IExplorerToolbar interface
|
||||
*/
|
||||
#define INTERFACE IExplorerToolbar
|
||||
DECLARE_INTERFACE_(IExplorerToolbar, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IExplorerToolbar ***/
|
||||
STDMETHOD(SetCommandTarget)(THIS_ IUnknown *theTarget, GUID *category, long param14) PURE;
|
||||
STDMETHOD(Unknown1)(THIS) PURE;
|
||||
STDMETHOD(AddButtons)(THIS_ const GUID *pguidCmdGroup, long buttonCount, TBBUTTON *buttons) PURE;
|
||||
STDMETHOD(AddString)(THIS_ const GUID *pguidCmdGroup, HINSTANCE param10, LPCTSTR param14, long *param18) PURE;
|
||||
STDMETHOD(GetButton)(THIS_ const GUID *paramC, long param10, long param14) PURE;
|
||||
STDMETHOD(GetState)(THIS_ const GUID *pguidCmdGroup, long commandID, long *theState) PURE;
|
||||
STDMETHOD(SetState)(THIS_ const GUID *pguidCmdGroup, long commandID, long theState) PURE;
|
||||
STDMETHOD(AddBitmap)(THIS_ const GUID *pguidCmdGroup, long param10, long buttonCount, TBADDBITMAP *lParam, long *newIndex, COLORREF param20) PURE;
|
||||
STDMETHOD(GetBitmapSize)(THIS_ long *paramC) PURE;
|
||||
STDMETHOD(SendToolbarMsg)(THIS_ const GUID *pguidCmdGroup, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *result) PURE;
|
||||
STDMETHOD(SetImageList)(THIS_ const GUID *pguidCmdGroup, HIMAGELIST param10, HIMAGELIST param14, HIMAGELIST param18) PURE;
|
||||
STDMETHOD(ModifyButton)(THIS_ const GUID *paramC, long param10, long param14) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IExplorerToolbar_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IExplorerToolbar_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IExplorerToolbar_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IExplorerToolbar_SetCommandTarget(T,a,b,c) (T)->lpVtbl->SetCommandTarget(T,a,b,c)
|
||||
#define IExplorerToolbar_Unknown1(T) (T)->lpVtbl->Unknown1(T)
|
||||
#define IExplorerToolbar_AddButtons(T,a,b,c) (T)->lpVtbl->AddButtons(T,a,b,c)
|
||||
#define IExplorerToolbar_AddString(T,a,b,c,d) (T)->lpVtbl->AddString(T,a,b,c,d)
|
||||
#define IExplorerToolbar_GetButton(T,a,b,c) (T)->lpVtbl->GetButton(T,a,b,c)
|
||||
#define IExplorerToolbar_GetState(T,a,b,c) (T)->lpVtbl->GetState(T,a,b,c)
|
||||
#define IExplorerToolbar_SetState(T,a,b,c) (T)->lpVtbl->SetState(T,a,b,c)
|
||||
#define IExplorerToolbar_AddBitmap(T,a,b,c,d,e,f) (T)->lpVtbl->AddBitmap(T,a,b,c,d,e,f)
|
||||
#define IExplorerToolbar_GetBitmapSize(T,a) (T)->lpVtbl->GetBitmapSize(T,a)
|
||||
#define IExplorerToolbar_SendToolbarMsg(T,a,b,c,d,e) (T)->lpVtbl->SendToolbarMsg(T,a,b,c,d,e)
|
||||
#define IExplorerToolbar_SetImageList(T,a,b,c,d) (T)->lpVtbl->SetImageList(T,a,b,c,d)
|
||||
#define IExplorerToolbar_ModifyButton(T,a,b,c) (T)->lpVtbl->ModifyButton(T,a,b,c)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IRegTreeOptions interface
|
||||
*/
|
||||
typedef enum tagWALK_TREE_CMD
|
||||
{
|
||||
WALK_TREE_OPTION0 = 0,
|
||||
WALK_TREE_OPTION1 = 1,
|
||||
WALK_TREE_OPTION2 = 2,
|
||||
WALK_TREE_OPTION3 = 3
|
||||
} WALK_TREE_CMD;
|
||||
|
||||
#define INTERFACE IRegTreeOptions
|
||||
DECLARE_INTERFACE_(IRegTreeOptions, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IRegTreeOptions ***/
|
||||
STDMETHOD(InitTree)(THIS_ HWND paramC, HKEY param10, char const *param14, char const *param18) PURE;
|
||||
STDMETHOD(WalkTree)(THIS_ WALK_TREE_CMD paramC) PURE;
|
||||
STDMETHOD(ToggleItem)(THIS_ HTREEITEM paramC) PURE;
|
||||
STDMETHOD(ShowHelp)(THIS_ HTREEITEM paramC, unsigned long param10) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IRegTreeOptions_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IRegTreeOptions_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IRegTreeOptions_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IRegTreeOptions_InitTree(T,a,b,c,d) (T)->lpVtbl->InitTree(T,a,b,c,d)
|
||||
#define IRegTreeOptions_WalkTree(T,a) (T)->lpVtbl->WalkTree(T,a)
|
||||
#define IRegTreeOptions_ToggleItem(T,a) (T)->lpVtbl->ToggleItem(T,a)
|
||||
#define IRegTreeOptions_ShowHelp(T,a,b) (T)->lpVtbl->ShowHelp(T,a,b)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IBandNavigate interface
|
||||
*/
|
||||
#define INTERFACE IBandNavigate
|
||||
DECLARE_INTERFACE_(IBandNavigate, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IBandNavigate ***/
|
||||
STDMETHOD(Select)(THIS_ long paramC) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IBandNavigate_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IBandNavigate_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IBandNavigate_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IBandNavigate_Select(T,a) (T)->lpVtbl->Select(T,a)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* INamespaceProxy interface
|
||||
*/
|
||||
#define INTERFACE INamespaceProxy
|
||||
DECLARE_INTERFACE_(INamespaceProxy, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** INamespaceProxy ***/
|
||||
STDMETHOD(GetNavigateTarget)(THIS_ long paramC, long param10, long param14) PURE;
|
||||
STDMETHOD(Invoke)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(OnSelectionChanged)(THIS_ long paramC) PURE;
|
||||
STDMETHOD(RefreshFlags)(THIS_ long paramC, long param10, long param14) PURE;
|
||||
STDMETHOD(CacheItem)(THIS_ long paramC) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define INamespaceProxy_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define INamespaceProxy_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define INamespaceProxy_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define INamespaceProxy_GetNavigateTarget(T,a,b,c) (T)->lpVtbl->GetNavigateTarget(T,a,b,c)
|
||||
#define INamespaceProxy_Invoke(T,a) (T)->lpVtbl->Invoke(T,a)
|
||||
#define INamespaceProxy_OnSelectionChanged(T,a) (T)->lpVtbl->OnSelectionChanged(T,a)
|
||||
#define INamespaceProxy_RefreshFlags(T,a,b,c) (T)->lpVtbl->RefreshFlags(T,a,b,c)
|
||||
#define INamespaceProxy_CacheItem(T,a) (T)->lpVtbl->CacheItem(T,a)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IShellMenu2 interface
|
||||
*/
|
||||
#define INTERFACE IShellMenu2
|
||||
DECLARE_INTERFACE_(IShellMenu2, IShellMenu)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IShellMenu ***/
|
||||
STDMETHOD(Initialize)(THIS_ IShellMenuCallback *psmc, UINT uId, UINT uIdAncestor, DWORD dwFlags) PURE;
|
||||
STDMETHOD(GetMenuInfo)(THIS_ IShellMenuCallback **ppsmc, UINT *puId, UINT *puIdAncestor, DWORD *pdwFlags) PURE;
|
||||
STDMETHOD(SetShellFolder)(THIS_ IShellFolder *psf, LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags) PURE;
|
||||
STDMETHOD(GetShellFolder)(THIS_ DWORD *pdwFlags, LPITEMIDLIST *ppidl, REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD(SetMenu)(THIS_ HMENU hmenu, HWND hwnd, DWORD dwFlags) PURE;
|
||||
STDMETHOD(GetMenu)(THIS_ HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags) PURE;
|
||||
STDMETHOD(InvalidateItem)(THIS_ LPSMDATA psmd, DWORD dwFlags) PURE;
|
||||
STDMETHOD(GetState)(THIS_ LPSMDATA psmd) PURE;
|
||||
STDMETHOD(SetMenuToolbar)(THIS_ IUnknown *punk, DWORD dwFlags) PURE;
|
||||
/*** IShellMenu2 ***/
|
||||
STDMETHOD(GetSubMenu)(THIS) PURE;
|
||||
STDMETHOD(SetToolbar)(THIS) PURE;
|
||||
STDMETHOD(SetMinWidth)(THIS) PURE;
|
||||
STDMETHOD(SetNoBorder)(THIS) PURE;
|
||||
STDMETHOD(SetTheme)(THIS) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IShellMenu2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IShellMenu2_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IShellMenu2_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IShellMenu2_Initialize(T,a,b,c,d) (T)->lpVtbl->Initialize(T,a,b,c,d)
|
||||
#define IShellMenu2_GetMenuInfo(T,a,b,c,d) (T)->lpVtbl->GetMenuInfo(T,a,b,c,d)
|
||||
#define IShellMenu2_SetShellFolder(T,a,b,c,d) (T)->lpVtbl->SetShellFolder(T,a,b,c,d)
|
||||
#define IShellMenu2_GetShellFolder(T,a,b,c,d) (T)->lpVtbl->GetShellFolder(T,a,b,c,d)
|
||||
#define IShellMenu2_SetMenu(T,a,b,c) (T)->lpVtbl->SetMenu(T,a,b,c)
|
||||
#define IShellMenu2_GetMenu(T,a,b,c) (T)->lpVtbl->GetMenu(T,a,b,c)
|
||||
#define IShellMenu2_InvalidateItem(T,a,b) (T)->lpVtbl->InvalidateItem(T,a,b)
|
||||
#define IShellMenu2_GetState(T,a) (T)->lpVtbl->GetState(T,a)
|
||||
#define IShellMenu2_SetMenuToolbar(T,a,b) (T)->lpVtbl->SetMenuToolbar(T,a,b)
|
||||
#define IShellMenu2_GetSubMenu(T) (T)->lpVtbl->GetSubMenu(T)
|
||||
#define IShellMenu2_SetToolbar(T) (T)->lpVtbl->SetToolbar(T)
|
||||
#define IShellMenu2_SetMinWidth(T) (T)->lpVtbl->SetMinWidth(T)
|
||||
#define IShellMenu2_SetNoBorder(T) (T)->lpVtbl->SetNoBorder(T)
|
||||
#define IShellMenu2_SetTheme(T) (T)->lpVtbl->SetTheme(T)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IWinEventHandler interface
|
||||
*/
|
||||
#define INTERFACE IWinEventHandler
|
||||
DECLARE_INTERFACE_(IWinEventHandler, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IWinEventHandler ***/
|
||||
STDMETHOD(OnWinEvent)(THIS_ HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) PURE;
|
||||
STDMETHOD(IsWindowOwner)(THIS_ HWND hWnd) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IWinEventHandler_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IWinEventHandler_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IWinEventHandler_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IWinEventHandler_OnWinEvent(T,a,b,c,d,e) (T)->lpVtbl->OnWinEvent(T,a,b,c,d,e)
|
||||
#define IWinEventHandler_IsWindowOwner(T,a) (T)->lpVtbl->IsWindowOwner(T,a)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IAddressBand interface
|
||||
*/
|
||||
#define INTERFACE IAddressBand
|
||||
DECLARE_INTERFACE_(IAddressBand, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IAddressBand ***/
|
||||
STDMETHOD(FileSysChange)(THIS_ long param8, long paramC) PURE;
|
||||
STDMETHOD(Refresh)(THIS_ long param8) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IAddressBand_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IAddressBand_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IAddressBand_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IAddressBand_FileSysChange(T,a,b) (T)->lpVtbl->FileSysChange(T,a,b)
|
||||
#define IAddressBand_Refresh(T,a) (T)->lpVtbl->Refresh(T,a)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IShellMenuAcc interface
|
||||
*/
|
||||
#define INTERFACE IShellMenuAcc
|
||||
DECLARE_INTERFACE_(IShellMenuAcc, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IShellMenuAcc ***/
|
||||
STDMETHOD(GetTop)(THIS) PURE;
|
||||
STDMETHOD(GetBottom)(THIS) PURE;
|
||||
STDMETHOD(GetTracked)(THIS) PURE;
|
||||
STDMETHOD(GetParentSite)(THIS) PURE;
|
||||
STDMETHOD(GetState)(THIS) PURE;
|
||||
STDMETHOD(DoDefaultAction)(THIS) PURE;
|
||||
STDMETHOD(GetSubMenu)(THIS) PURE;
|
||||
STDMETHOD(IsEmpty)(THIS) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IShellMenuAcc_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IShellMenuAcc_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IShellMenuAcc_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IShellMenuAcc_GetTop(T) (T)->lpVtbl->GetTop(T)
|
||||
#define IShellMenuAcc_GetBottom(T) (T)->lpVtbl->GetBottom(T)
|
||||
#define IShellMenuAcc_GetTracked(T) (T)->lpVtbl->GetTracked(T)
|
||||
#define IShellMenuAcc_GetParentSite(T) (T)->lpVtbl->GetParentSite(T)
|
||||
#define IShellMenuAcc_GetState(T) (T)->lpVtbl->GetState(T)
|
||||
#define IShellMenuAcc_DoDefaultAction(T) (T)->lpVtbl->DoDefaultAction(T)
|
||||
#define IShellMenuAcc_GetSubMenu(T) (T)->lpVtbl->GetSubMenu(T)
|
||||
#define IShellMenuAcc_IsEmpty(T) (T)->lpVtbl->IsEmpty(T)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IAddressBand interface
|
||||
*/
|
||||
#define INTERFACE IBandSiteHelper
|
||||
DECLARE_INTERFACE_(IBandSiteHelper, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IBandSiteHelper ***/
|
||||
STDMETHOD(LoadFromStreamBS)(THIS_ IStream *, REFGUID, void **) PURE;
|
||||
STDMETHOD(SaveToStreamBS)(THIS_ IUnknown *, IStream *) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IBandSiteHelper_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IBandSiteHelper_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IBandSiteHelper_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IBandSiteHelper_LoadFromStreamBS(T,a,b) (T)->lpVtbl->LoadFromStreamBS(T,a,b)
|
||||
#define IBandSiteHelper_SaveToStreamBS(T,a,b) (T)->lpVtbl->SaveToStreamBS(T,a,b)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IAddressBand interface
|
||||
*/
|
||||
#define INTERFACE IShellBrowserService
|
||||
DECLARE_INTERFACE_(IShellBrowserService, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IShellBrowserService ***/
|
||||
STDMETHOD(GetPropertyBag)(THIS_ long flags, REFIID riid, void **ppvObject) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define IShellBrowserService_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define IShellBrowserService_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define IShellBrowserService_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define IShellBrowserService_GetPropertyBag(T,a,b,c) (T)->lpVtbl->GetPropertyBag(T,a,b,c)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* ITrayPriv interface
|
||||
*/
|
||||
#define INTERFACE ITrayPriv
|
||||
DECLARE_INTERFACE_(ITrayPriv, IUnknown)
|
||||
{
|
||||
/*** IUnknown ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
/*** IOleWindow methods ***/
|
||||
STDMETHOD_(HRESULT,GetWindow)(THIS_ HWND*) PURE;
|
||||
STDMETHOD_(HRESULT,ContextSensitiveHelp)(THIS_ BOOL) PURE;
|
||||
/*** ITrayPriv ***/
|
||||
STDMETHOD_(HRESULT,Execute)(THIS_ IShellFolder*,LPCITEMIDLIST) PURE;
|
||||
STDMETHOD_(HRESULT,Unknown)(THIS_ PVOID,PVOID,PVOID,PVOID) PURE;
|
||||
STDMETHOD_(HRESULT,AppendMenu)(THIS_ HMENU*) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
#define ITrayPriv_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
|
||||
#define ITrayPriv_AddRef(T) (T)->lpVtbl->AddRef(T)
|
||||
#define ITrayPriv_Release(T) (T)->lpVtbl->Release(T)
|
||||
#define ITrayPriv_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a)
|
||||
#define ITrayPriv_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a)
|
||||
#define ITrayPriv_Execute(T,a,b) (T)->lpVtbl->Execute(T,a,b)
|
||||
#define ITrayPriv_Unknown(T,a,b,c,d) (T)->lpVtbl->Unknown(T,a,b,c,d)
|
||||
#define ITrayPriv_AppendMenu(T,a) (T)->lpVtbl->AppendMenu(T,a)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* Shell32 resources
|
||||
*/
|
||||
// these resources are in shell32.dll
|
||||
#define IDB_GOBUTTON_NORMAL 0x0e6
|
||||
#define IDB_GOBUTTON_HOT 0x0e7
|
||||
|
||||
// band ids in internet toolbar
|
||||
#define ITBBID_MENUBAND 1
|
||||
#define ITBBID_BRANDBAND 5
|
||||
#define ITBBID_TOOLSBAND 2
|
||||
#define ITBBID_ADDRESSBAND 4
|
||||
|
||||
// commands in the CGID_PrivCITCommands command group handled by the internet toolbar
|
||||
// there seems to be some support for hiding the menubar and an auto hide feature that are
|
||||
// unavailable in the UI
|
||||
#define ITID_TEXTLABELS 3
|
||||
#define ITID_TOOLBARBANDSHOWN 4
|
||||
#define ITID_ADDRESSBANDSHOWN 5
|
||||
#define ITID_LINKSBANDSHOWN 6
|
||||
#define ITID_MENUBANDSHOWN 12
|
||||
#define ITID_AUTOHIDEENABLED 13
|
||||
#define ITID_CUSTOMIZEENABLED 20
|
||||
#define ITID_TOOLBARLOCKED 27
|
||||
|
||||
// commands in the CGID_BrandCmdGroup command group handled by the brand band
|
||||
#define BBID_STARTANIMATION 1
|
||||
#define BBID_STOPANIMATION 2
|
||||
|
||||
// undocumented flags for IShellMenu::SetShellFolder
|
||||
#define SMSET_UNKNOWN08 0x08
|
||||
#define SMSET_UNKNOWN10 0x10
|
||||
|
||||
BOOL WINAPI ILGetDisplayNameEx(IShellFolder *psf, LPCITEMIDLIST pidl, LPVOID path, DWORD type);
|
||||
|
||||
/* type parameter for ILGetDisplayNameEx() */
|
||||
#define ILGDN_FORPARSING 0
|
||||
#define ILGDN_NORMAL 1
|
||||
#define ILGDN_INFOLDER 2
|
||||
|
||||
HANDLE WINAPI SHCreateDesktop(IShellDesktopTray*);
|
||||
BOOL WINAPI SHDesktopMessageLoop(HANDLE);
|
||||
|
||||
#define WM_GETISHELLBROWSER (WM_USER+7)
|
||||
BOOL WINAPI SetShellWindow(HWND);
|
||||
BOOL WINAPI SetShellWindowEx(HWND, HWND);
|
||||
BOOL WINAPI RegisterShellHook(HWND, DWORD);
|
||||
IStream* WINAPI SHGetViewStream(LPCITEMIDLIST, DWORD, LPCTSTR, LPCTSTR, LPCTSTR);
|
||||
BOOL WINAPI SHIsEmptyStream(IStream*);
|
||||
|
||||
typedef struct tagCREATEMRULISTA
|
||||
{
|
||||
DWORD cbSize;
|
||||
DWORD nMaxItems;
|
||||
DWORD dwFlags;
|
||||
HKEY hKey;
|
||||
LPCSTR lpszSubKey;
|
||||
PROC lpfnCompare;
|
||||
} CREATEMRULISTA, *LPCREATEMRULISTA;
|
||||
typedef struct tagCREATEMRULISTW
|
||||
{
|
||||
DWORD cbSize;
|
||||
DWORD nMaxItems;
|
||||
DWORD dwFlags;
|
||||
HKEY hKey;
|
||||
LPCWSTR lpszSubKey;
|
||||
PROC lpfnCompare;
|
||||
} CREATEMRULISTW, *LPCREATEMRULISTW;
|
||||
|
||||
#define MRU_BINARY 0x1
|
||||
#define MRU_CACHEWRITE 0x2
|
||||
|
||||
HANDLE WINAPI CreateMRUListW(LPCREATEMRULISTW);
|
||||
HANDLE WINAPI CreateMRUListA(LPCREATEMRULISTA);
|
||||
INT WINAPI AddMRUData(HANDLE,LPCVOID,DWORD);
|
||||
INT WINAPI FindMRUData(HANDLE,LPCVOID,DWORD,LPINT);
|
||||
VOID WINAPI FreeMRUList(HANDLE);
|
||||
|
||||
#define DC_NOSENDMSG 0x2000
|
||||
BOOL WINAPI DrawCaptionTempA(HWND,HDC,const RECT*,HFONT,HICON,LPCSTR,UINT);
|
||||
BOOL WINAPI DrawCaptionTempW(HWND,HDC,const RECT*,HFONT,HICON,LPCWSTR,UINT);
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef CREATEMRULISTW CREATEMRULIST, *PCREATEMRULIST;
|
||||
#define CreateMRUList CreateMRUListW
|
||||
#define DrawCaptionTemp DrawCaptionTempW
|
||||
#else
|
||||
typedef CREATEMRULISTA CREATEMRULIST, *PCREATEMRULIST;
|
||||
#define CreateMRUList CreateMRUListA
|
||||
#define DrawCaptionTemp DrawCaptionTempA
|
||||
#endif
|
||||
|
||||
HRESULT WINAPI SHInvokeDefaultCommand(HWND,IShellFolder*,LPCITEMIDLIST);
|
||||
|
||||
HRESULT WINAPI SHPropertyBag_ReadPOINTL(IPropertyBag*,LPCWSTR,POINTL*);
|
||||
|
||||
HRESULT WINAPI SHGetPerScreenResName(OUT LPWSTR lpResName,
|
||||
IN INT cchResName,
|
||||
IN DWORD dwReserved);
|
||||
|
||||
HRESULT WINAPI SHPropertyBag_ReadStream(IPropertyBag*,LPCWSTR,IStream**);
|
||||
|
||||
HWND WINAPI SHCreateWorkerWindowA(LONG wndProc, HWND hWndParent, DWORD dwExStyle,
|
||||
DWORD dwStyle, HMENU hMenu, LONG z);
|
||||
|
||||
HWND WINAPI SHCreateWorkerWindowW(LONG wndProc, HWND hWndParent, DWORD dwExStyle,
|
||||
DWORD dwStyle, HMENU hMenu, LONG z);
|
||||
#ifdef UNICODE
|
||||
#define SHCreateWorkerWindow SHCreateWorkerWindowW
|
||||
#else
|
||||
#define SHCreateWorkerWindow SHCreateWorkerWindowA
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
#endif // __SHLOBJ_UNDOC__H
|
78
reactos/include/psdk/shlwapi_undoc.h
Normal file
78
reactos/include/psdk/shlwapi_undoc.h
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* ReactOS shlwapi
|
||||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __SHLWAPI_UNDOC_H
|
||||
#define __SHLWAPI_UNDOC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
struct IEThreadParamBlock
|
||||
{
|
||||
long offset0;
|
||||
long offset4;
|
||||
long offset8;
|
||||
IUnknown *offsetC;
|
||||
long offset10;
|
||||
IUnknown *offset14;
|
||||
LPITEMIDLIST directoryPIDL;
|
||||
char filler1[84]; // unknown contents
|
||||
IUnknown *offset70;
|
||||
long filler2; // unknown contents
|
||||
IUnknown *offset78;
|
||||
LPITEMIDLIST offset7C;
|
||||
LPITEMIDLIST offset80;
|
||||
char filler3[116]; // unknown contents
|
||||
IUnknown *offsetF8; // instance explorer
|
||||
long filler4; // unknown contents
|
||||
};
|
||||
|
||||
void WINAPI InitOCHostClass(long param8);
|
||||
long WINAPI SHOpenFolderWindow(IEThreadParamBlock *param8);
|
||||
void WINAPI SHCreateSavedWindows();
|
||||
long WINAPI SHCreateFromDesktop(long param8);
|
||||
long WINAPI SHExplorerParseCmdLine(LPCTSTR commandLine);
|
||||
void WINAPI UEMRegisterNotify(long param8, long paramC);
|
||||
HRESULT WINAPI SHCreateBandForPidl(LPCITEMIDLIST param8, IUnknown *paramC, BOOL param10);
|
||||
HRESULT WINAPI SHPidlFromDataObject(IDataObject *param8, long *paramC, long param10, FILEDESCRIPTORW *param14);
|
||||
long WINAPI IDataObject_GetDeskBandState(long param8);
|
||||
IEThreadParamBlock *WINAPI SHCreateIETHREADPARAM(long param8, long paramC, IUnknown *param10, IUnknown *param14);
|
||||
IEThreadParamBlock *WINAPI SHCloneIETHREADPARAM(IEThreadParamBlock *param);
|
||||
long WINAPI SHParseIECommandLine(long param8, long paramC);
|
||||
void WINAPI SHDestroyIETHREADPARAM(IEThreadParamBlock *param);
|
||||
HRESULT WINAPI SHOnCWMCommandLine(long param8);
|
||||
LPITEMIDLIST WINAPI Channel_GetFolderPidl();
|
||||
IUnknown *WINAPI ChannelBand_Create(LPITEMIDLIST pidl);
|
||||
HRESULT WINAPI Channels_SetBandInfoSFB(IUnknown *param8);
|
||||
HRESULT WINAPI IUnknown_SetBandInfoSFB(IUnknown *param8, long paramC);
|
||||
HRESULT WINAPI Channel_QuickLaunch();
|
||||
HRESULT WINAPI SHGetNavigateTarget(long param8, long paramC, long param10, long param14);
|
||||
HRESULT WINAPI GetInfoTip(IUnknown *param8, long paramC, LPTSTR *param10, long cchMax);
|
||||
HRESULT WINAPI SHEnumClassesOfCategories(long param8, long paramC, long param10, long param14, long param18);
|
||||
HRESULT WINAPI SHWriteClassesOfCategories(long param8, long paramC, long param10, long param14, long param18, long param1C, long param20);
|
||||
BOOL WINAPI SHIsExplorerBrowser();
|
||||
HRESULT WINAPI SHOpenNewFrame(LPITEMIDLIST pidl, IUnknown *paramC, long param10, long param14);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
#endif /* __SHLWAPI_UNDOC_H */
|
|
@ -1868,4 +1868,859 @@ interface IMenuBand : IUnknown
|
|||
[out] LRESULT* plRet);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* IProfferService interface
|
||||
*/
|
||||
[
|
||||
uuid(cb728b20-f786-11ce-92ad-00aa00a74cd0),
|
||||
object,
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface IProfferService : IUnknown
|
||||
{
|
||||
HRESULT ProfferService(
|
||||
[in] REFGUID rguidService,
|
||||
[in] IServiceProvider *psp,
|
||||
[out] DWORD *pdwCookie);
|
||||
|
||||
HRESULT RevokeService(
|
||||
[in] DWORD dwCookie);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* IShellMenuCallback interface
|
||||
*/
|
||||
cpp_quote("#include <pshpack8.h>")
|
||||
|
||||
typedef struct tagSMDATA
|
||||
{
|
||||
DWORD dwMask;
|
||||
DWORD dwFlags;
|
||||
HMENU hmenu;
|
||||
HWND hwnd;
|
||||
UINT uId;
|
||||
UINT uIdParent;
|
||||
UINT uIdAncestor;
|
||||
IUnknown *punk;
|
||||
LPITEMIDLIST pidlFolder;
|
||||
LPITEMIDLIST pidlItem;
|
||||
IShellFolder *psf;
|
||||
void *pvUserData;
|
||||
} SMDATA, *LPSMDATA;
|
||||
|
||||
cpp_quote("#define SMDM_SHELLFOLDER 0x00000001")
|
||||
cpp_quote("#define SMDM_HMENU 0x00000002")
|
||||
cpp_quote("#define SMDM_TOOLBAR 0x00000004")
|
||||
|
||||
typedef struct tagSMINFO
|
||||
{
|
||||
DWORD dwMask;
|
||||
DWORD dwType;
|
||||
DWORD dwFlags;
|
||||
int iIcon;
|
||||
} SMINFO, *PSMINFO;
|
||||
|
||||
typedef struct tagSHCSCHANGENOTIFYSTRUCT
|
||||
{
|
||||
LONG lEvent;
|
||||
LPCITEMIDLIST pidl1;
|
||||
LPCITEMIDLIST pidl2;
|
||||
} SMCSHCHANGENOTIFYSTRUCT, *PSMCSHCHANGENOTIFYSTRUCT;
|
||||
|
||||
cpp_quote("#include <poppack.h>")
|
||||
|
||||
enum
|
||||
{
|
||||
SMIM_TYPE = 0x00000001,
|
||||
SMIM_FLAGS = 0x00000002,
|
||||
SMIM_ICON = 0x00000004
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SMIT_SEPARATOR = 0x00000001,
|
||||
SMIT_STRING = 0x00000002
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SMIF_ICON = 0x00000001,
|
||||
SMIF_ACCELERATOR = 0x00000002,
|
||||
SMIF_DROPTARGET = 0x00000004,
|
||||
SMIF_SUBMENU = 0x00000008,
|
||||
SMIF_CHECKED = 0x00000020,
|
||||
SMIF_DROPCASCADE = 0x00000040,
|
||||
SMIF_HIDDEN = 0x00000080,
|
||||
SMIF_DISABLED = 0x00000100,
|
||||
SMIF_TRACKPOPUP = 0x00000200,
|
||||
SMIF_DEMOTED = 0x00000400,
|
||||
SMIF_ALTSTATE = 0x00000800,
|
||||
SMIF_DRAGNDROP = 0x00001000,
|
||||
SMIF_NEW = 0x00002000,
|
||||
};
|
||||
|
||||
|
||||
cpp_quote("#define SMC_INITMENU 0x00000001")
|
||||
cpp_quote("#define SMC_CREATE 0x00000002")
|
||||
cpp_quote("#define SMC_EXITMENU 0x00000003")
|
||||
cpp_quote("#define SMC_GETINFO 0x00000005")
|
||||
cpp_quote("#define SMC_GETSFINFO 0x00000006")
|
||||
cpp_quote("#define SMC_GETOBJECT 0x00000007")
|
||||
cpp_quote("#define SMC_GETSFOBJECT 0x00000008")
|
||||
cpp_quote("#define SMC_SFEXEC 0x00000009")
|
||||
cpp_quote("#define SMC_SFSELECTITEM 0x0000000A")
|
||||
cpp_quote("#define SMC_REFRESH 0x00000010")
|
||||
cpp_quote("#define SMC_DEMOTE 0x00000011")
|
||||
cpp_quote("#define SMC_PROMOTE 0x00000012")
|
||||
cpp_quote("#define SMC_DEFAULTICON 0x00000016")
|
||||
cpp_quote("#define SMC_NEWITEM 0x00000017")
|
||||
cpp_quote("#define SMC_CHEVRONEXPAND 0x00000019")
|
||||
cpp_quote("#define SMC_DISPLAYCHEVRONTIP 0x0000002A")
|
||||
cpp_quote("#define SMC_SETSFOBJECT 0x0000002D")
|
||||
cpp_quote("#define SMC_SHCHANGENOTIFY 0x0000002E")
|
||||
cpp_quote("#define SMC_CHEVRONGETTIP 0x0000002F")
|
||||
cpp_quote("#define SMC_SFDDRESTRICTED 0x00000030")
|
||||
|
||||
[
|
||||
uuid(4CA300A1-9B8D-11d1-8B22-00C04FD918D0),
|
||||
object,
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface IShellMenuCallback : IUnknown
|
||||
{
|
||||
HRESULT CallbackSM(
|
||||
[in, out] LPSMDATA psmd,
|
||||
[in] UINT uMsg,
|
||||
[in] WPARAM wParam,
|
||||
[in] LPARAM lParam);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IShellMenu interface
|
||||
*/
|
||||
|
||||
cpp_quote("#define SMINIT_DEFAULT 0x00000000")
|
||||
cpp_quote("#define SMINIT_RESTRICT_DRAGDROP 0x00000002")
|
||||
cpp_quote("#define SMINIT_TOPLEVEL 0x00000004")
|
||||
cpp_quote("#define SMINIT_CACHED 0x00000010")
|
||||
cpp_quote("#define SMINIT_VERTICAL 0x10000000")
|
||||
cpp_quote("#define SMINIT_HORIZONTAL 0x20000000")
|
||||
cpp_quote("")
|
||||
cpp_quote("#define ANCESTORDEFAULT (UINT)-1")
|
||||
cpp_quote("")
|
||||
cpp_quote("#define SMSET_TOP 0x10000000")
|
||||
cpp_quote("#define SMSET_BOTTOM 0x20000000")
|
||||
cpp_quote("#define SMSET_DONTOWN 0x00000001")
|
||||
cpp_quote("")
|
||||
cpp_quote("#define SMINV_REFRESH 0x00000001")
|
||||
cpp_quote("#define SMINV_ID 0x00000008")
|
||||
|
||||
[
|
||||
uuid(EE1F7637-E138-11d1-8379-00C04FD918D0),
|
||||
object,
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface IShellMenu : IUnknown
|
||||
{
|
||||
HRESULT Initialize(
|
||||
[in] IShellMenuCallback *psmc,
|
||||
[in] UINT uId,
|
||||
[in] UINT uIdAncestor,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT GetMenuInfo(
|
||||
[out] IShellMenuCallback **ppsmc,
|
||||
[out] UINT *puId,
|
||||
[out] UINT *puIdAncestor,
|
||||
[out] DWORD *pdwFlags);
|
||||
|
||||
HRESULT SetShellFolder(
|
||||
[in] IShellFolder *psf,
|
||||
[in] LPCITEMIDLIST pidlFolder,
|
||||
[in] HKEY hKey,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT GetShellFolder(
|
||||
[out] DWORD *pdwFlags,
|
||||
[out] LPITEMIDLIST *ppidl,
|
||||
[in] REFIID riid,
|
||||
[out] void **ppv);
|
||||
|
||||
HRESULT SetMenu(
|
||||
[in] HMENU hmenu,
|
||||
[in] HWND hwnd,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT GetMenu(
|
||||
[out] HMENU *phmenu,
|
||||
[out] HWND *phwnd,
|
||||
[out] DWORD *pdwFlags);
|
||||
|
||||
HRESULT InvalidateItem(
|
||||
[in] LPSMDATA psmd,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT GetState(
|
||||
[out] LPSMDATA psmd);
|
||||
|
||||
HRESULT SetMenuToolbar(
|
||||
[in] IUnknown *punk,
|
||||
[in] DWORD dwFlags);
|
||||
}
|
||||
|
||||
|
||||
typedef struct _WINDOWDATA
|
||||
{
|
||||
DWORD dwWindowID;
|
||||
UINT uiCP;
|
||||
LPITEMIDLIST pidl;
|
||||
[string] LPWSTR lpszUrl;
|
||||
[string] LPWSTR lpszUrlLocation;
|
||||
[string] LPWSTR lpszTitle;
|
||||
} WINDOWDATA;
|
||||
|
||||
typedef WINDOWDATA *LPWINDOWDATA;
|
||||
typedef const WINDOWDATA *LPCWINDOWDATA;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* ITravelEntry interface
|
||||
*/
|
||||
[
|
||||
uuid(F46EDB3B-BC2F-11d0-9412-00AA00A3EBD3),
|
||||
object,
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface ITravelEntry : IUnknown
|
||||
{
|
||||
HRESULT Invoke(
|
||||
[in] IUnknown *punk);
|
||||
|
||||
HRESULT Update(
|
||||
[in] IUnknown *punk,
|
||||
BOOL fIsLocalAnchor);
|
||||
|
||||
HRESULT GetPidl(
|
||||
[in] LPITEMIDLIST *ppidl);
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* ITravelLogClient interface
|
||||
*/
|
||||
[
|
||||
uuid(241c033e-e659-43da-aa4d-4086dbc4758d),
|
||||
object,
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface ITravelLogClient : IUnknown
|
||||
{
|
||||
HRESULT FindWindowByIndex(
|
||||
[in] DWORD dwID,
|
||||
[out] IUnknown **ppunk);
|
||||
|
||||
HRESULT GetWindowData(
|
||||
[out] LPWINDOWDATA pWinData);
|
||||
|
||||
HRESULT LoadHistoryPosition(
|
||||
[in] LPWSTR pszUrlLocation,
|
||||
[in] DWORD dwPosition);
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* ITravelLog interface
|
||||
*/
|
||||
[
|
||||
uuid(02BA3B52-0547-11D1-B833-00C04FC9B31F),
|
||||
object,
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface ITravelLog : IUnknown
|
||||
{
|
||||
enum tagTLENUMF
|
||||
{
|
||||
TLEF_RELATIVE_INCLUDE_CURRENT = 0x00000001,
|
||||
TLEF_RELATIVE_BACK = 0x00000010,
|
||||
TLEF_RELATIVE_FORE = 0x00000020,
|
||||
TLEF_INCLUDE_UNINVOKEABLE = 0x00000040,
|
||||
TLEF_ABSOLUTE = 0x00000031,
|
||||
};
|
||||
typedef DWORD TLENUMF;
|
||||
|
||||
HRESULT AddEntry(
|
||||
[in] IUnknown *punk,
|
||||
BOOL fIsLocalAnchor);
|
||||
|
||||
HRESULT UpdateEntry(
|
||||
[in] IUnknown *punk,
|
||||
BOOL fIsLocalAnchor);
|
||||
|
||||
HRESULT UpdateExternal(
|
||||
[in] IUnknown *punk,
|
||||
[in] IUnknown *punkHLBrowseContext);
|
||||
|
||||
HRESULT Travel(
|
||||
[in] IUnknown *punk,
|
||||
int iOffset);
|
||||
|
||||
HRESULT GetTravelEntry(
|
||||
[in] IUnknown *punk,
|
||||
int iOffset,
|
||||
[out] ITravelEntry **ppte);
|
||||
|
||||
HRESULT FindTravelEntry(
|
||||
[in] IUnknown *punk,
|
||||
[in] LPCITEMIDLIST pidl,
|
||||
[out] ITravelEntry **ppte);
|
||||
|
||||
HRESULT GetToolTipText(
|
||||
[in] IUnknown *punk,
|
||||
int iOffset,
|
||||
int idsTemplate,
|
||||
[out] LPWSTR pwzText,
|
||||
DWORD cchText);
|
||||
|
||||
HRESULT InsertMenuEntries(
|
||||
[in] IUnknown *punk,
|
||||
[in, out] HMENU hmenu,
|
||||
int nPos,
|
||||
int idFirst,
|
||||
int idLast,
|
||||
DWORD dwFlags);
|
||||
|
||||
HRESULT Clone(
|
||||
[out] ITravelLog **pptl);
|
||||
|
||||
DWORD CountEntries(
|
||||
[in] IUnknown *punk);
|
||||
|
||||
HRESULT Revert();
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IShellService interface
|
||||
*/
|
||||
[
|
||||
object,
|
||||
uuid(5836FB00-8187-11CF-A12B-00AA004AE837),
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface IShellService : IUnknown
|
||||
{
|
||||
HRESULT SetOwner(
|
||||
[in] IUnknown *owner);
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
* IShellBrowser interface
|
||||
*/
|
||||
[
|
||||
object,
|
||||
uuid(02BA3B52-0547-11D1-B833-00C04FC9B31F),
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface IBrowserService : IUnknown
|
||||
{
|
||||
typedef enum tagBNSTATE
|
||||
{
|
||||
BNS_NORMAL = 0,
|
||||
BNS_BEGIN_NAVIGATE = 1,
|
||||
BNS_NAVIGATE = 2
|
||||
} BNSTATE;
|
||||
|
||||
cpp_quote("#include <pshpack8.h>")
|
||||
typedef struct basebrowserdataxp
|
||||
{
|
||||
HWND _hwnd;
|
||||
ITravelLog *_ptl;
|
||||
IUnknown *_phlf;
|
||||
IUnknown *_pautoWB2;
|
||||
IUnknown *_pautoEDS;
|
||||
IShellService *_pautoSS;
|
||||
int _eSecureLockIcon;
|
||||
DWORD _fCreatingViewWindow;
|
||||
UINT _uActivateState;
|
||||
LPITEMIDLIST _pidlViewState;
|
||||
IOleCommandTarget *_pctView;
|
||||
LPITEMIDLIST _pidlCur;
|
||||
IShellView *_psv;
|
||||
IShellFolder *_psf;
|
||||
HWND _hwndView;
|
||||
LPWSTR _pszTitleCur;
|
||||
LPITEMIDLIST _pidlPending;
|
||||
IShellView *_psvPending;
|
||||
IShellFolder *_psfPending;
|
||||
HWND _hwndViewPending;
|
||||
LPWSTR _pszTitlePending;
|
||||
BOOL _fIsViewMSHTML;
|
||||
BOOL _fPrivacyImpacted;
|
||||
CLSID _clsidView;
|
||||
CLSID _clsidViewPending;
|
||||
HWND _hwndFrame;
|
||||
} BASEBROWSERDATAXP;
|
||||
typedef struct basebrowserdataxp *LPBASEBROWSERDATAXP;
|
||||
|
||||
typedef struct basebrowserdatalh
|
||||
{
|
||||
HWND _hwnd;
|
||||
ITravelLog *_ptl;
|
||||
IUnknown *_phlf;
|
||||
IUnknown *_pautoWB2;
|
||||
IUnknown *_pautoEDS;
|
||||
IShellService *_pautoSS;
|
||||
int _eSecureLockIcon;
|
||||
DWORD _fCreatingViewWindow;
|
||||
UINT _uActivateState;
|
||||
LPITEMIDLIST _pidlViewState;
|
||||
IOleCommandTarget *_pctView;
|
||||
LPITEMIDLIST _pidlCur;
|
||||
IShellView *_psv;
|
||||
IShellFolder *_psf;
|
||||
HWND _hwndView;
|
||||
LPWSTR _pszTitleCur;
|
||||
LPITEMIDLIST _pidlPending;
|
||||
IShellView *_psvPending;
|
||||
IShellFolder *_psfPending;
|
||||
HWND _hwndViewPending;
|
||||
LPWSTR _pszTitlePending;
|
||||
BOOL _fIsViewMSHTML;
|
||||
BOOL _fPrivacyImpacted;
|
||||
CLSID _clsidView;
|
||||
CLSID _clsidViewPending;
|
||||
HWND _hwndFrame;
|
||||
LONG _lPhishingFilterStatus;
|
||||
} BASEBROWSERDATALH;
|
||||
cpp_quote("#include <poppack.h>")
|
||||
typedef struct basebrowserdatalh *LPBASEBROWSERDATALH;
|
||||
|
||||
typedef BASEBROWSERDATAXP BASEBROWSERDATA;
|
||||
|
||||
typedef const BASEBROWSERDATA *LPCBASEBROWSERDATA;
|
||||
|
||||
typedef BASEBROWSERDATA *LPBASEBROWSERDATA;
|
||||
|
||||
typedef struct SToolbarItem
|
||||
{
|
||||
IDockingWindow *ptbar;
|
||||
BORDERWIDTHS rcBorderTool;
|
||||
LPWSTR pwszItem;
|
||||
BOOL fShow;
|
||||
HMONITOR hMon;
|
||||
} TOOLBARITEM;
|
||||
|
||||
typedef struct SToolbarItem *LPTOOLBARITEM;
|
||||
|
||||
HRESULT GetParentSite(
|
||||
[out] IOleInPlaceSite **ppipsite);
|
||||
|
||||
HRESULT SetTitle(
|
||||
[in] IShellView *psv,
|
||||
[in] LPCWSTR pszName);
|
||||
|
||||
HRESULT GetTitle(
|
||||
[in] IShellView *psv,
|
||||
[out] LPWSTR pszName,
|
||||
DWORD cchName);
|
||||
|
||||
HRESULT GetOleObject(
|
||||
[out] IOleObject **ppobjv);
|
||||
|
||||
HRESULT GetTravelLog(
|
||||
[out] ITravelLog **pptl);
|
||||
|
||||
HRESULT ShowControlWindow(
|
||||
UINT id,
|
||||
BOOL fShow);
|
||||
|
||||
HRESULT IsControlWindowShown(
|
||||
UINT id,
|
||||
[out] BOOL *pfShown);
|
||||
|
||||
HRESULT IEGetDisplayName(
|
||||
[in] LPCITEMIDLIST pidl,
|
||||
[out] LPWSTR pwszName,
|
||||
UINT uFlags);
|
||||
|
||||
HRESULT IEParseDisplayName(
|
||||
UINT uiCP,
|
||||
[in] LPCWSTR pwszPath,
|
||||
[out] LPCITEMIDLIST *ppidlOut);
|
||||
|
||||
HRESULT DisplayParseError(
|
||||
HRESULT hres,
|
||||
[in] LPCWSTR pwszPath);
|
||||
|
||||
HRESULT NavigateToPidl(
|
||||
[in] LPCITEMIDLIST pidl,
|
||||
DWORD grfHLNF);
|
||||
|
||||
HRESULT SetNavigateState(
|
||||
BNSTATE bnstate);
|
||||
|
||||
HRESULT GetNavigateState(
|
||||
[out] BNSTATE *pbnstate);
|
||||
|
||||
HRESULT NotifyRedirect(
|
||||
[in] IShellView *psv,
|
||||
[in] LPCITEMIDLIST pidl,
|
||||
[out] BOOL *pfDidBrowse);
|
||||
|
||||
HRESULT UpdateWindowList();
|
||||
|
||||
HRESULT UpdateBackForwardState();
|
||||
|
||||
HRESULT SetFlags(
|
||||
DWORD dwFlags,
|
||||
DWORD dwFlagMask);
|
||||
|
||||
HRESULT GetFlags(
|
||||
[out] DWORD *pdwFlags);
|
||||
|
||||
HRESULT CanNavigateNow();
|
||||
|
||||
HRESULT GetPidl(
|
||||
[out] LPCITEMIDLIST *ppidl);
|
||||
|
||||
HRESULT SetReferrer(
|
||||
[in] LPCITEMIDLIST pidl);
|
||||
|
||||
DWORD GetBrowserIndex();
|
||||
|
||||
HRESULT GetBrowserByIndex(
|
||||
DWORD dwID,
|
||||
[out] IUnknown **ppunk);
|
||||
|
||||
HRESULT GetHistoryObject(
|
||||
[out] IOleObject **ppole,
|
||||
[out] IStream **pstm,
|
||||
[out] IBindCtx **ppbc);
|
||||
|
||||
HRESULT SetHistoryObject(
|
||||
[in] IOleObject *pole,
|
||||
BOOL fIsLocalAnchor);
|
||||
|
||||
HRESULT CacheOLEServer(
|
||||
[in] IOleObject *pole);
|
||||
|
||||
HRESULT GetSetCodePage(
|
||||
[in] VARIANT *pvarIn,
|
||||
[out] VARIANT *pvarOut);
|
||||
|
||||
HRESULT OnHttpEquiv(
|
||||
[in] IShellView *psv,
|
||||
BOOL fDone,
|
||||
[in] VARIANT *pvarargIn,
|
||||
[out] VARIANT *pvarargOut);
|
||||
|
||||
HRESULT GetPalette(
|
||||
[out] HPALETTE *hpal);
|
||||
|
||||
HRESULT RegisterWindow(
|
||||
BOOL fForceRegister,
|
||||
int swc);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IShellBrowser2 interface
|
||||
*/
|
||||
[
|
||||
uuid(68BD21CC-438B-11D2-A560-00A0C92DBFE8),
|
||||
object,
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface IBrowserService2 : IBrowserService
|
||||
{
|
||||
typedef struct tagFolderSetData
|
||||
{
|
||||
FOLDERSETTINGS _fs;
|
||||
SHELLVIEWID _vidRestore;
|
||||
DWORD _dwViewPriority;
|
||||
} FOLDERSETDATA;
|
||||
|
||||
typedef struct tagFolderSetData *LPFOLDERSETDATA;
|
||||
|
||||
LRESULT WndProcBS(
|
||||
[in] HWND hwnd,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam);
|
||||
|
||||
HRESULT SetAsDefFolderSettings();
|
||||
|
||||
HRESULT GetViewRect(
|
||||
[out] RECT *prc);
|
||||
|
||||
HRESULT OnSize(
|
||||
WPARAM wParam);
|
||||
|
||||
HRESULT OnCreate(
|
||||
[in] struct tagCREATESTRUCTW *pcs);
|
||||
|
||||
LRESULT OnCommand(
|
||||
WPARAM wParam,
|
||||
LPARAM lParam);
|
||||
|
||||
HRESULT OnDestroy();
|
||||
|
||||
LRESULT OnNotify(
|
||||
[in] struct tagNMHDR *pnm);
|
||||
|
||||
HRESULT OnSetFocus();
|
||||
|
||||
HRESULT OnFrameWindowActivateBS(
|
||||
BOOL fActive);
|
||||
|
||||
HRESULT ReleaseShellView();
|
||||
|
||||
HRESULT ActivatePendingView();
|
||||
|
||||
HRESULT CreateViewWindow(
|
||||
[in] IShellView *psvNew,
|
||||
[in] IShellView *psvOld,
|
||||
[in] LPRECT prcView,
|
||||
[out] HWND *phwnd);
|
||||
|
||||
HRESULT CreateBrowserPropSheetExt(
|
||||
[in] REFIID riid,
|
||||
[out] void **ppv);
|
||||
|
||||
HRESULT GetViewWindow(
|
||||
[out] HWND *phwndView);
|
||||
|
||||
HRESULT GetBaseBrowserData(
|
||||
[out] LPCBASEBROWSERDATA *pbbd);
|
||||
|
||||
LPBASEBROWSERDATA PutBaseBrowserData();
|
||||
|
||||
HRESULT InitializeTravelLog(
|
||||
[in] ITravelLog *ptl,
|
||||
DWORD dw);
|
||||
|
||||
HRESULT SetTopBrowser();
|
||||
|
||||
HRESULT Offline(
|
||||
int iCmd);
|
||||
|
||||
HRESULT AllowViewResize(
|
||||
BOOL f);
|
||||
|
||||
HRESULT SetActivateState(
|
||||
UINT u);
|
||||
|
||||
HRESULT UpdateSecureLockIcon(
|
||||
int eSecureLock);
|
||||
|
||||
HRESULT InitializeDownloadManager();
|
||||
|
||||
HRESULT InitializeTransitionSite();
|
||||
|
||||
HRESULT _Initialize(
|
||||
[in] HWND hwnd,
|
||||
[in] IUnknown *pauto);
|
||||
|
||||
HRESULT _CancelPendingNavigationAsync();
|
||||
|
||||
HRESULT _CancelPendingView();
|
||||
|
||||
HRESULT _MaySaveChanges();
|
||||
|
||||
HRESULT _PauseOrResumeView(
|
||||
BOOL fPaused);
|
||||
|
||||
HRESULT _DisableModeless();
|
||||
|
||||
HRESULT _NavigateToPidl(
|
||||
[in] LPCITEMIDLIST pidl,
|
||||
DWORD grfHLNF,
|
||||
DWORD dwFlags);
|
||||
|
||||
HRESULT _TryShell2Rename(
|
||||
[in] IShellView *psv,
|
||||
[in] LPCITEMIDLIST pidlNew);
|
||||
|
||||
HRESULT _SwitchActivationNow();
|
||||
|
||||
HRESULT _ExecChildren(
|
||||
[in] IUnknown *punkBar,
|
||||
BOOL fBroadcast,
|
||||
[in] const GUID *pguidCmdGroup,
|
||||
DWORD nCmdID,
|
||||
DWORD nCmdexecopt,
|
||||
[in] VARIANTARG *pvarargIn,
|
||||
[in, out] VARIANTARG *pvarargOut);
|
||||
|
||||
HRESULT _SendChildren(
|
||||
[in] HWND hwndBar,
|
||||
BOOL fBroadcast,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam);
|
||||
|
||||
HRESULT GetFolderSetData(
|
||||
[out] struct tagFolderSetData *pfsd);
|
||||
|
||||
HRESULT _OnFocusChange(
|
||||
UINT itb);
|
||||
|
||||
HRESULT v_ShowHideChildWindows(
|
||||
BOOL fChildOnly);
|
||||
|
||||
UINT _get_itbLastFocus();
|
||||
|
||||
HRESULT _put_itbLastFocus(
|
||||
UINT itbLastFocus);
|
||||
|
||||
HRESULT _UIActivateView(
|
||||
UINT uState);
|
||||
|
||||
HRESULT _GetViewBorderRect(
|
||||
[out] RECT *prc);
|
||||
|
||||
HRESULT _UpdateViewRectSize();
|
||||
|
||||
HRESULT _ResizeNextBorder(
|
||||
UINT itb);
|
||||
|
||||
HRESULT _ResizeView();
|
||||
|
||||
HRESULT _GetEffectiveClientArea(
|
||||
[out] LPRECT lprectBorder,
|
||||
[in] HMONITOR hmon);
|
||||
|
||||
IStream *v_GetViewStream(
|
||||
[in] LPCITEMIDLIST pidl,
|
||||
DWORD grfMode,
|
||||
[in] LPCWSTR pwszName);
|
||||
|
||||
LRESULT ForwardViewMsg(
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam);
|
||||
|
||||
HRESULT SetAcceleratorMenu(
|
||||
[in] HACCEL hacc);
|
||||
|
||||
int _GetToolbarCount();
|
||||
|
||||
LPTOOLBARITEM _GetToolbarItem(
|
||||
int itb);
|
||||
|
||||
HRESULT _SaveToolbars(
|
||||
[in] IStream *pstm);
|
||||
|
||||
HRESULT _LoadToolbars(
|
||||
[in] IStream *pstm);
|
||||
|
||||
HRESULT _CloseAndReleaseToolbars(
|
||||
BOOL fClose);
|
||||
|
||||
HRESULT v_MayGetNextToolbarFocus(
|
||||
[in] LPMSG lpMsg,
|
||||
UINT itbNext,
|
||||
int citb,
|
||||
[out] LPTOOLBARITEM *pptbi,
|
||||
[out] HWND *phwnd);
|
||||
|
||||
HRESULT _ResizeNextBorderHelper(
|
||||
UINT itb,
|
||||
BOOL bUseHmonitor);
|
||||
|
||||
UINT _FindTBar(
|
||||
[in] IUnknown *punkSrc);
|
||||
|
||||
HRESULT _SetFocus(
|
||||
[in] LPTOOLBARITEM ptbi,
|
||||
[in] HWND hwnd,
|
||||
[in] LPMSG lpMsg);
|
||||
|
||||
HRESULT v_MayTranslateAccelerator(
|
||||
[in] MSG *pmsg);
|
||||
|
||||
HRESULT _GetBorderDWHelper(
|
||||
[in] IUnknown *punkSrc,
|
||||
[out] LPRECT lprectBorder,
|
||||
BOOL bUseHmonitor);
|
||||
|
||||
HRESULT v_CheckZoneCrossing(
|
||||
[in] LPCITEMIDLIST pidl);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IShellBrowser3 interface
|
||||
*/
|
||||
[
|
||||
uuid(27D7CE21-762D-48F3-86F3-40E2FD3749C4),
|
||||
object,
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface IBrowserService3 : IBrowserService2
|
||||
{
|
||||
HRESULT _PositionViewWindow(
|
||||
[in] HWND hwnd,
|
||||
[in] LPRECT prc);
|
||||
|
||||
HRESULT IEParseDisplayNameEx(
|
||||
UINT uiCP,
|
||||
[in] LPCWSTR pwszPath,
|
||||
DWORD dwFlags,
|
||||
[out] LPITEMIDLIST *ppidlOut);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IShellBrowser4 interface
|
||||
*/
|
||||
[
|
||||
uuid(639f1bff-e135-4096-abd8-e0f504d649a4),
|
||||
object,
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface IBrowserService4 : IBrowserService3
|
||||
{
|
||||
HRESULT ActivateView(
|
||||
BOOL fPendingView);
|
||||
|
||||
HRESULT SaveViewState();
|
||||
|
||||
HRESULT _ResizeAllBorders();
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* ITrackShellMenu interface
|
||||
*/
|
||||
[
|
||||
uuid(8278F932-2A3E-11d2-838F-00C04FD918D0),
|
||||
object,
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface ITrackShellMenu : IShellMenu
|
||||
{
|
||||
HRESULT SetObscured(
|
||||
[in] HWND hwndTB,
|
||||
[in] IUnknown *punkBand,
|
||||
DWORD dwSMSetFlags);
|
||||
|
||||
HRESULT Popup(
|
||||
[in] HWND hwnd,
|
||||
[in] POINTL *ppt,
|
||||
[in] RECTL *prcExclude,
|
||||
MP_POPUPFLAGS dwFlags);
|
||||
};
|
||||
|
|
|
@ -91,6 +91,10 @@ DECLARE_HANDLE(HWINSTA);
|
|||
DECLARE_HANDLE(HKL);
|
||||
DECLARE_HANDLE(HGDIOBJ);
|
||||
|
||||
cpp_quote("#if 0")
|
||||
typedef HANDLE HMONITOR;
|
||||
cpp_quote("#endif /* 0 */")
|
||||
|
||||
typedef HANDLE HDWP;
|
||||
|
||||
typedef LONG_PTR LRESULT;
|
||||
|
@ -581,6 +585,36 @@ typedef struct tagMSG
|
|||
POINT pt;
|
||||
} MSG, *PMSG, *NPMSG, *LPMSG;
|
||||
|
||||
typedef struct tagCREATESTRUCTA {
|
||||
LPVOID lpCreateParams;
|
||||
HINSTANCE hInstance;
|
||||
HMENU hMenu;
|
||||
HWND hwndParent;
|
||||
int cy;
|
||||
int cx;
|
||||
int y;
|
||||
int x;
|
||||
LONG style;
|
||||
LPCSTR lpszName;
|
||||
LPCSTR lpszClass;
|
||||
DWORD dwExStyle;
|
||||
} CREATESTRUCTA, *LPCREATESTRUCTA;
|
||||
|
||||
typedef struct tagCREATESTRUCTW {
|
||||
LPVOID lpCreateParams;
|
||||
HINSTANCE hInstance;
|
||||
HMENU hMenu;
|
||||
HWND hwndParent;
|
||||
int cy;
|
||||
int cx;
|
||||
int y;
|
||||
int x;
|
||||
LONG style;
|
||||
LPCWSTR lpszName;
|
||||
LPCWSTR lpszClass;
|
||||
DWORD dwExStyle;
|
||||
} CREATESTRUCTW, *LPCREATESTRUCTW;
|
||||
|
||||
cpp_quote("#endif")
|
||||
|
||||
/******************** GUID TYPES ********************/
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
import "unknwn.idl";
|
||||
|
||||
cpp_quote("#if 0")
|
||||
typedef HANDLE HMONITOR;
|
||||
|
||||
typedef struct _RGNDATAHEADER
|
||||
{
|
||||
|
|
|
@ -244,15 +244,6 @@ inline BOOL WINAPI InlineIsEqualUnknown(REFGUID rguid1)
|
|||
((unsigned long *)&rguid1)[3] == 0x46000000);
|
||||
}
|
||||
|
||||
inline BOOL WINAPI InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
|
||||
{
|
||||
return (
|
||||
((unsigned long *)&rguid1)[0] == ((unsigned long *)&rguid2)[0] &&
|
||||
((unsigned long *)&rguid1)[1] == ((unsigned long *)&rguid2)[1] &&
|
||||
((unsigned long *)&rguid1)[2] == ((unsigned long *)&rguid2)[2] &&
|
||||
((unsigned long *)&rguid1)[3] == ((unsigned long *)&rguid2)[3]);
|
||||
}
|
||||
|
||||
class CComMultiThreadModelNoCS
|
||||
{
|
||||
public:
|
||||
|
@ -331,6 +322,8 @@ public:
|
|||
|
||||
class CAtlModule : public _ATL_MODULE
|
||||
{
|
||||
protected:
|
||||
static GUID m_libid;
|
||||
public:
|
||||
CAtlModule()
|
||||
{
|
||||
|
@ -435,6 +428,8 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
__declspec(selectany) GUID CAtlModule::m_libid = {0x0, 0x0, 0x0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} };
|
||||
|
||||
template <class T>
|
||||
class CAtlModuleT : public CAtlModule
|
||||
{
|
||||
|
@ -553,6 +548,47 @@ public:
|
|||
_pModule = NULL;
|
||||
}
|
||||
|
||||
HRESULT Init(_ATL_OBJMAP_ENTRY *p, HINSTANCE /* h */, const GUID *plibid)
|
||||
{
|
||||
_ATL_OBJMAP_ENTRY *objectMapEntry;
|
||||
|
||||
if (plibid != NULL)
|
||||
m_libid = *plibid;
|
||||
|
||||
if (p != reinterpret_cast<_ATL_OBJMAP_ENTRY *>(-1))
|
||||
{
|
||||
m_pObjMap = p;
|
||||
if (p != NULL)
|
||||
{
|
||||
objectMapEntry = p;
|
||||
while (objectMapEntry->pclsid != NULL)
|
||||
{
|
||||
objectMapEntry->pfnObjectMain(true);
|
||||
objectMapEntry++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void Term()
|
||||
{
|
||||
_ATL_OBJMAP_ENTRY *objectMapEntry;
|
||||
|
||||
if (m_pObjMap != NULL)
|
||||
{
|
||||
objectMapEntry = m_pObjMap;
|
||||
while (objectMapEntry->pclsid != NULL)
|
||||
{
|
||||
if (objectMapEntry->pCF != NULL)
|
||||
objectMapEntry->pCF->Release();
|
||||
objectMapEntry->pCF = NULL;
|
||||
objectMapEntry->pfnObjectMain(false);
|
||||
objectMapEntry++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT GetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
_ATL_OBJMAP_ENTRY *objectMapEntry;
|
||||
|
|
|
@ -49,6 +49,7 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
|
|||
#include "exdisp.h"
|
||||
|
||||
#include "shlguid.h"
|
||||
#include "shlguid_undoc.h"
|
||||
#include "shlobj.h"
|
||||
#include "shldisp.h"
|
||||
#include "comcat.h"
|
||||
|
|
Loading…
Reference in a new issue