* Fix compiling with the system classes selected instead of the custom ones.
CORE-7586

svn path=/branches/shell-experiments/; revision=62962
This commit is contained in:
David Quintana 2014-04-25 10:45:28 +00:00
parent 60334b103a
commit a418d8b657
3 changed files with 16 additions and 12 deletions

View file

@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(CMenuBand);
extern "C" extern "C"
HRESULT WINAPI CMenuBand_Constructor(REFIID riid, LPVOID *ppv) HRESULT WINAPI CMenuBand_Constructor(REFIID riid, LPVOID *ppv)
{ {
HRESULT hr;
#if USE_SYSTEM_MENUBAND #if USE_SYSTEM_MENUBAND
hr = CoCreateInstance(CLSID_MenuBand, hr = CoCreateInstance(CLSID_MenuBand,
NULL, NULL,
@ -48,13 +49,13 @@ HRESULT WINAPI CMenuBand_Constructor(REFIID riid, LPVOID *ppv)
if (!site) if (!site)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
HRESULT hr = site->QueryInterface(riid, ppv); hr = site->QueryInterface(riid, ppv);
if (FAILED_UNEXPECTEDLY(hr)) if (FAILED_UNEXPECTEDLY(hr))
site->Release(); site->Release();
#endif
return hr; return hr;
#endif
} }
CMenuBand::CMenuBand() : CMenuBand::CMenuBand() :
@ -308,6 +309,7 @@ HRESULT STDMETHODCALLTYPE CMenuBand::OnPosRectChangeDB(RECT *prc)
return S_OK; return S_OK;
} }
HRESULT STDMETHODCALLTYPE CMenuBand::GetBandInfo( HRESULT STDMETHODCALLTYPE CMenuBand::GetBandInfo(
DWORD dwBandID, DWORD dwBandID,
DWORD dwViewMode, DWORD dwViewMode,
@ -337,20 +339,20 @@ HRESULT STDMETHODCALLTYPE CMenuBand::GetBandInfo(
if (m_dwFlags & SMINIT_VERTICAL) if (m_dwFlags & SMINIT_VERTICAL)
{ {
pdbi->ptMinSize.x = max(minStatic.cx, minStatic.cx) + 20; pdbi->ptMinSize.x = max(minStatic.cx, minShlFld.cx) + 20;
pdbi->ptMinSize.y = minStatic.cy + minStatic.cy; pdbi->ptMinSize.y = minStatic.cy + minShlFld.cy;
pdbi->ptMaxSize.x = max(maxStatic.cx, maxShlFld.cx) + 20; pdbi->ptMaxSize.x = max(maxStatic.cx, maxShlFld.cx) + 20;
pdbi->ptMaxSize.y = maxStatic.cy + maxShlFld.cy; pdbi->ptMaxSize.y = maxStatic.cy + maxShlFld.cy;
pdbi->dwModeFlags = DBIMF_VARIABLEHEIGHT; pdbi->dwModeFlags = DBIMF_VARIABLEHEIGHT;
} }
else else
{ {
pdbi->ptMinSize.x = minStatic.cx + minStatic.cx; pdbi->ptMinSize.x = minStatic.cx + minShlFld.cx;
pdbi->ptMinSize.y = max(minStatic.cy, minStatic.cy); pdbi->ptMinSize.y = max(minStatic.cy, minShlFld.cy);
pdbi->ptMaxSize.x = maxStatic.cx + maxShlFld.cx; pdbi->ptMaxSize.x = maxStatic.cx + maxShlFld.cx;
pdbi->ptMaxSize.y = max(maxStatic.cy, maxShlFld.cy); pdbi->ptMaxSize.y = max(maxStatic.cy, maxShlFld.cy);
} }
pdbi->ptIntegral.x = max(intStatic.cx, intStatic.cx); pdbi->ptIntegral.x = max(intStatic.cx, intShlFld.cx);
pdbi->ptIntegral.y = max(intStatic.cy, intShlFld.cy); pdbi->ptIntegral.y = max(intStatic.cy, intShlFld.cy);
pdbi->ptActual = pdbi->ptMinSize; pdbi->ptActual = pdbi->ptMinSize;
@ -469,7 +471,7 @@ HRESULT STDMETHODCALLTYPE CMenuBand::Exec(const GUID *pguidCmdGroup, DWORD nCmdI
{ {
_KeyboardItemChange(VK_HOME); _KeyboardItemChange(VK_HOME);
} }
else if (nCmdexecopt == -2) // last else // last
{ {
_KeyboardItemChange(VK_END); _KeyboardItemChange(VK_END);
} }

View file

@ -30,6 +30,7 @@ const static GUID CGID_MenuDeskBar = { 0x5C9F0A12, 0x959E, 0x11D0, { 0xA3, 0xA4,
extern "C" extern "C"
HRESULT WINAPI CMenuDeskBar_Constructor(REFIID riid, LPVOID *ppv) HRESULT WINAPI CMenuDeskBar_Constructor(REFIID riid, LPVOID *ppv)
{ {
HRESULT hr;
#if USE_SYSTEM_MENUDESKBAR #if USE_SYSTEM_MENUDESKBAR
hr = CoCreateInstance(CLSID_MenuDeskBar, hr = CoCreateInstance(CLSID_MenuDeskBar,
NULL, NULL,
@ -43,13 +44,13 @@ HRESULT WINAPI CMenuDeskBar_Constructor(REFIID riid, LPVOID *ppv)
if (!deskbar) if (!deskbar)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
HRESULT hr = deskbar->QueryInterface(riid, ppv); hr = deskbar->QueryInterface(riid, ppv);
if (FAILED_UNEXPECTEDLY(hr)) if (FAILED_UNEXPECTEDLY(hr))
deskbar->Release(); deskbar->Release();
return hr;
#endif #endif
return hr;
} }
CMenuDeskBar::CMenuDeskBar() : CMenuDeskBar::CMenuDeskBar() :

View file

@ -28,6 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(menusite);
extern "C" extern "C"
HRESULT WINAPI CMenuSite_Constructor(REFIID riid, LPVOID *ppv) HRESULT WINAPI CMenuSite_Constructor(REFIID riid, LPVOID *ppv)
{ {
HRESULT hr;
#if USE_SYSTEM_MENUSITE #if USE_SYSTEM_MENUSITE
hr = CoCreateInstance(CLSID_MenuBandSite, hr = CoCreateInstance(CLSID_MenuBandSite,
NULL, NULL,
@ -41,13 +42,13 @@ HRESULT WINAPI CMenuSite_Constructor(REFIID riid, LPVOID *ppv)
if (!site) if (!site)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
HRESULT hr = site->QueryInterface(riid, ppv); hr = site->QueryInterface(riid, ppv);
if (FAILED_UNEXPECTEDLY(hr)) if (FAILED_UNEXPECTEDLY(hr))
site->Release(); site->Release();
#endif
return hr; return hr;
#endif
} }
CMenuSite::CMenuSite() : CMenuSite::CMenuSite() :