switch between panes |
Post Reply |
Author | |
jimmy
Senior Member Joined: 11 November 2003 Location: Austria Status: Offline Points: 515 |
Post Options
Thanks(0)
Posted: 13 April 2004 at 9:50am |
Hello,
I've 6 panes. Always 3 panes attached togeter. Now i have 2 tabbed panes. How can i switch between the 3 panes on a tabbed pane. For using CTRL-F6 to switch between the panes. Thanx Johann Obermayr |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
CXTPDockingPaneTabbedContainer* GetParentContainer(CWnd* pParentWnd) { if (pParentWnd == NULL || pParentWnd->GetSafeHwnd() == NULL) // no Window attached return NULL; while (pParentWnd != NULL) { if (DYNAMIC_DOWNCAST(CXTPDockingPaneTabbedContainer, pParentWnd)) return (CXTPDockingPaneTabbedContainer*)pParentWnd; pParentWnd = pParentWnd->GetParent(); } return NULL; } BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) { if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_F6 && (GetKeyState(VK_CONTROL) < 0)) { CXTPDockingPaneTabbedContainer* pContainer = GetParentContainer(GetFocus()); if (pContainer && pContainer->GetPanes().GetCount() > 1) { CXTPDockingPane* pSelected = pContainer->GetPanes().GetHead(); POSITION pos = pContainer->GetPanes().GetHeadPosition(); while (pos) { CXTPDockingPane* pPane = pContainer->GetPanes().GetNext(pos); if (pPane == pContainer->GetSelected()) { if (pos) pSelected = pContainer->GetPanes().GetNext(pos); break; } } ASSERT(pSelected); pSelected->Select(); return TRUE; } } return CXTPMDIFrameWnd::PreTranslateMessage(pMsg); } Edited by oleg |
|
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 |