![]() |
CXTPTabControl Handler |
Post Reply ![]() |
Author | |
KumarCJ ![]() Groupie ![]() ![]() Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() 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. |
|
![]() |
|
KumarCJ ![]() Groupie ![]() ![]() Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() |
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(..) |
|
![]() |
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 |