Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Pressing control tab to attached panes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Pressing control tab to attached panes

 Post Reply Post Reply
Author
Message
nguyena1 View Drop Down
Groupie
Groupie


Joined: 28 November 2005
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote nguyena1 Quote  Post ReplyReply Direct Link To This Post Topic: Pressing control tab to attached panes
    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

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 January 2006 at 12:10pm

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
Back to Top
nguyena1 View Drop Down
Groupie
Groupie


Joined: 28 November 2005
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote nguyena1 Quote  Post ReplyReply Direct Link To This Post Posted: 16 January 2006 at 3:24pm

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. 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 17 January 2006 at 1:12am

Hello,

You don't need catch WM_KEYDOWN, you need to override PreTranslateMessage.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.