CXTDockWindow |
Post Reply |
Author | |
denczek
Newbie Joined: 06 August 2004 Status: Offline Points: 27 |
Post Options
Thanks(0)
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...
|
|
denczek
Newbie Joined: 06 August 2004 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
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?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Attach MainFrm.cpp to show what you do.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
denczek
Newbie Joined: 06 August 2004 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
I've attached the file for your review.
Thanks again...uploads/20070126_122933_MainFrm.zip
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
denczek
Newbie Joined: 06 August 2004 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
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.
|
|
denczek
Newbie Joined: 06 August 2004 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
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); |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Can you attach whole application to debug it?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
denczek
Newbie Joined: 06 August 2004 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Unfortunately I cannot attach the files for debugging. There are too many dependencies on third party controls and libraries...
|
|
denczek
Newbie Joined: 06 August 2004 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
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...
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
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 |