CXTPTabControl Handler
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=18612
Printed Date: 19 June 2025 at 3:44pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: CXTPTabControl Handler
Posted By: KumarCJ
Subject: CXTPTabControl Handler
Date Posted: 04 July 2011 at 7:53am
Hi,
We are using CXTPTabControl class for displaying the tab in 2nd pane of splitter window.
which handler we should use to catch click on Tab?
Currently we are using "SetSelectedItem(..)" but the issue with this is that when we select all the tab 1st time the controls come to "SetSelectedItem(..)" BUT when we try to select tabs 2nd time the control does not come to "SetSelectedItem(..)" so we are unable to handle the things for 2nd time click on tab.
The code we are using as below void ABC::SetSelectedItem(CXTPTabManagerItem* pItem) { HWND hWnd = pItem->GetHandle(); CView * pView = (CView*)CWnd::FromHandlePermanent(hWnd); if (pView->IsKindOf(RUNTIME_CLASS(CMyView))) { GetParentFrame()->SetActiveView((CView *)pView); } CXTPTabControl::SetSelectedItem(pItem); }
Please let us know which handler we should use, so that program control will come to handler for each click on tab,
Thanks, Saket.
|
Replies:
Posted By: KumarCJ
Date Posted: 06 July 2011 at 3:38am
Got it....
afx_msg void OnSelectedChanged(NMHDR* pNMHDR, LRESULT* pResult);
ON_NOTIFY(TCN_SELCHANGE, IDC_TABCONTROL, OnSelectedChanged)
void MyClass::OnSelectedChanged(NMHDR* pNMHDR, LRESULT* pResult) { UNUSED_ALWAYS(pNMHDR); *pResult = 0; ................... ................... ...................
}// End of OnSelectedChanged(..)
|
|