mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 04:23:32 +00:00
[rshell]
- CMenuBand: Fix the size of the separators by setting iBitmap to 0 (which acts as the width of the separator). - CMenuDeskBar: Create the window only in CMenuDeskBar::SetClient and not in SetSite. Greatly simplify SetSite. Make sure that WS_EX_TOPMOST isn't removed when we call SetWindowPos Do not forward requests for the SID_SMenuPopup service to the taskbar as this causes the menu band to capture the mouse for the taskbar and not the desk bar svn path=/branches/shell-experiments/; revision=62223
This commit is contained in:
parent
9a1d783d54
commit
dc404583fd
2 changed files with 22 additions and 74 deletions
|
@ -940,14 +940,14 @@ HRESULT CMenuStaticToolbar::SetMenu(
|
|||
HRESULT CMenuStaticToolbar::FillToolbar()
|
||||
{
|
||||
int i;
|
||||
PWSTR MenuString;
|
||||
|
||||
int ic = GetMenuItemCount(m_hmenu);
|
||||
|
||||
for (i = 0; i < ic; i++)
|
||||
{
|
||||
MENUITEMINFOW info;
|
||||
TBBUTTON tbb = { 0 };
|
||||
PWSTR MenuString = NULL;
|
||||
|
||||
tbb.fsState = TBSTATE_ENABLED;
|
||||
tbb.fsStyle = 0;
|
||||
|
||||
|
@ -961,24 +961,24 @@ HRESULT CMenuStaticToolbar::FillToolbar()
|
|||
if (!AllocAndGetMenuString(m_hmenu, i, &MenuString))
|
||||
return E_OUTOFMEMORY;
|
||||
tbb.fsStyle |= BTNS_DROPDOWN;
|
||||
tbb.iString = (INT_PTR) MenuString;
|
||||
tbb.idCommand = info.wID;
|
||||
|
||||
SMINFO sminfo;
|
||||
if (info.wID >= 0 && SUCCEEDED(m_menuBand->CallCBWithId(info.wID, SMC_GETINFO, 0, (LPARAM) &sminfo)))
|
||||
{
|
||||
tbb.iBitmap = sminfo.iIcon;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MenuString = L"";
|
||||
tbb.fsStyle |= BTNS_SEP;
|
||||
}
|
||||
|
||||
tbb.idCommand = info.wID;
|
||||
tbb.iString = (INT_PTR) MenuString;
|
||||
|
||||
SMINFO sminfo;
|
||||
if (info.wID >= 0 && SUCCEEDED(m_menuBand->CallCBWithId(info.wID, SMC_GETINFO, 0, (LPARAM) &sminfo)))
|
||||
{
|
||||
tbb.iBitmap = sminfo.iIcon;
|
||||
}
|
||||
|
||||
SendMessageW(m_hwnd, TB_ADDBUTTONS, 1, (LPARAM) (LPTBBUTTON) &tbb);
|
||||
HeapFree(GetProcessHeap(), 0, MenuString);
|
||||
|
||||
if (MenuString)
|
||||
HeapFree(GetProcessHeap(), 0, MenuString);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue