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ize(rc.right - rc.left, rc.bottom - rc.top)).cx);
- if ( m_pVerticalScrollBar && m_pVerticalScrollBar->IsVisible())
+ if ( m_pHorizontalScrollBar && m_pHorizontalScrollBar->IsVisible())
{
+ int nOffset = m_pHorizontalScrollBar->GetScrollPos();
RECT rcHeader = pHeader->GetPos();
+ rcHeader.left = rc.left - nOffset;
pHeader->SetPos(rcHeader);
}
}
@@ -2473,7 +2475,23 @@ void CListContainerElementUI::DoEvent(TEventUI& event)
}
return;
}
-
+ if( event.Type == UIEVENT_TIMER )
+ {
+ m_pManager->SendNotify(this, DUI_MSGTYPE_TIMER, event.wParam, event.lParam);
+ return;
+ }
+ if( event.Type == UIEVENT_TIMER )
+ {
+ m_pManager->SendNotify(this, DUI_MSGTYPE_TIMER, event.wParam, event.lParam);
+ return;
+ }
+ if( event.Type == UIEVENT_CONTEXTMENU )
+ {
+ if( IsContextMenuUsed() ) {
+ m_pManager->SendNotify(this, DUI_MSGTYPE_MENU, event.wParam, event.lParam);
+ return;
+ }
+ }
// An important twist: The list-item will send the event not to its immediate
// parent but to the "attached" list. A list may actually embed several components
// in its path to the item, but key-presses etc. needs to go to the actual list.
diff --git a/DuiLib/Control/UIMenu.cpp b/DuiLib/Control/UIMenu.cpp
index d6bdc087..13016276 100644
--- a/DuiLib/Control/UIMenu.cpp
+++ b/DuiLib/Control/UIMenu.cpp
@@ -234,7 +234,7 @@ void CMenuWnd::OnFinalMessage(HWND hWnd)
m_pOwner->m_uButtonState &= ~ UISTATE_PUSHED;
m_pOwner->Invalidate();
}
- delete this;
+ //delete this;
}
LRESULT CMenuWnd::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
@@ -716,7 +716,6 @@ SIZE CMenuElementUI::EstimateSize(SIZE szAvailable)
void CMenuElementUI::DoEvent(TEventUI& event)
{
-
if( event.Type == UIEVENT_MOUSEENTER )
{
CListContainerElementUI::DoEvent(event);
@@ -773,9 +772,16 @@ void CMenuElementUI::DoEvent(TEventUI& event)
SetChecked(!GetChecked());
if (CMenuWnd::GetGlobalContextMenuObserver().GetManager() != NULL)
{
- CDuiString* strPost = new CDuiString(GetName().GetData());
- if (!PostMessage(CMenuWnd::GetGlobalContextMenuObserver().GetManager()->GetPaintWindow(), WM_MENUCLICK, (WPARAM)(strPost), (LPARAM)(GetChecked() == TRUE)))
- delete strPost;
+ MenuCmd* pMenuCmd = new MenuCmd();
+ lstrcpy(pMenuCmd->szName, GetName().GetData());
+ lstrcpy(pMenuCmd->szUserData, GetUserData().GetData());
+ lstrcpy(pMenuCmd->szText, GetText().GetData());
+ pMenuCmd->bChecked = GetChecked();
+ if (!PostMessage(CMenuWnd::GetGlobalContextMenuObserver().GetManager()->GetPaintWindow(), WM_MENUCLICK, (WPARAM)pMenuCmd, NULL))
+ {
+ delete pMenuCmd;
+ pMenuCmd = NULL;
+ }
}
ContextMenuParam param;
param.hWnd = m_pManager->GetPaintWindow();
diff --git a/DuiLib/Control/UIMenu.h b/DuiLib/Control/UIMenu.h
index e953e217..b51ab3b2 100644
--- a/DuiLib/Control/UIMenu.h
+++ b/DuiLib/Control/UIMenu.h
@@ -16,6 +16,14 @@ struct ContextMenuParam
HWND hWnd;
};
+struct MenuCmd
+{
+ TCHAR szName[256];
+ TCHAR szUserData[1024];
+ TCHAR szText[1024];
+ BOOL bChecked;
+};
+
enum MenuAlignment
{
eMenuAlignment_Left = 1 << 1,
diff --git a/DuiLib/DuiLib.vcxproj b/DuiLib/DuiLib.vcxproj
index 54c82d0f..580e62a5 100644
--- a/DuiLib/DuiLib.vcxproj
+++ b/DuiLib/DuiLib.vcxproj
@@ -17,6 +17,22 @@
Release
Win32
+
+ SDebugA
+ Win32
+
+
+ SDebug
+ Win32
+
+
+ SReleaseA
+ Win32
+
+
+ SRelease
+ Win32
+