Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - ShowPane bSetFocus issue ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ShowPane bSetFocus issue ?

 Post Reply Post Reply
Author
Message
nickpap View Drop Down
Newbie
Newbie
Avatar

Joined: 09 May 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote nickpap Quote  Post ReplyReply Direct Link To This Post Topic: ShowPane bSetFocus issue ?
    Posted: 24 February 2009 at 5:38am
Hello,

I'm currently using XTP v12.1.0 and I have an issue with CXTPDockingPaneManager->ShowPane not honoring the bSetFocus parameter.

I've created several panes and I attempt to control which ones appear depending on some conditions. I'm using ShowPane to display and ClosePane to hide each pane in turn. The problem is that ShowPane always sets the focus to the newly displayed pane, although I tried passing FALSE in the bSetFocus parameter.

This code does not work:

    this->ShowPane(pPane, pnItem->wOptions & PPI_OPT_SET_FOCUS); //pass TRUE in bSetFocus only when option is set

So, I'm using this workaround:

    if (!(pnItem->wOptions & PPI_OPT_SET_FOCUS)) //workaround to correctly manage not to set focus to shown pane
    {
        CXTPDockingPane* pActivePane = this->GetActivePane(); //get the currently selected pane
        this->ShowPane(pPane, FALSE); //doesn't seem to honor the bSetFocus parameter...
        this->ShowPane(pActivePane); //set the focus back
    }
    else
        this->ShowPane(pPane);
//use default bSetFocus = TRUE



ToolkitPro v12.1.0
Windows XP SP3 32bit
VS 2005 C/C++ MFC
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: 25 February 2009 at 3:56am
Hi,
 
I tried with our PaneSample and seems it works.

try add FALSE in void CMainFrame::OnShowPane(UINT nID) method and check this sample.  Do you see same ?

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.141 seconds.