Author: gadamopoulos
Date: Sun Apr 9 13:51:39 2017
New Revision: 74292
URL:
http://svn.reactos.org/svn/reactos?rev=74292&view=rev
Log:
[BROWSEUI] -Move the following classes to a new static lib called shellbars: CBandSite,
CBandSiteMenu, CBaseBar, CSHEnumClassesOfCategories.
- This will be linked to rshell in order to implement support for additional toolbars in
the taskbar as well as floating toolbars.
- In the future more classes will be added in this static lib including: CISFBand (which
implements a dockable toolbar that shows the contents of a shell folder), CQuickLinks (a
special CISFBand), CDeskBarApp (a special CBaseBar that implements the floating host for
toolbars) and perhaps more.
Added:
trunk/reactos/dll/win32/browseui/shellbars/
trunk/reactos/dll/win32/browseui/shellbars/CBandSite.cpp
- copied, changed from r74291, trunk/reactos/dll/win32/browseui/bandsite.cpp
trunk/reactos/dll/win32/browseui/shellbars/CBandSite.h
- copied unchanged from r74291, trunk/reactos/dll/win32/browseui/bandsite.h
trunk/reactos/dll/win32/browseui/shellbars/CBandSiteMenu.cpp
- copied, changed from r74291, trunk/reactos/dll/win32/browseui/bandsitemenu.cpp
trunk/reactos/dll/win32/browseui/shellbars/CBandSiteMenu.h
- copied unchanged from r74291, trunk/reactos/dll/win32/browseui/bandsitemenu.h
trunk/reactos/dll/win32/browseui/shellbars/CBaseBar.cpp
- copied, changed from r74291, trunk/reactos/dll/win32/browseui/basebar.cpp
trunk/reactos/dll/win32/browseui/shellbars/CMakeLists.txt (with props)
trunk/reactos/dll/win32/browseui/shellbars/CSHEnumClassesOfCategories.cpp
- copied, changed from r74291, trunk/reactos/dll/win32/browseui/comcat.cpp
trunk/reactos/dll/win32/browseui/shellbars/shellbars.h (with props)
Removed:
trunk/reactos/dll/win32/browseui/bandsite.cpp
trunk/reactos/dll/win32/browseui/bandsite.h
trunk/reactos/dll/win32/browseui/bandsitemenu.cpp
trunk/reactos/dll/win32/browseui/bandsitemenu.h
trunk/reactos/dll/win32/browseui/basebar.cpp
trunk/reactos/dll/win32/browseui/comcat.cpp
Modified:
trunk/reactos/dll/win32/browseui/CMakeLists.txt
trunk/reactos/dll/win32/browseui/browseui.cpp
trunk/reactos/dll/win32/browseui/browseui.h
trunk/reactos/dll/win32/browseui/precomp.h
Modified: trunk/reactos/dll/win32/browseui/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/browseui/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/CMakeLists.txt [iso-8859-1] Sun Apr 9 13:51:39 2017
@@ -1,4 +1,6 @@
PROJECT(SHELL)
+
+add_subdirectory(shellbars)
set_cpp(WITH_RUNTIME)
@@ -11,9 +13,6 @@
addressband.cpp
addresseditbox.cpp
bandproxy.cpp
- bandsite.cpp
- bandsitemenu.cpp
- basebar.cpp
basebarsite.cpp
brandband.cpp
browseui.cpp
@@ -31,7 +30,6 @@
travellog.cpp
utility.cpp
CProgressDialog.cpp
- comcat.cpp
precomp.h)
add_library(browseui SHARED
@@ -41,7 +39,7 @@
${CMAKE_CURRENT_BINARY_DIR}/browseui.def)
set_module_type(browseui win32dll UNICODE)
-target_link_libraries(browseui atlnew uuid wine)
+target_link_libraries(browseui shellbars atlnew uuid wine)
add_importlibs(browseui shlwapi shell32 comctl32 gdi32 ole32 oleaut32 user32 advapi32
msvcrt kernel32 ntdll)
add_pch(browseui precomp.h SOURCE)
add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
Removed: trunk/reactos/dll/win32/browseui/bandsite.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/bandsit…
==============================================================================
--- trunk/reactos/dll/win32/browseui/bandsite.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/bandsite.cpp (removed)
@@ -1,831 +0,0 @@
-/*
- * 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 "precomp.h"
-
-#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)
-{
- ZeroMemory(prbi, 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;
-
- ZeroMemory(&Band->dbi, 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,
reinterpret_cast<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 (FAILED_UNEXPECTEDLY(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()
-{
-
- TRACE("destroying %p\n", this);
-
- if (fRebarWindow != NULL)
- {
- DestroyWindow(fRebarWindow);
- fRebarWindow = NULL;
- }
-
- if (fBands != NULL)
- {
- for (INT i = 0; i < fBandsAllocated; i++)
- {
- if (fBands[i].DeskBand != NULL)
- FreeBand(&fBands[i]);
- }
- CoTaskMemFree(fBands);
- fBands = NULL;
- }
-}
-
-HRESULT STDMETHODCALLTYPE CBandSiteBase::AddBand(IUnknown *punk)
-{
- 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_PPV_ARG(IDeskBand, &DeskBand));
- if (!SUCCEEDED(hRet) || DeskBand == NULL)
- goto Cleanup;
- hRet = punk->QueryInterface(IID_PPV_ARG(IObjectWithSite, &ObjWithSite));
- if (!SUCCEEDED(hRet) || ObjWithSite == NULL)
- goto Cleanup;
- hRet = punk->QueryInterface(IID_PPV_ARG(IOleWindow, &OleWindow));
- if (!SUCCEEDED(hRet) || OleWindow == NULL)
- goto Cleanup;
- hRet = punk->QueryInterface(IID_PPV_ARG(IWinEventHandler, &WndEvtHandler));
- if (!SUCCEEDED(hRet) || WndEvtHandler == NULL)
- goto Cleanup;
-
- hRet = S_OK;
- if (fBandsAllocated > fBandsCount)
- {
- /* Search for a free band object */
- for (INT 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 = static_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));
-
- fBandsAllocated = NewAllocated;
- CoTaskMemFree(fBands);
- fBands = NewBand;
- }
- else
- {
- ASSERT(fBands == NULL);
- ASSERT(fBandsAllocated == 0);
- ASSERT(fBandsCount == 0);
-
- /* Allocate new array */
- fBands = static_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(static_cast<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,
reinterpret_cast<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 */
- BuildRebarBandInfo(NewBand, &rbi);
- 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;
- DWORD style;
-
- TRACE("(%p, %p)\n", this, pUnk);
-
- fOleWindow.Release();
-
- hRet = pUnk->QueryInterface(IID_PPV_ARG(IOleWindow, &fOleWindow));
- if (FAILED_UNEXPECTEDLY(hRet))
- return E_FAIL;
-
- hRet = fOleWindow->GetWindow(&hWndParent);
- if (FAILED_UNEXPECTEDLY(hRet))
- return E_FAIL;
-
- style = WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | RBS_VARHEIGHT | RBS_AUTOSIZE
|
- RBS_BANDBORDERS | CCS_NODIVIDER | CCS_NORESIZE | CCS_NOPARENTALIGN;
-
- fRebarWindow = CreateWindowExW(WS_EX_TOOLWINDOW,
- REBARCLASSNAMEW,
- NULL,
- style,
- 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 hRet;
- }
- 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;
-}
Removed: trunk/reactos/dll/win32/browseui/bandsite.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/bandsit…
==============================================================================
--- trunk/reactos/dll/win32/browseui/bandsite.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/bandsite.h (removed)
@@ -1,150 +0,0 @@
-/*
- * 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
- */
-
-#pragma once
-
-class CBandSiteBase :
- public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public IBandSite,
- public IInputObjectSite,
- public IInputObject,
- public IDeskBarClient,
- public IWinEventHandler,
- public IPersistStream,
- public IDropTarget,
- public IServiceProvider,
- public IBandSiteHelper,
- public IOleCommandTarget
-{
-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_AGGREGATABLE(CBandSite)
-
- DECLARE_PROTECT_FINAL_CONSTRUCT()
-};
Removed: trunk/reactos/dll/win32/browseui/bandsitemenu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/bandsit…
==============================================================================
--- trunk/reactos/dll/win32/browseui/bandsitemenu.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/bandsitemenu.cpp (removed)
@@ -1,96 +0,0 @@
-/*
- * 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 "precomp.h"
-
-CBandSiteMenu::CBandSiteMenu()
-{
-}
-
-CBandSiteMenu::~CBandSiteMenu()
-{
-}
-
-HRESULT STDMETHODCALLTYPE CBandSiteMenu::SetOwner(IUnknown *pOwner)
-{
- TRACE("CBandSiteMenu::SetOwner(%p, %p)\n", this, pOwner);
- m_Owner = pOwner;
- return S_OK;
-}
-
-HRESULT STDMETHODCALLTYPE CBandSiteMenu::QueryContextMenu(
- HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
-{
- BOOL ret;
-
- TRACE("CBandSiteMenu::QueryContextMenu(%p, %p, %u, %u, %u, 0x%x)\n", this,
hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
-
- HMENU hm = LoadMenuW(_AtlBaseModule.GetResourceInstance(),
MAKEINTRESOURCEW(IDM_TASKBAR_TOOLBARS));
- if (!hm)
- return HRESULT_FROM_WIN32(GetLastError());
-
- MENUITEMINFOW mii = { 0 };
- mii.cbSize = sizeof(mii);
- mii.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STATE | MIIM_STRING | MIIM_SUBMENU;
- ret = GetMenuItemInfoW(hm, 0, TRUE, &mii);
- if (!hm)
- return HRESULT_FROM_WIN32(GetLastError());
-
- mii.dwTypeData = new WCHAR[mii.cch + 1];
- mii.cch = mii.cch + 1;
-
- ret = GetMenuItemInfoW(hm, 0, TRUE, &mii);
- if (!hm)
- return HRESULT_FROM_WIN32(GetLastError());
-
- ret = InsertMenuItemW(hmenu, 0, TRUE, &mii);
-
- delete[] mii.dwTypeData;
-
- RemoveMenu(hm, 0, MF_BYPOSITION);
-
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CBandSiteMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpici)
-{
- FIXME("CBandSiteMenu::InvokeCommand is UNIMPLEMENTED (%p, %p)\n", this,
lpici);
- return S_OK;
-}
-
-HRESULT STDMETHODCALLTYPE CBandSiteMenu::GetCommandString(UINT_PTR idCmd, UINT uType,
- UINT *pwReserved, LPSTR pszName, UINT cchMax)
-{
- FIXME("CBandSiteMenu::GetCommandString is UNIMPLEMENTED (%p, %p, %u, %p, %p,
%u)\n", this, idCmd, uType, pwReserved, pszName, cchMax);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CBandSiteMenu::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM
lParam)
-{
- FIXME("CBandSiteMenu::HandleMenuMsg is UNIMPLEMENTED (%p, %u, %p, %p)\n",
this, uMsg, wParam, lParam);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CBandSiteMenu::HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM
lParam, LRESULT *plResult)
-{
- FIXME("CBandSiteMenu::HandleMenuMsg2 is UNIMPLEMENTED(%p, %u, %p, %p,
%p)\n", this, uMsg, wParam, lParam, plResult);
- return E_NOTIMPL;
-}
Removed: trunk/reactos/dll/win32/browseui/bandsitemenu.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/bandsit…
==============================================================================
--- trunk/reactos/dll/win32/browseui/bandsitemenu.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/bandsitemenu.h (removed)
@@ -1,60 +0,0 @@
-/*
- * 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
- */
-
-#pragma once
-
-// 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 IContextMenu3,
- public IShellService
-{
- CComPtr<IUnknown> m_Owner;
-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);
-
- // *** IContextMenu3 methods ***
- virtual HRESULT STDMETHODCALLTYPE HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM
lParam, LRESULT *plResult);
-
- 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()
-};
Removed: trunk/reactos/dll/win32/browseui/basebar.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/basebar…
==============================================================================
--- trunk/reactos/dll/win32/browseui/basebar.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/basebar.cpp (removed)
@@ -1,558 +0,0 @@
-/*
- * 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 "precomp.h"
-
-/*
-Base bar that contains a vertical or horizontal explorer band. It also
-provides resizing abilities.
-*/
-/*
-TODO:
- **Make base bar support resizing -- almost done (need to support integral ?)
- 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 -- done ?
-*/
-
-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
-{
-private:
- 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();
- HRESULT Initialize(BOOL);
-
-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::Initialize(BOOL vert)
-{
- fVertical = (vert == TRUE);
- return S_OK;
-}
-
-HRESULT CBaseBar::ReserveBorderSpace()
-{
- CComPtr<IDockingWindowSite> dockingWindowSite;
- RECT availableBorderSpace;
- RECT neededBorderSpace;
- HRESULT hResult;
-
- hResult = fSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite,
&dockingWindowSite));
- if (FAILED_UNEXPECTEDLY(hResult))
- return hResult;
- hResult = dockingWindowSite->GetBorderDW(static_cast<IDeskBar *>(this),
&availableBorderSpace);
- if (FAILED_UNEXPECTEDLY(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(static_cast<IDeskBar *>(this),
&neededBorderSpace);
- if (FAILED_UNEXPECTEDLY(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)
-{
- return IUnknown_OnFocusChangeIS(fSite, punkObj, fSetFocus);
-}
-
-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))
- {
- // pass through to the explorer ?
- }
- else if (IsEqualIID(*pguidCmdGroup, IID_IDeskBarClient))
- {
- switch (nCmdID)
- {
- case 0:
- // hide current band
- break;
- case 2:
- // switch bands
- 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_PPV_ARG(IServiceProvider,
&serviceProvider));
- if (FAILED_UNEXPECTEDLY(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)
-{
- return IUnknown_UIActivateIO(fClient, fActivate, lpMsg);
-}
-
-HRESULT STDMETHODCALLTYPE CBaseBar::HasFocusIO()
-{
- return IUnknown_HasFocusIO(fClient);
-}
-
-HRESULT STDMETHODCALLTYPE CBaseBar::TranslateAcceleratorIO(LPMSG lpMsg)
-{
- return IUnknown_TranslateAcceleratorIO(fClient, lpMsg);
-}
-
-HRESULT STDMETHODCALLTYPE CBaseBar::SetClient(IUnknown *punkClient)
-{
- CComPtr<IOleWindow> oleWindow;
- HWND ownerWindow;
- HRESULT hResult;
-
- /* Clean up old client */
- fClient = NULL;
-
- if (punkClient)
- {
- hResult = punkClient->QueryInterface(IID_PPV_ARG(IUnknown, &fClient));
- if (FAILED_UNEXPECTEDLY(hResult))
- return hResult;
- hResult = fSite->QueryInterface(IID_PPV_ARG(IOleWindow, &oleWindow));
- if (FAILED_UNEXPECTEDLY(hResult))
- return hResult;
- hResult = oleWindow->GetWindow(&ownerWindow);
- if (FAILED_UNEXPECTEDLY(hResult))
- return hResult;
- Create(ownerWindow, 0, NULL,
- WS_VISIBLE | WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
WS_EX_TOOLWINDOW);
- ReserveBorderSpace();
- }
- else
- {
- DestroyWindow();
- }
- 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;
- ShowWindow(fShow);
- ReserveBorderSpace();
- return S_OK;
-}
-
-HRESULT STDMETHODCALLTYPE CBaseBar::CloseDW(DWORD dwReserved)
-{
- ShowDW(0);
- // Detach from our client
- SetClient(NULL);
- // Destroy our site
- SetSite(NULL);
- 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)
-{
- DWORD dwWidth;
- DWORD dwHeight;
- CComPtr<IOleWindow> pClient;
- HWND clientHwnd;
- HRESULT hr;
-
- if (fVisible)
- {
- dwWidth = LOWORD(lParam);
- dwHeight = HIWORD(lParam);
-
- // substract resizing grips to child's window size
- if (fVertical)
- dwWidth -= GetSystemMetrics(SM_CXFRAME);
- else
- dwHeight -= GetSystemMetrics(SM_CXFRAME);
- hr = fClient->QueryInterface(IID_PPV_ARG(IOleWindow, &pClient));
- if (FAILED_UNEXPECTEDLY(hr))
- return 0;
- hr = pClient->GetWindow(&clientHwnd);
- if (FAILED_UNEXPECTEDLY(hr))
- return 0;
- ::SetWindowPos(clientHwnd, NULL, 0, (fVertical) ? 0 :
GetSystemMetrics(SM_CXFRAME), dwWidth, dwHeight, NULL);
- bHandled = TRUE;
- }
- 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_PPV_ARG(IWinEventHandler,
&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 = fLastLocation.y - newLocation.y;
- if (fNeededSize + delta < 0)
- return 0;
- fNeededSize += delta;
- fLastLocation = newLocation;
- ReserveBorderSpace();
- }
- 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 CBaseBar_CreateInstance(REFIID riid, void **ppv, BOOL vertical)
-{
- return ShellObjectCreatorInit<CBaseBar, BOOL>(vertical, riid, ppv);
-}
Modified: trunk/reactos/dll/win32/browseui/browseui.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/browseu…
==============================================================================
--- trunk/reactos/dll/win32/browseui/browseui.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/browseui.cpp [iso-8859-1] Sun Apr 9 13:51:39 2017
@@ -19,6 +19,106 @@
*/
#include "precomp.h"
+
+
+HRESULT CAddressBand_CreateInstance(REFIID riid, void **ppv)
+{
+#if USE_CUSTOM_ADDRESSBAND
+ return ShellObjectCreator<CAddressBand>(riid, ppv);
+#else
+ return CoCreateInstance(CLSID_SH_AddressBand, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARG(IUnknown, toolsBar));
+#endif
+}
+
+HRESULT CAddressEditBox_CreateInstance(REFIID riid, void **ppv)
+{
+#if USE_CUSTOM_ADDRESSEDITBOX
+ return ShellObjectCreator<CAddressEditBox>(riid, ppv);
+#else
+ return CoCreateInstance(CLSID_AddressEditBox, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARG(riid, &ppv));
+#endif
+}
+
+HRESULT CBandProxy_CreateInstance(REFIID riid, void **ppv)
+{
+#if USE_CUSTOM_BANDPROXY
+ return ShellObjectCreator<CBandProxy>(riid, ppv);
+#else
+ return CoCreateInstance(CLSID_BandProxy, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARG(riid, &ppv));
+#endif
+}
+
+HRESULT CBrandBand_CreateInstance(REFIID riid, void **ppv)
+{
+#if USE_CUSTOM_BRANDBAND
+ return ShellObjectCreator<CBrandBand>(riid, ppv);
+#else
+ return CoCreateInstance(CLSID_BrandBand, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
+#endif
+}
+
+HRESULT CExplorerBand_CreateInstance(REFIID riid, LPVOID *ppv)
+{
+#if USE_CUSTOM_EXPLORERBAND
+ return ShellObjectCreator<CExplorerBand>(riid, ppv);
+#else
+ return CoCreateInstance(CLSID_ExplorerBand, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
+#endif
+}
+
+HRESULT CInternetToolbar_CreateInstance(REFIID riid, void **ppv)
+{
+#if USE_CUSTOM_INTERNETTOOLBAR
+ return ShellObjectCreator<CInternetToolbar>(riid, ppv);
+#else
+ return CoCreateInstance(CLSID_InternetToolbar, NULL, CLSCTX_INPROC_SERVER, riid,
ppv);
+#endif
+}
+
+typedef HRESULT(WINAPI * PMENUBAND_CONSTRUCTOR)(REFIID riid, void **ppv);
+typedef HRESULT(WINAPI * PMERGEDFOLDER_CONSTRUCTOR)(REFIID riid, void **ppv);
+
+HRESULT CMergedFolder_CreateInstance(REFIID riid, void **ppv)
+{
+#if USE_CUSTOM_MERGEDFOLDER
+ HMODULE hRShell = GetModuleHandle(L"rshell.dll");
+ if (!hRShell)
+ hRShell = LoadLibrary(L"rshell.dll");
+
+ if (hRShell)
+ {
+ PMERGEDFOLDER_CONSTRUCTOR pCMergedFolder_Constructor =
(PMERGEDFOLDER_CONSTRUCTOR)
+ GetProcAddress(hRShell, "CMergedFolder_Constructor");
+
+ if (pCMergedFolder_Constructor)
+ {
+ return pCMergedFolder_Constructor(riid, ppv);
+ }
+ }
+#endif
+ return CoCreateInstance(CLSID_MergedFolder, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
+}
+
+HRESULT CMenuBand_CreateInstance(REFIID iid, LPVOID *ppv)
+{
+#if USE_CUSTOM_MENUBAND
+ HMODULE hRShell = GetModuleHandleW(L"rshell.dll");
+
+ if (!hRShell)
+ hRShell = LoadLibraryW(L"rshell.dll");
+
+ if (hRShell)
+ {
+ PMENUBAND_CONSTRUCTOR func = (PMENUBAND_CONSTRUCTOR) GetProcAddress(hRShell,
"CMenuBand_Constructor");
+ if (func)
+ {
+ return func(iid , ppv);
+ }
+ }
+#endif
+ return CoCreateInstance(CLSID_MenuBand, NULL, CLSCTX_INPROC_SERVER, iid, ppv);
+}
+
class CBrowseUIModule : public CComModule
{
Modified: trunk/reactos/dll/win32/browseui/browseui.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/browseu…
==============================================================================
--- trunk/reactos/dll/win32/browseui/browseui.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/browseui.h [iso-8859-1] Sun Apr 9 13:51:39 2017
@@ -9,115 +9,16 @@
#define USE_CUSTOM_EXPLORERBAND 1
#define USE_CUSTOM_INTERNETTOOLBAR 1
-/* Constructors for the classes that are not exported */
+HRESULT CAddressBand_CreateInstance(REFIID riid, void **ppv);
+HRESULT CAddressEditBox_CreateInstance(REFIID riid, void **ppv);
+HRESULT CBandProxy_CreateInstance(REFIID riid, void **ppv);
+HRESULT CBrandBand_CreateInstance(REFIID riid, void **ppv);
+HRESULT CExplorerBand_CreateInstance(REFIID riid, LPVOID *ppv);
+HRESULT CInternetToolbar_CreateInstance(REFIID riid, void **ppv);
+HRESULT CMergedFolder_CreateInstance(REFIID riid, void **ppv);
+HRESULT CMenuBand_CreateInstance(REFIID iid, LPVOID *ppv);
HRESULT CShellBrowser_CreateInstance(LPITEMIDLIST pidl, DWORD dwFlags, REFIID riid, void
**ppv);
HRESULT CTravelLog_CreateInstance(REFIID riid, void **ppv);
HRESULT CBaseBar_CreateInstance(REFIID riid, void **ppv, BOOL vertical);
HRESULT CBaseBarSite_CreateInstance(REFIID riid, void **ppv, BOOL bVertical);
HRESULT CToolsBand_CreateInstance(REFIID riid, void **ppv);
-
-static inline
-HRESULT CAddressBand_CreateInstance(REFIID riid, void **ppv)
-{
-#if USE_CUSTOM_ADDRESSBAND
- return ShellObjectCreator<CAddressBand>(riid, ppv);
-#else
- return CoCreateInstance(CLSID_SH_AddressBand, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARG(IUnknown, toolsBar));
-#endif
-}
-
-static inline
-HRESULT CAddressEditBox_CreateInstance(REFIID riid, void **ppv)
-{
-#if USE_CUSTOM_ADDRESSEDITBOX
- return ShellObjectCreator<CAddressEditBox>(riid, ppv);
-#else
- return CoCreateInstance(CLSID_AddressEditBox, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARG(riid, &ppv));
-#endif
-}
-
-static inline
-HRESULT CBandProxy_CreateInstance(REFIID riid, void **ppv)
-{
-#if USE_CUSTOM_BANDPROXY
- return ShellObjectCreator<CBandProxy>(riid, ppv);
-#else
- return CoCreateInstance(CLSID_BandProxy, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARG(riid, &ppv));
-#endif
-}
-
-static inline
-HRESULT CBrandBand_CreateInstance(REFIID riid, void **ppv)
-{
-#if USE_CUSTOM_BRANDBAND
- return ShellObjectCreator<CBrandBand>(riid, ppv);
-#else
- return CoCreateInstance(CLSID_BrandBand, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
-#endif
-}
-
-static inline
-HRESULT WINAPI CExplorerBand_CreateInstance(REFIID riid, LPVOID *ppv)
-{
-#if USE_CUSTOM_EXPLORERBAND
- return ShellObjectCreator<CExplorerBand>(riid, ppv);
-#else
- return CoCreateInstance(CLSID_ExplorerBand, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
-#endif
-}
-
-static inline
-HRESULT CInternetToolbar_CreateInstance(REFIID riid, void **ppv)
-{
-#if USE_CUSTOM_INTERNETTOOLBAR
- return ShellObjectCreator<CInternetToolbar>(riid, ppv);
-#else
- return CoCreateInstance(CLSID_InternetToolbar, NULL, CLSCTX_INPROC_SERVER, riid,
ppv);
-#endif
-}
-
-typedef HRESULT(WINAPI * PMENUBAND_CONSTRUCTOR)(REFIID riid, void **ppv);
-typedef HRESULT(WINAPI * PMERGEDFOLDER_CONSTRUCTOR)(REFIID riid, void **ppv);
-
-static inline
-HRESULT CMergedFolder_CreateInstance(REFIID riid, void **ppv)
-{
-#if USE_CUSTOM_MERGEDFOLDER
- HMODULE hRShell = GetModuleHandle(L"rshell.dll");
- if (!hRShell)
- hRShell = LoadLibrary(L"rshell.dll");
-
- if (hRShell)
- {
- PMERGEDFOLDER_CONSTRUCTOR pCMergedFolder_Constructor =
(PMERGEDFOLDER_CONSTRUCTOR)
- GetProcAddress(hRShell, "CMergedFolder_Constructor");
-
- if (pCMergedFolder_Constructor)
- {
- return pCMergedFolder_Constructor(riid, ppv);
- }
- }
-#endif
- return CoCreateInstance(CLSID_MergedFolder, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
-}
-
-static inline
-HRESULT CMenuBand_CreateInstance(REFIID iid, LPVOID *ppv)
-{
-#if USE_CUSTOM_MENUBAND
- HMODULE hRShell = GetModuleHandleW(L"rshell.dll");
-
- if (!hRShell)
- hRShell = LoadLibraryW(L"rshell.dll");
-
- if (hRShell)
- {
- PMENUBAND_CONSTRUCTOR func = (PMENUBAND_CONSTRUCTOR) GetProcAddress(hRShell,
"CMenuBand_Constructor");
- if (func)
- {
- return func(iid , ppv);
- }
- }
-#endif
- return CoCreateInstance(CLSID_MenuBand, NULL, CLSCTX_INPROC_SERVER, iid, ppv);
-}
Removed: trunk/reactos/dll/win32/browseui/comcat.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/comcat.…
==============================================================================
--- trunk/reactos/dll/win32/browseui/comcat.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/comcat.cpp (removed)
@@ -1,335 +0,0 @@
-/*
- * ReactOS Explorer
- *
- * Copyright 2016 Sylvain Deverre <deverre dot sylv at gmail dot com>
- *
- * 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
- */
-
-/*
- * Wraps the component categories manager enum
- */
-
-#include "precomp.h"
-
-#define REGPATH
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Discardable\\PostSetup\\Component
Categories"
-#define IMPLEMENTING L"Implementing"
-#define REQUIRING L"Requiring"
-
-typedef struct categoryCacheHeader
-{
- DWORD dwSize; // size of header only
- DWORD version; // currently 1
- SYSTEMTIME writeTime; // time we were written to registry
- DWORD classCount; // number of classes following
-} CATCACHEHDR, *PCATCACHEHDR;
-
-/*
- * This class manages a cached explorer component categories items, writing cache if it
- * doesn't exist yet.
- * It is used by CSHEnumClassesOfCategories internally.
- */
-class CComCatCachedCategory
-{
- public:
- CComCatCachedCategory();
- virtual ~CComCatCachedCategory();
- HRESULT WriteCacheToDSA(HDSA pDest);
- HRESULT STDMETHODCALLTYPE Initialize(CATID &catID, BOOL reloadCache);
- private:
- BOOL LoadFromRegistry();
- HRESULT LoadFromComCatMgr();
- HRESULT CacheDSA();
- CATID fCategory;
- HDSA fLocalDsa;
-};
-
-CComCatCachedCategory::CComCatCachedCategory()
-{
- fLocalDsa = DSA_Create(sizeof(GUID), 5);
-}
-
-HRESULT STDMETHODCALLTYPE CComCatCachedCategory::Initialize(CATID &catID, BOOL
reloadCache)
-{
- HRESULT hr;
-
- fCategory = catID;
- if (reloadCache || !LoadFromRegistry())
- {
- hr = LoadFromComCatMgr();
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
-
- hr = CacheDSA();
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
- }
- return S_OK;
-}
-
-CComCatCachedCategory::~CComCatCachedCategory()
-{
- DSA_Destroy(fLocalDsa);
-}
-
-BOOL CComCatCachedCategory::LoadFromRegistry()
-{
- WCHAR bufKey[MAX_PATH];
- WCHAR guidStr[MAX_PATH];
- DWORD dataSize, i;
- CComHeapPtr<CATCACHEHDR> buffer;
- GUID *guidArray;
-
- if (!fLocalDsa)
- return FALSE;
-
- dataSize = 0;
- if (!StringFromGUID2(fCategory, guidStr, MAX_PATH))
- return FALSE;
-
- wsprintf(bufKey, L"%s\\%s\\%s", REGPATH , guidStr, L"Enum");
-
- // Try to read key and get proper value size
- if (SHGetValue(HKEY_CURRENT_USER, bufKey, IMPLEMENTING, NULL, NULL, &dataSize))
- return FALSE;
-
- buffer.Attach((PCATCACHEHDR)CoTaskMemAlloc(dataSize));
-
- SHGetValue(HKEY_CURRENT_USER, bufKey, IMPLEMENTING, NULL, buffer, &dataSize);
- guidArray = (GUID*)(buffer + 1);
- for (i = 0; i < buffer->classCount; i++)
- {
- // Add class to cache
- DSA_InsertItem(fLocalDsa, DSA_APPEND, guidArray + i);
- }
-
- return TRUE;
-}
-
-HRESULT CComCatCachedCategory::CacheDSA()
-{
- WCHAR bufKey[MAX_PATH];
- WCHAR guidStr[MAX_PATH];
- UINT elemCount;
- UINT i;
- UINT bufferSize;
- CComHeapPtr<CATCACHEHDR> buffer;
- GUID *guidArray;
- GUID *tmp;
-
- elemCount = DSA_GetItemCount(fLocalDsa);
- bufferSize = sizeof(CATCACHEHDR) + elemCount * sizeof(GUID);
- if (!StringFromGUID2(fCategory, guidStr, MAX_PATH))
- return E_FAIL;
-
- buffer.Attach((PCATCACHEHDR)CoTaskMemAlloc(bufferSize));
- if (!buffer)
- return E_OUTOFMEMORY;
-
- // Correctly fill cache header
- buffer->dwSize = sizeof(CATCACHEHDR);
- buffer->version = 1;
- GetSystemTime(&buffer->writeTime);
- buffer->classCount = (DWORD)elemCount;
-
- guidArray = (GUID*)(buffer + 1);
- wsprintf(bufKey, L"%s\\%s\\%s", REGPATH , guidStr, L"Enum");
-
- // Write DSA contents inside the memory buffer allocated
- for(i = 0; i < elemCount; i++)
- {
- tmp = (GUID*)DSA_GetItemPtr(fLocalDsa, i);
- if (tmp)
- {
- guidArray[i] = *tmp;
- }
- }
-
- // Save items to registry
- SHSetValue(HKEY_CURRENT_USER, bufKey, IMPLEMENTING, REG_BINARY, buffer, bufferSize);
-
- guidArray = NULL;
- return S_OK;
-}
-
-HRESULT CComCatCachedCategory::LoadFromComCatMgr()
-{
- HRESULT hr;
- CComPtr<ICatInformation> pCatInformation;
- CComPtr<IEnumGUID> pEnumGUID;
- ULONG pFetched;
- CLSID tmp;
-
- // Get component categories manager instance
- hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC_SERVER,
- IID_PPV_ARG(ICatInformation, &pCatInformation));
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
-
- // Get the proper enumerator
- hr = pCatInformation->EnumClassesOfCategories(1, &fCategory, NULL, NULL,
&pEnumGUID);
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
-
- // Enumerate elements
- do
- {
- pFetched = 0;
- pEnumGUID->Next(1, &tmp, &pFetched);
- if (pFetched)
- {
- if (DSA_InsertItem(fLocalDsa, DSA_APPEND, &tmp) == E_OUTOFMEMORY)
- return E_OUTOFMEMORY;
- }
- }
- while (pFetched > 0);
- return S_OK;
-}
-
-HRESULT CComCatCachedCategory::WriteCacheToDSA(HDSA pDest)
-{
- INT i;
- for(i = 0; i < DSA_GetItemCount(fLocalDsa); i++)
- {
- if (DSA_InsertItem(pDest, DSA_APPEND, DSA_GetItemPtr(fLocalDsa, i)) == DSA_ERR)
- return E_OUTOFMEMORY;
- }
- return S_OK;
-}
-
-class CSHEnumClassesOfCategories :
- public CComCoClass<CSHEnumClassesOfCategories>,
- public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public IEnumGUID
-{
- private:
- CComPtr<ICatInformation> fCatInformation;
- HDSA fDsa;
- ULONG fCursor;
-
- public:
- CSHEnumClassesOfCategories();
- virtual ~CSHEnumClassesOfCategories();
- virtual HRESULT STDMETHODCALLTYPE Initialize(ULONG cImplemented, CATID
*pImplemented, ULONG cRequired, CATID *pRequired);
- // *** IEnumGUID methods ***
- virtual HRESULT STDMETHODCALLTYPE Clone(IEnumCLSID **ppvOut);
- virtual HRESULT STDMETHODCALLTYPE Next(ULONG cElt, CLSID *pElts, ULONG
*pFetched);
- virtual HRESULT STDMETHODCALLTYPE Reset();
- virtual HRESULT STDMETHODCALLTYPE Skip(ULONG nbElts);
-
- BEGIN_COM_MAP(CSHEnumClassesOfCategories)
- COM_INTERFACE_ENTRY_IID(IID_IEnumGUID, IEnumGUID)
- END_COM_MAP()
-};
-
-CSHEnumClassesOfCategories::CSHEnumClassesOfCategories()
-{
- fCursor = 0;
- fDsa = DSA_Create(sizeof(GUID), 5);
-}
-
-CSHEnumClassesOfCategories::~CSHEnumClassesOfCategories()
-{
- if (fDsa)
- DSA_Destroy(fDsa);
-}
-
-HRESULT CSHEnumClassesOfCategories::Initialize(ULONG cImplemented, CATID *pImplemented,
ULONG cRequired, CATID *pRequired)
-{
- UINT i;
- HRESULT hr;
-
- if (!fDsa)
- return E_FAIL;
-
- if (cRequired > 0 || cImplemented == (ULONG)-1)
- {
- FIXME("Implement required categories class enumeration\n");
- return E_NOTIMPL;
- }
-
- // Don't do anything if we have nothing
- if (cRequired == 0 && cImplemented == (ULONG)-1)
- return E_FAIL;
-
- // For each implemented category, create a cache and add it to our local DSA
- for (i = 0; i < cImplemented; i++)
- {
- CComCatCachedCategory cachedCat;
- hr = cachedCat.Initialize(pImplemented[i], FALSE);
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
- cachedCat.WriteCacheToDSA(fDsa);
- }
- return S_OK;
-}
-
-// *** IEnumGUID methods ***
-
-HRESULT STDMETHODCALLTYPE CSHEnumClassesOfCategories::Clone(IEnumCLSID **ppvOut)
-{
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CSHEnumClassesOfCategories::Next(ULONG cElt, CLSID *pElts,
ULONG *pFetched)
-{
- ULONG i;
- ULONG read;
- GUID *tmp;
-
- if (!pElts)
- return E_INVALIDARG;
- read = 0;
- for (i = 0; i < cElt && (fCursor < (ULONG)DSA_GetItemCount(fDsa));
i++)
- {
- tmp = (GUID*)DSA_GetItemPtr(fDsa, fCursor + i);
- if (!tmp)
- break;
- pElts[i] = *tmp;
- read++;
- }
- fCursor += read;
- if (pFetched)
- *pFetched = read;
- return S_OK;
-}
-
-HRESULT STDMETHODCALLTYPE CSHEnumClassesOfCategories::Reset()
-{
- fCursor = 0;
- return S_OK;
-}
-
-HRESULT STDMETHODCALLTYPE CSHEnumClassesOfCategories::Skip(ULONG nbElts)
-{
- if (fCursor + nbElts >= (ULONG)DSA_GetItemCount(fDsa))
- return E_INVALIDARG;
- fCursor += nbElts;
- return S_OK;
-}
-
-/*************************************************************************
- * SHEnumClassesOfCategories [BROWSEUI.136]
- */
-extern "C" HRESULT WINAPI SHEnumClassesOfCategories(ULONG cImplemented, CATID
*pImplemented, ULONG cRequired, CATID *pRequired, IEnumGUID **out)
-{
- HRESULT hr;
-
- hr = ShellObjectCreatorInit<CSHEnumClassesOfCategories, ULONG, CATID*, ULONG,
CATID*, IEnumGUID>(
- cImplemented, pImplemented, cRequired, pRequired, IID_IEnumGUID, out);
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
- return S_OK;
-}
Modified: trunk/reactos/dll/win32/browseui/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/precomp…
==============================================================================
--- trunk/reactos/dll/win32/browseui/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/precomp.h [iso-8859-1] Sun Apr 9 13:51:39 2017
@@ -40,8 +40,8 @@
#include "addresseditbox.h"
#include "CAutoComplete.h"
#include "bandproxy.h"
-#include "bandsite.h"
-#include "bandsitemenu.h"
+#include "shellbars/CBandSite.h"
+#include "shellbars/CBandSiteMenu.h"
#include "brandband.h"
#include "internettoolbar.h"
#include "commonbrowser.h"
Copied: trunk/reactos/dll/win32/browseui/shellbars/CBandSite.cpp (from r74291,
trunk/reactos/dll/win32/browseui/bandsite.cpp)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/shellba…
==============================================================================
--- trunk/reactos/dll/win32/browseui/bandsite.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/shellbars/CBandSite.cpp [iso-8859-1] Sun Apr 9
13:51:39 2017
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include "shellbars.h"
#ifndef ASSERT
#define ASSERT(cond) \
@@ -829,3 +829,8 @@
{
return E_NOTIMPL;
}
+
+HRESULT CBandSite_CreateInstance(REFIID riid, void **ppv)
+{
+ return ShellObjectCreator<CBandSite>(riid, ppv);
+}
Copied: trunk/reactos/dll/win32/browseui/shellbars/CBandSiteMenu.cpp (from r74291,
trunk/reactos/dll/win32/browseui/bandsitemenu.cpp)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/shellba…
==============================================================================
--- trunk/reactos/dll/win32/browseui/bandsitemenu.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/shellbars/CBandSiteMenu.cpp [iso-8859-1] Sun Apr 9
13:51:39 2017
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include "shellbars.h"
CBandSiteMenu::CBandSiteMenu()
{
@@ -94,3 +94,8 @@
FIXME("CBandSiteMenu::HandleMenuMsg2 is UNIMPLEMENTED(%p, %u, %p, %p,
%p)\n", this, uMsg, wParam, lParam, plResult);
return E_NOTIMPL;
}
+
+HRESULT CBandSiteMenu_CreateInstance(REFIID riid, void **ppv)
+{
+ return ShellObjectCreator<CBandSiteMenu>(riid, ppv);
+}
Copied: trunk/reactos/dll/win32/browseui/shellbars/CBaseBar.cpp (from r74291,
trunk/reactos/dll/win32/browseui/basebar.cpp)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/shellba…
==============================================================================
--- trunk/reactos/dll/win32/browseui/basebar.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/shellbars/CBaseBar.cpp [iso-8859-1] Sun Apr 9
13:51:39 2017
@@ -22,7 +22,7 @@
This class knows how to contain base bar site in a cabinet window.
*/
-#include "precomp.h"
+#include "shellbars.h"
/*
Base bar that contains a vertical or horizontal explorer band. It also
Added: trunk/reactos/dll/win32/browseui/shellbars/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/shellba…
==============================================================================
--- trunk/reactos/dll/win32/browseui/shellbars/CMakeLists.txt (added)
+++ trunk/reactos/dll/win32/browseui/shellbars/CMakeLists.txt [iso-8859-1] Sun Apr 9
13:51:39 2017
@@ -0,0 +1,22 @@
+PROJECT(SHELL)
+
+set_cpp(WITH_RUNTIME)
+
+add_definitions(-DUNICODE -D_UNICODE)
+
+include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/atl)
+
+list(APPEND SOURCE
+ CBandSite.cpp
+ CBandSiteMenu.cpp
+ CBaseBar.cpp
+ CSHEnumClassesOfCategories.cpp)
+
+add_library(shellbars ${SOURCE})
+add_dependencies(shellbars xdk)
+
+if(NOT MSVC)
+ if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ add_target_compile_flags(shellbars "-Wno-unused-but-set-variable")
+ endif()
+endif()
Propchange: trunk/reactos/dll/win32/browseui/shellbars/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native
Copied: trunk/reactos/dll/win32/browseui/shellbars/CSHEnumClassesOfCategories.cpp (from
r74291, trunk/reactos/dll/win32/browseui/comcat.cpp)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/shellba…
==============================================================================
--- trunk/reactos/dll/win32/browseui/comcat.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/shellbars/CSHEnumClassesOfCategories.cpp [iso-8859-1]
Sun Apr 9 13:51:39 2017
@@ -22,7 +22,7 @@
* Wraps the component categories manager enum
*/
-#include "precomp.h"
+#include "shellbars.h"
#define REGPATH
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Discardable\\PostSetup\\Component
Categories"
#define IMPLEMENTING L"Implementing"
Added: trunk/reactos/dll/win32/browseui/shellbars/shellbars.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/shellba…
==============================================================================
--- trunk/reactos/dll/win32/browseui/shellbars/shellbars.h (added)
+++ trunk/reactos/dll/win32/browseui/shellbars/shellbars.h [iso-8859-1] Sun Apr 9
13:51:39 2017
@@ -0,0 +1,36 @@
+#ifndef _SHELLBARS_PCH_
+#define _SHELLBARS_PCH_
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#include <windef.h>
+#include <winbase.h>
+#include <wincon.h>
+#include <wingdi.h>
+#include <shlobj.h>
+#include <shellapi.h>
+#include <shlobj_undoc.h>
+#include <shlguid_undoc.h>
+#include <shdeprecated.h>
+#include <tchar.h>
+#include <atlbase.h>
+#include <atlcom.h>
+#include <atlwin.h>
+#include <undocuser.h>
+#include <shlwapi.h>
+#include <shlwapi_undoc.h>
+#include <undocshell.h>
+#include <shellutils.h>
+#include <browseui_undoc.h>
+#include <wine/debug.h>
+
+#include "../resource.h"
+
+#include "CBandSite.h"
+#include "CBandSiteMenu.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(browseui);
+
+#endif /* _BROWSEUI_PCH_ */
Propchange: trunk/reactos/dll/win32/browseui/shellbars/shellbars.h
------------------------------------------------------------------------------
svn:eol-style = native