![]() |
Update CommandUI in CXTPTaskPaenl |
Post Reply
|
| Author | |
yoavo
Senior Member
Joined: 29 February 2004 Location: Israel Status: Offline Points: 140 |
Post Options
Thanks(0)
Quote Reply
Topic: Update CommandUI in CXTPTaskPaenlPosted: 15 November 2005 at 11:58pm |
|
Hi, Is there a way to handle Update CommandUI message for items in CXTPTaskPanel (as in toolbars and menu items) ? Yoav. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 November 2005 at 2:00am |
|
You can add it easy:
DECLARE_MESSAGE_MAP() afx_msg LRESULT OnIdleUpdateCmdUI(WPARAM wParam, LPARAM); };
CUITaskPanel::CUITaskPanel() } CUITaskPanel::~CUITaskPanel() } BEGIN_MESSAGE_MAP(CUITaskPanel, CXTPTaskPanel)
public: void CUITaskPanel::CTaskPanelCmdUI::Enable(BOOL bOn) ASSERT(m_pItem != NULL); m_pItem->SetEnabled(bOn); void CUITaskPanel::CTaskPanelCmdUI::SetCheck(int nCheck) m_pItem->SetItemSelected(nCheck); void CUITaskPanel::CTaskPanelCmdUI::SetText(LPCTSTR lpszCaption) m_pItem->SetCaption(lpszCaption);
if (pTarget != NULL) void CUITaskPanel::OnUpdateCmdUI(CWnd* pTarget, BOOL bDisableIfNoHndler) for (int i = 0; i < GetGroupCount(); i++) // update the dialog controls added to the toolbar } |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 November 2005 at 2:01am |
|
ps. Don't forget to call m_wndTaskPanel.SetHotTrackStyle(xtpTaskPanelHighlightItem);
to allow pCmdUI->SetChecked(); |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |