Index: src/chext/MenuExt.cpp =================================================================== diff -u -r86528d792f82b7ceb7b0fe34345bf66a9656d538 -rd6953174c8b80f2149dcf532ed990c18d34f83c3 --- src/chext/MenuExt.cpp (.../MenuExt.cpp) (revision 86528d792f82b7ceb7b0fe34345bf66a9656d538) +++ src/chext/MenuExt.cpp (.../MenuExt.cpp) (revision d6953174c8b80f2149dcf532ed990c18d34f83c3) @@ -256,7 +256,7 @@ return HandleMenuMsg2(uMsg, wParam, lParam, nullptr); } -HRESULT CMenuExt::HandleMenuMsg2(UINT uMsg, WPARAM /*wParam*/, LPARAM lParam, LRESULT* /*plResult*/) +HRESULT CMenuExt::HandleMenuMsg2(UINT uMsg, WPARAM /*wParam*/, LPARAM lParam, LRESULT* plResult) { try { @@ -308,6 +308,8 @@ lpmis->itemWidth = size.cx + GetSystemMetrics(SM_CXMENUCHECK) + 2 * GetSystemMetrics(SM_CXSMICON); lpmis->itemHeight = std::max(size.cy + 3, GetSystemMetrics(SM_CYMENU) + 3); + if (plResult) + *plResult = TRUE; break; } } Index: src/chext/TContextMenuHandler.cpp =================================================================== diff -u -rd3371a00eafb40afa4251953591ff1004343e1be -rd6953174c8b80f2149dcf532ed990c18d34f83c3 --- src/chext/TContextMenuHandler.cpp (.../TContextMenuHandler.cpp) (revision d3371a00eafb40afa4251953591ff1004343e1be) +++ src/chext/TContextMenuHandler.cpp (.../TContextMenuHandler.cpp) (revision d6953174c8b80f2149dcf532ed990c18d34f83c3) @@ -155,7 +155,7 @@ MENUITEMINFO mii = {0}; mii.cbSize = sizeof(MENUITEMINFO); - mii.fMask = MIIM_ID | MIIM_STATE | MIIM_SUBMENU | MIIM_STRING | MIIM_DATA; + mii.fMask = MIIM_ID | MIIM_STATE | MIIM_SUBMENU | MIIM_STRING | MIIM_DATA | MIIM_FTYPE; mii.fType = MFT_STRING; mii.fState = (spRootMenuItem->GetChildrenCount() > 0) ? MFS_ENABLED : MFS_GRAYED; mii.wID = m_uiNextMenuID++; @@ -181,7 +181,7 @@ MENUITEMINFO mii = {0}; mii.cbSize = sizeof(MENUITEMINFO); - mii.fMask = MIIM_ID | MIIM_STATE | MIIM_STRING | MIIM_DATA; + mii.fMask = MIIM_ID | MIIM_STATE | MIIM_STRING | MIIM_DATA | MIIM_FTYPE; mii.fType = MFT_STRING | (bEnableOwnerDrawnItem ? MFT_OWNERDRAW : 0); mii.fState = bEnableItem ? MFS_ENABLED : MFS_GRAYED; mii.wID = m_uiNextMenuID; @@ -219,7 +219,9 @@ m_fsLocal.GetDynamicFreeSpace(spMenuItem->GetDestinationPathInfo().GetDefaultDestinationPath(), ullSize, ullTotal); - wstrItemName += std::wstring(L" (") + spFormatter->GetSizeString(ullSize) + L")"; + wstrItemName += std::wstring(L" ("); + wstrItemName += spFormatter->GetSizeString(ullSize).c_str(); + wstrItemName += L")"; spMenuItem->SetLocalName(wstrItemName.c_str()); } catch(const std::exception&) Index: src/libchengine/TSizeFormatter.cpp =================================================================== diff -u -r1019bc9df4e044491b7102c37c8cac33cf56fb4a -rd6953174c8b80f2149dcf532ed990c18d34f83c3 --- src/libchengine/TSizeFormatter.cpp (.../TSizeFormatter.cpp) (revision 1019bc9df4e044491b7102c37c8cac33cf56fb4a) +++ src/libchengine/TSizeFormatter.cpp (.../TSizeFormatter.cpp) (revision d6953174c8b80f2149dcf532ed990c18d34f83c3) @@ -62,7 +62,7 @@ m_strTBytes = strTBytes; } - std::wstring TSizeFormatter::GetSizeString(unsigned long long ullData, bool bStrict) const + string::TString TSizeFormatter::GetSizeString(unsigned long long ullData, bool bStrict) const { const size_t stMaxSize = 512; wchar_t szData[ stMaxSize ] = { 0 }; Index: src/libchengine/TSizeFormatter.h =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -rd6953174c8b80f2149dcf532ed990c18d34f83c3 --- src/libchengine/TSizeFormatter.h (.../TSizeFormatter.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libchengine/TSizeFormatter.h (.../TSizeFormatter.h) (revision d6953174c8b80f2149dcf532ed990c18d34f83c3) @@ -22,6 +22,8 @@ #include #include "libchengine.h" +namespace string { class TString; } + namespace chengine { class TConfig; @@ -37,7 +39,7 @@ void SetValues(const wchar_t* strBytes, const wchar_t* strKBytes, const wchar_t* strMBytes, const wchar_t* strGBytes, const wchar_t* strTBytes); - std::wstring GetSizeString(unsigned long long ullData, bool bStrict = false) const; + string::TString GetSizeString(unsigned long long ullData, bool bStrict = false) const; void StoreInConfig(chengine::TConfig& rConfig, PCTSTR pszNodeName) const; bool ReadFromConfig(chengine::TConfig& rConfig, PCTSTR pszNodeName);