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

CXTDockWindow

 Post Reply Post Reply
Author
Message
denczek View Drop Down
Newbie
Newbie


Joined: 06 August 2004
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote denczek Quote  Post ReplyReply Direct Link To This Post Topic: CXTDockWindow
    Posted: 25 January 2007 at 3:50pm
I am trying to implement the Xtreme DockingPane library into a project that was previously using only Xtreme Toolkit 4.1.  Several of the windows were derived from CXTDockWindow and now I'm not sure how to get these CXTDockWindow based classes to work with the DockingPane library (to support tear away tabs).
 
I have tried changing the base class of these windows to CXTControlBar, but without success.  Is this necessary?  If not, should I use CWnd as the base class or some other class? 
 
Any help or suggestions or sample code is greatly appreciated.
 
Thanks...

 

Back to Top
denczek View Drop Down
Newbie
Newbie


Joined: 06 August 2004
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote denczek Quote  Post ReplyReply Direct Link To This Post Posted: 25 January 2007 at 5:53pm
I changed the base classes from CXTDockWindow to CWnd and after deleting some registry keys (for the layout?), all of the windows are shown in docking panes.  The CWnd based GUI windows are not being updated though.  I can undock one of those docked panes, but the pane shows undocked and undocked.  It appears that a redraw is not occuring for some reason.
 
Any ideas?
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: 26 January 2007 at 1:42am

Hi,

 
Attach MainFrm.cpp to show what you do.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
denczek View Drop Down
Newbie
Newbie


Joined: 06 August 2004
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote denczek Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2007 at 12:30pm
I've attached the file for your review. 
 
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: 26 January 2007 at 2:32pm
Problem in
LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
 if (wParam == XTP_DPN_SHOWWINDOW)
 {
  // get a pointer to the docking pane being shown.
  CXTPDockingPane* pPane = (CXTPDockingPane*)lParam;
  if (!pPane->IsValid())
  {
   CWnd* pWnd = NULL;
   int nPaneID = pPane->GetID();
   if (m_mapPanes.Lookup(nPaneID, pWnd))
   {
    pPane->Attach(pWnd);
   }
  }
 }
 return TRUE; // handled
}
 
 
Don't return TRUE always.  Change it to
 
 
LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
 if (wParam == XTP_DPN_SHOWWINDOW)
 {
  [code]
   return TRUE; // handled
}
  return FALSE;
}
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
denczek View Drop Down
Newbie
Newbie


Joined: 06 August 2004
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote denczek Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2007 at 4:11pm
I made the change and unfortunately, no difference.  The 3 panes and associated windows created via the CreatePane method of my class where I am using the RUNTIME_CLASS macro, update and resize correctly.
 
The 3 panes created using the DockingPaneManager's CreatePane method still do not get updated correctly and are either not shown (transparent backgrounds) or they display and then do not get repainted when the pane is detached or resized.
Back to Top
denczek View Drop Down
Newbie
Newbie


Joined: 06 August 2004
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote denczek Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2007 at 5:57pm
I also noticed that if I use class names in the Create call that the windows initially paint, but I am unable to update the windows.
 
For example, changing this:

m_pWndOutputPane = GetDockingPaneManager()->CreatePane(IDW_OUTPUTBAR, CRect(0, 0, 200, 120), dockBottomOf);

m_wndOutputBar.Create(NULL, "Output", WS_CHILD | WS_VISIBLE, CRect(0, 0, 200, 120), this, IDW_OUTPUTBAR, NULL);

m_pWndOutputPane->Attach(&m_wndOutputBar);

To this:

m_pWndOutputPane = GetDockingPaneManager()->CreatePane(IDW_OUTPUTBAR, CRect(0, 0, 200, 120), dockBottomOf);

m_wndOutputBar.Create("COutputBar", "Output", WS_CHILD | WS_VISIBLE, CRect(0, 0, 200, 120), this, IDW_OUTPUTBAR, NULL);

m_pWndOutputPane->Attach(&m_wndOutputBar);

 
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: 27 January 2007 at 2:45am
Hi,
Can you attach whole application to debug it?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
denczek View Drop Down
Newbie
Newbie


Joined: 06 August 2004
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote denczek Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2007 at 10:37am
Unfortunately I cannot attach the files for debugging.  There are too many dependencies on third party controls and libraries...
Back to Top
denczek View Drop Down
Newbie
Newbie


Joined: 06 August 2004
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote denczek Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2007 at 3:33pm
For one of the problematic windows, if I change this:

m_wndOutputBar.Create(NULL, "Output", WS_CHILD | WS_VISIBLE, CRect(0, 0, 200, 120), this, IDW_OUTPUTBAR, NULL);

to this:

WNDCLASS wndcls;
memset(&wndcls, 0, sizeof(WNDCLASS));   
wndcls.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
wndcls.lpfnWndProc = ::DefWindowProc;
wndcls.hInstance = AfxGetInstanceHandle();
wndcls.hIcon = NULL;
wndcls.hCursor = NULL;
wndcls.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
wndcls.lpszMenuName = NULL;
wndcls.lpszClassName = _T("COutputBar");
if(!AfxRegisterClass(&wndcls))
{
  TRACE("Class Registration Failed\n");
}
 
m_wndOutputBar.Create("COutputBar", "Output", WS_CHILD | WS_VISIBLE, CRect(0, 0, 200, 120), this, IDW_OUTPUTBAR, NULL);
 
Doing this, the window now gets painted, but none of the child windows get drawn.  The COutputBar class was originally derived from the CXTDockWindow class and was changed to derive from the CWnd base class. 
 
The COutputBar class we are using is the same class as that used in the GUI_VisualStudio6 example provided with the Xtreme Toolkit v4.1.
 
Thanks again...
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: 30 January 2007 at 2:34am

Hi,

Create with Wizard new project, copy you code regarding COutputBar and try to reproduce it. If you will attach sample here.
 
Without your code there is no way to say what you do wrong.
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.156 seconds.