Pressing control tab to attached panes |
Post Reply |
Author | |
nguyena1
Groupie Joined: 28 November 2005 Status: Offline Points: 16 |
Post Options
Thanks(0)
Posted: 16 January 2006 at 11:14am |
Hey guys, I was wondering if there is an automatic way to press control tab and have it move within tabbed panes in an attached pane. I figure there should be a very easy solution, some flag to toggle, since cxtpdockingpanetabbed container is derived from cxtptabmanager. If not, is the best way to do it to follow how you(Oleg) did it in the follow link? https://forum.codejock.com/forum_posts.asp?TID=619&KW=co ntrol+tab+attached
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Did you try code in this old solution? I just replace VK_F6 to VK_TAB and it works. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
nguyena1
Groupie Joined: 28 November 2005 Status: Offline Points: 16 |
Post Options
Thanks(0)
|
Well, yes I tried it in the mainfrm but, well this is probably a newb mistake of me but, for the message WM_KEYDOWN, i get that if i click the main app and press ctrl tab. But if i click on an individual pane(give the individual panes focus), my mainfrm doesnt receive the message(put a breakpoint inside WM_KEYDOWN). So I put the code inside of CMyFormView. At first it looks like it works. It switches panes within the attached pane. I actually added next to pSelected->Select(); pSelected->SetFocus(); However, say you have declared 3 CMyFormView called m_ViewControl1, m_ViewControl2, and m_ViewControl3, which are individual docking panes. Take these 3 panes and attach them together. Say right now you the 1st pane clicked. You press Ctrl-Tab. It looks like the 2nd pane is now selected(and focused). But the 2nd pane actually isn't focus. If you press ctrl-tab again, m_ViewControl2's PreTranslateMessage should be called, but in actuality, m_ViewControl1's is being called(checked by putting a break point there and checking the m_ID). In mainfrm I have something that is based on which pane has focus(pDockingPane->IsFocus() and displays ,m_ID of that class. Well when ever you ctrl tab, it correctly displays each pane in the attached pane container because it is based on GetSelected(). However, on my main app, it is still displaying the integer from the 1st pane i had clicked on. If you click on each attached pane, it has the correct focus, but ctrl tabbing does not give the right focus to each pane. Is this because I am trying to SetFocus to another pane from within my viewcontrol? All in all, I was just thinking that there might be a simpiler solution if it already automatically ctrl-tab's just like in a tabmanager. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello, You don't need catch WM_KEYDOWN, you need to override PreTranslateMessage. |
|
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 |