Author: ssawant
Date: Sun Jun 18 14:59:26 2017
New Revision: 75095
URL:
http://svn.reactos.org/svn/reactos?rev=75095&view=rev
Log:
[QCKLNCH]
-Stubbed CISFBand methods and required interfaces.
-Added a C Constructor for CISFBand.
-Implemented and Tested a button via CISFBand.
Modified:
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CISFBand.cpp
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CISFBand.h
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h
Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CISFBand.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
==============================================================================
--- branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CISFBand.cpp [iso-8859-1]
(original)
+++ branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CISFBand.cpp [iso-8859-1] Sun
Jun 18 14:59:26 2017
@@ -35,9 +35,9 @@
//IObjectWithSite
HRESULT STDMETHODCALLTYPE CISFBand::SetSite(IUnknown *pUnkSite)
{
- //MessageBox(0, L"CISFBand::SetSite called!", L"Testing",
MB_OK | MB_ICONINFORMATION);
-
- /* HRESULT hRet;
+ MessageBox(0, L"CISFBand::SetSite called!", L"Testing", MB_OK
| MB_ICONINFORMATION);
+
+ HRESULT hRet;
HWND hwndParent;
TRACE("CISFBand::SetSite(0x%p)\n", pUnkSite);
@@ -51,9 +51,8 @@
m_Site = pUnkSite;
m_hWnd = CreateWindowEx(0, L"BUTTON", L">>", WS_CHILD,
CW_USEDEFAULT, CW_USEDEFAULT, 50, 50, hwndParent, 0, m_hInstance, 0);
SetWindowSubclass(hwndParent, MyWndProc, 0, 0); //when button is clicked, parent
receives WM_COMMAND, and thus subclassed to show a test message box
- */
-
- return E_NOTIMPL;
+
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CISFBand::GetSite(
@@ -61,16 +60,17 @@
OUT VOID **ppvSite)
{
//MessageBox(0, L"GetSite called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
- //TRACE("CISFBand::GetSite(0x%p,0x%p)\n", riid, ppvSite);
-
- /* HRESULT hr;
+ TRACE("CISFBand::GetSite(0x%p,0x%p)\n", riid, ppvSite);
+
+ HRESULT hr;
if (m_Site != NULL)
{
hr = m_Site->QueryInterface(riid, ppvSite);
if (FAILED(hr)) return hr;
- }*/
-
- return E_NOTIMPL;
+ }
+
+ *ppvSite = NULL;
+ return E_FAIL;
}
/*****************************************************************************/
@@ -79,13 +79,13 @@
{
//MessageBox(0, L"GetWindow called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
- /*if (!m_hWnd)
+ if (!m_hWnd)
return E_FAIL;
if (!phwnd)
return E_INVALIDARG;
- *phwnd = m_hWnd;*/
-
- return E_NOTIMPL;
+ *phwnd = m_hWnd;
+
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CISFBand::ContextSensitiveHelp(
@@ -103,12 +103,12 @@
{
//MessageBox(0, L"ShowDW called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
- /*if (m_hWnd)
+ if (m_hWnd)
{
ShowWindow(m_hWnd, bShow ? SW_SHOW : SW_HIDE);
- }*/
-
- return E_NOTIMPL;
+ }
+
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CISFBand::CloseDW(
@@ -116,14 +116,14 @@
{
//MessageBox(0, L"CloseDW called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
- /*if (m_hWnd)
+ if (m_hWnd)
{
ShowWindow(m_hWnd, SW_HIDE);
DestroyWindow(m_hWnd);
m_hWnd = NULL;
- }*/
-
- return E_NOTIMPL;
+ }
+
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CISFBand::ResizeBorderDW(
@@ -145,9 +145,70 @@
{
//MessageBox(0, L"GetBandInfo called!", L"Test Caption",
MB_OK | MB_ICONINFORMATION);
- //TRACE("CTaskBand::GetBandInfo(0x%x,0x%x,0x%p) hWnd=0x%p\n", dwBandID,
dwViewMode, pdbi, m_hWnd);
-
- return E_NOTIMPL;
+ TRACE("CTaskBand::GetBandInfo(0x%x,0x%x,0x%p) hWnd=0x%p\n", dwBandID,
dwViewMode, pdbi, m_hWnd);
+
+ HRESULT hr = E_INVALIDARG;
+
+ if (m_hWnd && pdbi)
+ {
+ m_BandID = dwBandID;
+ pdbi->dwModeFlags = DBIMF_VARIABLEHEIGHT;
+
+ if (dwViewMode & DBIF_VIEWMODE_VERTICAL)
+ {
+ pdbi->ptIntegral.y = 1;
+ pdbi->ptMinSize.y = 20;
+ /* FIXME: Get the button metrics from the task bar object!!! */
+ pdbi->ptMinSize.x = (3 * GetSystemMetrics(SM_CXEDGE) / 2) + /* FIXME:
Might be wrong if only one column! */
+ GetSystemMetrics(SM_CXSIZE) + (2 * GetSystemMetrics(SM_CXEDGE)); /*
FIXME: Min button size, query!!! */
+ }
+ else
+ {
+ /* When the band is horizontal its minimum height is the height of the
start button */
+ RECT rcButton;
+ GetWindowRect(m_hWndStartButton, &rcButton);
+ pdbi->ptMinSize.y = rcButton.bottom - rcButton.top;
+ pdbi->ptIntegral.y = pdbi->ptMinSize.y + (3 *
GetSystemMetrics(SM_CYEDGE) / 2); /* FIXME: Query metrics */
+
/* We're not going to allow task bands where not even the minimum button size
fits into the band */
+ pdbi->ptMinSize.x = pdbi->ptIntegral.y;
+ }
+
+ if (pdbi->dwMask & DBIM_MAXSIZE)
+ {
+ pdbi->ptMaxSize.y = -1;
+ }
+
+ if (pdbi->dwMask & DBIM_ACTUAL)
+ {
+ pdbi->ptActual.x = 35;
+ pdbi->ptActual.y = 30;
+ }
+
+ if (pdbi->dwMask & DBIM_TITLE)
+ {
+ // Don't show title by removing this flag.
+ pdbi->dwMask &= ~DBIM_TITLE;
+ }
+
+ if (pdbi->dwMask & DBIM_MODEFLAGS)
+ {
+ pdbi->dwModeFlags = DBIMF_NORMAL | DBIMF_VARIABLEHEIGHT;
+ }
+
+ if (pdbi->dwMask & DBIM_BKCOLOR)
+ {
+ // Use the default background color by removing this flag.
+ pdbi->dwMask &= ~DBIM_BKCOLOR;
+ }
+
+ TRACE("H: %d, Min: %d,%d, Integral.y: %d Actual: %d,%d\n",
(dwViewMode & DBIF_VIEWMODE_VERTICAL) == 0,
+ pdbi->ptMinSize.x, pdbi->ptMinSize.y, pdbi->ptIntegral.y,
+ pdbi->ptActual.x, pdbi->ptActual.y);
+
+ hr = S_OK;
+ }
+
+ return hr;
}
/*****************************************************************************/
@@ -155,7 +216,7 @@
HRESULT STDMETHODCALLTYPE CISFBand::SetClient(
IN IUnknown *punkClient)
{
- //TRACE("IDeskBar::SetClient(0x%p)\n", punkClient);
+ TRACE("IDeskBar::SetClient(0x%p)\n", punkClient);
//MessageBox(0, L"SetClient called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
@@ -165,7 +226,7 @@
HRESULT STDMETHODCALLTYPE CISFBand::GetClient(
OUT IUnknown **ppunkClient)
{
- //TRACE("IDeskBar::GetClient(0x%p)\n", ppunkClient);
+ TRACE("IDeskBar::GetClient(0x%p)\n", ppunkClient);
//MessageBox(0, L"GetClient called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
@@ -175,11 +236,11 @@
HRESULT STDMETHODCALLTYPE CISFBand::OnPosRectChangeDB(
IN RECT *prc)
{
- //TRACE("IDeskBar::OnPosRectChangeDB(0x%p=(%d,%d,%d,%d))\n", prc,
prc->left, prc->top, prc->right, prc->bottom);
+ TRACE("IDeskBar::OnPosRectChangeDB(0x%p=(%d,%d,%d,%d))\n", prc,
prc->left, prc->top, prc->right, prc->bottom);
//MessageBox(0, L"OnPosRectChangeDB called!", L"Test
Caption", MB_OK | MB_ICONINFORMATION);
- return E_NOTIMPL;
+ return S_OK;
}
/*****************************************************************************/
@@ -188,11 +249,12 @@
OUT CLSID *pClassID)
{
//MessageBox(0, L"GetClassID called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
- //TRACE("CISFBand::GetClassID(0x%p)\n", pClassID);
+
+ TRACE("CISFBand::GetClassID(0x%p)\n", pClassID);
/* We're going to return the (internal!) CLSID of the quick launch band */
- /* *pClassID = CLSID_QuickLaunchBand; */
-
- return E_NOTIMPL;
+ *pClassID = CLSID_QuickLaunchBand;
+
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CISFBand::IsDirty()
@@ -201,18 +263,18 @@
//MessageBox(0, L"IsDirty called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
- return E_NOTIMPL;
+ return S_FALSE;
}
HRESULT STDMETHODCALLTYPE CISFBand::Load(
IN IStream *pStm)
{
- //TRACE("CISFBand::Load called\n");
+ TRACE("CISFBand::Load called\n");
/* Nothing to do */
//MessageBox(0, L"Load called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
- return E_NOTIMPL;
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CISFBand::Save(
@@ -223,18 +285,18 @@
//MessageBox(0, L"Save called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
- return E_NOTIMPL;
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CISFBand::GetSizeMax(
OUT ULARGE_INTEGER *pcbSize)
{
- //TRACE("CISFBand::GetSizeMax called\n");
+ TRACE("CISFBand::GetSizeMax called\n");
//pcbSize->QuadPart = 0;
//MessageBox(0, L"GetSizeMax called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
- return E_NOTIMPL;
+ return S_OK;
}
@@ -247,7 +309,7 @@
IN LPARAM lParam,
OUT LRESULT *plrResult)
{
- //TRACE("CISFBand: IWinEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p, 0x%p,
0x%p)\n", hWnd, uMsg, wParam, lParam, plrResult);
+ TRACE("CISFBand: IWinEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p, 0x%p,
0x%p)\n", hWnd, uMsg, wParam, lParam, plrResult);
//MessageBox(0, L"ProcessMessage called!", L"Test Caption",
MB_OK | MB_ICONINFORMATION);
return E_NOTIMPL;
@@ -258,20 +320,20 @@
{
//MessageBox(0, L"ContainsWindow called!", L"Test Caption",
MB_OK | MB_ICONINFORMATION);
- /*if (hWnd == m_hWnd ||
+ if (hWnd == m_hWnd ||
IsChild(m_hWnd, hWnd))
{
TRACE("CISFBand::ContainsWindow(0x%p) returns S_OK\n", hWnd);
return S_OK;
- }*/
-
- return E_NOTIMPL;
+ }
+
+ return S_FALSE;
}
HRESULT STDMETHODCALLTYPE CISFBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam,
LPARAM lParam, LRESULT *theResult)
{
//MessageBox(0, L"OnWinEvent called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
- //UNIMPLEMENTED;
+ UNIMPLEMENTED;
return E_NOTIMPL;
}
@@ -279,9 +341,7 @@
HRESULT STDMETHODCALLTYPE CISFBand::IsWindowOwner(HWND hWnd)
{
//MessageBox(0, L"IsWindowOwner called!", L"Test Caption",
MB_OK | MB_ICONINFORMATION);
- //return (hWnd == m_hWnd) ? S_OK : S_FALSE;
-
- return E_NOTIMPL;
+ return (hWnd == m_hWnd) ? S_OK : S_FALSE;
}
/*****************************************************************************/
@@ -289,14 +349,14 @@
HRESULT STDMETHODCALLTYPE CISFBand::QueryStatus(const GUID *pguidCmdGroup, ULONG
cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText)
{
//MessageBox(0, L"QueryStatus called!", L"Test Caption",
MB_OK | MB_ICONINFORMATION);
- //UNIMPLEMENTED;
+ UNIMPLEMENTED;
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CISFBand::Exec(const GUID *pguidCmdGroup, DWORD nCmdID,
DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
{
- /*if (IsEqualIID(*pguidCmdGroup, IID_IBandSite))
+ if (IsEqualIID(*pguidCmdGroup, IID_IBandSite))
{
return S_OK;
}
@@ -304,10 +364,18 @@
if (IsEqualIID(*pguidCmdGroup, IID_IDeskBand))
{
return S_OK;
- }*/
+ }
//MessageBox(0, L"Exec called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
-
+ UNIMPLEMENTED;
+
return E_NOTIMPL;
}
+//C Constructor
+ extern "C"
+ HRESULT WINAPI CIFSBand_CreateInstance(REFIID riid, void** ppv)
+ {
+ return ShellObjectCreator<CISFBand>(riid, ppv);
+ }
+
Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CISFBand.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
==============================================================================
--- branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CISFBand.h [iso-8859-1]
(original)
+++ branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CISFBand.h [iso-8859-1] Sun
Jun 18 14:59:26 2017
@@ -18,10 +18,8 @@
public IWinEventHandler,
public IOleCommandTarget
{
- CComPtr<IUnknown> m_Site;
- CComPtr<IUnknown> m_punkISFB;
-
- HINSTANCE m_hInstance;
+ HINSTANCE m_hInstance;
+ CComPtr<IUnknown> m_Site;
HWND m_hWnd;
HWND m_hWndStartButton;
DWORD m_BandID;
@@ -164,4 +162,8 @@
COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
END_COM_MAP()
-};
+};
+
+//C Constructor
+extern "C"
+HRESULT WINAPI CIFSBand_CreateInstance(REFIID riid, void** ppv);
Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
==============================================================================
---
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp [iso-8859-1]
(original)
+++
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp [iso-8859-1]
Sun Jun 18 14:59:26 2017
@@ -40,7 +40,7 @@
//CQuickLaunchBand
- CQuickLaunchBand::CQuickLaunchBand() : m_hWnd(NULL), m_BandID(0) {}
+ CQuickLaunchBand::CQuickLaunchBand() {}
CQuickLaunchBand::~CQuickLaunchBand() {}
@@ -51,11 +51,11 @@
{
//MessageBox(0, L"CQuickLaunchBand::FinalConstruct Begin!",
L"Testing", MB_OK | MB_ICONINFORMATION);
- HRESULT hr = CoCreateInstance(CLSID_ISFBand, NULL, CLSCTX_INPROC_SERVER,
IID_IUnknown, (void**) &m_punkISFB);
+ HRESULT hr = CIFSBand_CreateInstance(IID_IUnknown, (void**) &m_punkISFB);
if (SUCCEEDED(hr))
{
- //MessageBox(0, L"CoCreateInstance success!", L"Testing",
MB_OK | MB_ICONINFORMATION);
-
+ MessageBox(0, L"CreateInstance success!", L"Testing",
MB_OK | MB_ICONINFORMATION);
+ /*
CComPtr<IShellFolderBand> pISFB;
hr = m_punkISFB->QueryInterface(IID_IShellFolderBand, (void**)
&pISFB);
if (SUCCEEDED(hr))
@@ -77,7 +77,7 @@
pISFB->InitializeSFB(pISF, 0);
//}
}
- }
+ } */
}
// MessageBox(0, L"CQuickLaunchBand::FinalConstruct End!",
L"Testing", MB_OK | MB_ICONINFORMATION);
@@ -86,24 +86,9 @@
//IObjectWithSite
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::SetSite(IUnknown *pUnkSite)
- {
- MessageBox(0, L"CQuickLaunchBand::SetSite called!",
L"Testing", MB_OK | MB_ICONINFORMATION);
-
- /* HRESULT hRet;
- HWND hwndParent;
-
+ {
TRACE("CQuickLaunchBand::SetSite(0x%p)\n", pUnkSite);
- hRet = IUnknown_GetWindow(pUnkSite, &hwndParent);
- if (FAILED(hRet))
- {
- TRACE("Querying site window failed: 0x%x\n", hRet);
- return hRet;
- }
- m_Site = pUnkSite;
- m_hWnd = CreateWindowEx(0, L"BUTTON", L">>", WS_CHILD,
CW_USEDEFAULT, CW_USEDEFAULT, 50, 50, hwndParent, 0, m_hInstance, 0);
- SetWindowSubclass(hwndParent, MyWndProc, 0, 0); //when button is clicked, parent
receives WM_COMMAND, and thus subclassed to show a test message box
- */
//Internal CISFBand Calls
CComPtr<IObjectWithSite> pIOWS;
HRESULT hr = m_punkISFB->QueryInterface(IID_IObjectWithSite,
(void**)&pIOWS);
@@ -115,16 +100,8 @@
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::GetSite(
IN REFIID riid,
OUT VOID **ppvSite)
- {
- //MessageBox(0, L"GetSite called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
+ {
TRACE("CQuickLaunchBand::GetSite(0x%p,0x%p)\n", riid, ppvSite);
-
- /* HRESULT hr;
- if (m_Site != NULL)
- {
- hr = m_Site->QueryInterface(riid, ppvSite);
- if (FAILED(hr)) return hr;
- }*/
//Internal CISFBand Calls
CComPtr<IObjectWithSite> pIOWS;
@@ -138,14 +115,6 @@
//IDeskBand
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::GetWindow(OUT HWND *phwnd)
{
- //MessageBox(0, L"GetWindow called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
-
- /*if (!m_hWnd)
- return E_FAIL;
- if (!phwnd)
- return E_INVALIDARG;
- *phwnd = m_hWnd;*/
-
//Internal CISFBand Calls
CComPtr<IDeskBand> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_IDeskBand, (void**)&pIDB);
@@ -157,10 +126,6 @@
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::ContextSensitiveHelp(
IN BOOL fEnterMode)
{
- /* FIXME: Implement */
-
- //MessageBox(0, L"ContextSensitiveHelp called!", L"Test
Caption", MB_OK | MB_ICONINFORMATION);
-
//Internal CISFBand Calls
CComPtr<IDeskBand> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_IDeskBand, (void**)&pIDB);
@@ -171,14 +136,7 @@
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::ShowDW(
IN BOOL bShow)
- {
- //MessageBox(0, L"ShowDW called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
-
- /*if (m_hWnd)
- {
- ShowWindow(m_hWnd, bShow ? SW_SHOW : SW_HIDE);
- }*/
-
+ {
//Internal CISFBand Calls
CComPtr<IDeskBand> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_IDeskBand, (void**)&pIDB);
@@ -189,16 +147,7 @@
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::CloseDW(
IN DWORD dwReserved)
- {
- //MessageBox(0, L"CloseDW called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
-
- /*if (m_hWnd)
- {
- ShowWindow(m_hWnd, SW_HIDE);
- DestroyWindow(m_hWnd);
- m_hWnd = NULL;
- }*/
-
+ {
//Internal CISFBand Calls
CComPtr<IDeskBand> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_IDeskBand, (void**)&pIDB);
@@ -211,11 +160,7 @@
LPCRECT prcBorder,
IUnknown *punkToolbarSite,
BOOL fReserved)
- {
- /* No need to implement this method */
-
- //MessageBox(0, L"ResizeBorderDW called!", L"Test Caption",
MB_OK | MB_ICONINFORMATION);
-
+ {
//Internal CISFBand Calls
CComPtr<IDeskBand> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_IDeskBand, (void**)&pIDB);
@@ -228,10 +173,8 @@
IN DWORD dwBandID,
IN DWORD dwViewMode,
IN OUT DESKBANDINFO *pdbi)
- {
- //MessageBox(0, L"GetBandInfo called!", L"Test Caption",
MB_OK | MB_ICONINFORMATION);
-
- TRACE("CTaskBand::GetBandInfo(0x%x,0x%x,0x%p) hWnd=0x%p\n", dwBandID,
dwViewMode, pdbi, m_hWnd);
+ {
+ TRACE("CQuickLaunchBand::GetBandInfo(0x%x,0x%x,0x%p)\n", dwBandID,
dwViewMode, pdbi);
//Internal CISFBand Calls
CComPtr<IDeskBand> pIDB;
@@ -248,8 +191,6 @@
{
TRACE("IDeskBar::SetClient(0x%p)\n", punkClient);
- //MessageBox(0, L"SetClient called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
-
//Internal CISFBand Calls
CComPtr<IDeskBar> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_IDeskBar, (void**)&pIDB);
@@ -263,8 +204,6 @@
{
TRACE("IDeskBar::GetClient(0x%p)\n", ppunkClient);
- //MessageBox(0, L"GetClient called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
-
//Internal CISFBand Calls
CComPtr<IDeskBar> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_IDeskBar, (void**)&pIDB);
@@ -278,8 +217,6 @@
{
TRACE("IDeskBar::OnPosRectChangeDB(0x%p=(%d,%d,%d,%d))\n", prc,
prc->left, prc->top, prc->right, prc->bottom);
- //MessageBox(0, L"OnPosRectChangeDB called!", L"Test
Caption", MB_OK | MB_ICONINFORMATION);
-
//Internal CISFBand Calls
CComPtr<IDeskBar> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_IDeskBar, (void**)&pIDB);
@@ -292,11 +229,8 @@
//IPersistStream
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::GetClassID(
OUT CLSID *pClassID)
- {
- //MessageBox(0, L"GetClassID called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
+ {
TRACE("CQuickLaunchBand::GetClassID(0x%p)\n", pClassID);
- /* We're going to return the (internal!) CLSID of the quick launch band */
- /* *pClassID = CLSID_QuickLaunchBand; */
//Internal CISFBand Calls
CComPtr<IPersistStream> pIPS;
@@ -307,11 +241,7 @@
}
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::IsDirty()
- {
- /* The object hasn't changed since the last save! */
-
- //MessageBox(0, L"IsDirty called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
-
+ {
//Internal CISFBand Calls
CComPtr<IPersistStream> pIPS;
HRESULT hr = m_punkISFB->QueryInterface(IID_IPersistStream,
(void**)&pIPS);
@@ -324,9 +254,6 @@
IN IStream *pStm)
{
TRACE("CQuickLaunchBand::Load called\n");
- /* Nothing to do */
-
- //MessageBox(0, L"Load called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
//Internal CISFBand Calls
CComPtr<IPersistStream> pIPS;
@@ -339,11 +266,7 @@
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::Save(
IN IStream *pStm,
IN BOOL fClearDirty)
- {
- /* Nothing to do */
-
- //MessageBox(0, L"Save called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
-
+ {
//Internal CISFBand Calls
CComPtr<IPersistStream> pIPS;
HRESULT hr = m_punkISFB->QueryInterface(IID_IPersistStream,
(void**)&pIPS);
@@ -356,10 +279,7 @@
OUT ULARGE_INTEGER *pcbSize)
{
TRACE("CQuickLaunchBand::GetSizeMax called\n");
- //pcbSize->QuadPart = 0;
-
- //MessageBox(0, L"GetSizeMax called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
-
+
//Internal CISFBand Calls
CComPtr<IPersistStream> pIPS;
HRESULT hr = m_punkISFB->QueryInterface(IID_IPersistStream,
(void**)&pIPS);
@@ -379,31 +299,18 @@
OUT LRESULT *plrResult)
{
TRACE("CQuickLaunchBand: IWinEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p,
0x%p, 0x%p)\n", hWnd, uMsg, wParam, lParam, plrResult);
-
- //MessageBox(0, L"ProcessMessage called!", L"Test Caption",
MB_OK | MB_ICONINFORMATION);
+
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::ContainsWindow(
IN HWND hWnd)
{
- //MessageBox(0, L"ContainsWindow called!", L"Test Caption",
MB_OK | MB_ICONINFORMATION);
-
- /*if (hWnd == m_hWnd ||
- IsChild(m_hWnd, hWnd))
- {
- TRACE("CQuickLaunchBand::ContainsWindow(0x%p) returns S_OK\n",
hWnd);
- return S_OK;
- }*/
-
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM
wParam, LPARAM lParam, LRESULT *theResult)
- {
- //MessageBox(0, L"OnWinEvent called!", L"Test Caption", MB_OK
| MB_ICONINFORMATION);
- //UNIMPLEMENTED;
-
+ {
//Internal CISFBand Calls
CComPtr<IWinEventHandler> pWEH;
HRESULT hr = m_punkISFB->QueryInterface(IID_IWinEventHandler,
(void**)&pWEH);
@@ -413,10 +320,7 @@
}
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::IsWindowOwner(HWND hWnd)
- {
- //MessageBox(0, L"IsWindowOwner called!", L"Test Caption",
MB_OK | MB_ICONINFORMATION);
- //return (hWnd == m_hWnd) ? S_OK : S_FALSE;
-
+ {
//Internal CISFBand Calls
CComPtr<IWinEventHandler> pWEH;
HRESULT hr = m_punkISFB->QueryInterface(IID_IWinEventHandler,
(void**)&pWEH);
@@ -428,10 +332,7 @@
/*****************************************************************************/
// *** IOleCommandTarget methods ***
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::QueryStatus(const GUID *pguidCmdGroup,
ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText)
- {
- //MessageBox(0, L"QueryStatus called!", L"Test Caption",
MB_OK | MB_ICONINFORMATION);
- //UNIMPLEMENTED;
-
+ {
//Internal CISFBand Calls
CComPtr<IOleCommandTarget> pOCT;
HRESULT hr = m_punkISFB->QueryInterface(IID_IOleCommandTarget,
(void**)&pOCT);
@@ -441,19 +342,7 @@
}
HRESULT STDMETHODCALLTYPE CQuickLaunchBand::Exec(const GUID *pguidCmdGroup, DWORD
nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
- {
- /*if (IsEqualIID(*pguidCmdGroup, IID_IBandSite))
- {
- return S_OK;
- }
-
- if (IsEqualIID(*pguidCmdGroup, IID_IDeskBand))
- {
- return S_OK;
- }*/
-
- //MessageBox(0, L"Exec called!", L"Test Caption", MB_OK |
MB_ICONINFORMATION);
-
+ {
//Internal CISFBand Calls
CComPtr<IOleCommandTarget> pOCT;
HRESULT hr = m_punkISFB->QueryInterface(IID_IOleCommandTarget,
(void**)&pOCT);
Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
==============================================================================
---
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h [iso-8859-1]
(original)
+++
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h [iso-8859-1]
Sun Jun 18 14:59:26 2017
@@ -23,16 +23,10 @@
public IPersistStream,
public IWinEventHandler,
public IOleCommandTarget
-{
- CComPtr<IUnknown> m_Site;
- CComPtr<IUnknown> m_punkISFB;
+{
+ CComPtr<IUnknown> m_punkISFB;
- HINSTANCE m_hInstance;
- HWND m_hWnd;
- HWND m_hWndStartButton;
- DWORD m_BandID;
-
-public:
+ public:
CQuickLaunchBand();
virtual ~CQuickLaunchBand();