Author: dquintana Date: Tue Feb 18 11:17:37 2014 New Revision: 62242
URL: http://svn.reactos.org/svn/reactos?rev=62242&view=rev Log: [RSHELL] * CMenuBand: Fix display of icons for the static toolbar. * CMenuDeskBar: Fix positioning of the window not to cross the top edge. CORE-7881
Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp
Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp URL: http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rsh... ============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] Tue Feb 18 11:17:37 2014 @@ -1130,7 +1130,8 @@ tbb.iString = (INT_PTR) MenuString; tbb.idCommand = info.wID;
- SMINFO sminfo; + SMINFO sminfo = { 0 }; + sminfo.dwMask = SMIM_ICON; if (info.wID >= 0 && SUCCEEDED(m_menuBand->CallCBWithId(info.wID, SMC_GETINFO, 0, (LPARAM) &sminfo))) { tbb.iBitmap = sminfo.iIcon;
Modified: branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp URL: http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rsh... ============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp [iso-8859-1] Tue Feb 18 11:17:37 2014 @@ -134,7 +134,6 @@ MESSAGE_HANDLER(WM_NOTIFY, OnNotify) MESSAGE_HANDLER(WM_CANCELMODE, OnCancelMode) MESSAGE_HANDLER(WM_WINDOWPOSCHANGED, OnWindowPosChanged) - MESSAGE_HANDLER(WM_ACTIVATE, OnActivate) MESSAGE_HANDLER(WM_PAINT, OnPaint) END_MSG_MAP()
@@ -143,7 +142,6 @@ LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); LRESULT OnCancelMode(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); LRESULT OnWindowPosChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); - LRESULT OnActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
#endif @@ -667,16 +665,6 @@ return 0; }
-LRESULT CMenuDeskBar::OnActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) -{ - if (LOWORD(wParam) == WA_INACTIVE) - { - //DestroyWindow(); - //ShowWindow(SW_HIDE); - } - return 0; -} - LRESULT CMenuDeskBar::OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { TRACE("OnPaint\n"); @@ -771,6 +759,13 @@ int cx = rc.right; int cy = rc.bottom;
+ if (y < 0) + { + y = 0; + } + + // if (y+cy > work area height) cy = work area height - y + this->SetWindowPos(HWND_TOPMOST, x, y, cx, cy, SWP_SHOWWINDOW);
// HACK: The bar needs to be notified of the size AFTER it is shown.