Print Page | Close Window

How to create a dockable form?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1301
Printed Date: 06 November 2025 at 6:21pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to create a dockable form?
Posted By: th.sedlaczek
Subject: How to create a dockable form?
Date Posted: 19 October 2004 at 4:32am

Hi all,

I want to create a dockable form like CFormView or CDialogBar. I have tried to create a CDialogView inside a CXTDockWindow derived class, but the dialogbar does not apear in the docking window. Looking in Spy++ tells the dialog has been created and WS_VISIBLE flag is set, but it is not on the sreen.

I used:- m_dlgDialogBar.Create(this, IDD_MYDIALOG, CBRS_LEFT | CBRS_TOOLTIPS, 59605);

What I have to do to get my dialog inside the docking window? Has someone sample code?

Best regards from sunny south Wales!

Thomas




Replies:
Posted By: xred
Date Posted: 19 October 2004 at 9:20am

First,you should insert a dialog ,then set the dialog's style to "child",then add a class(base class:CFormView),for example CMyDialogView!

Second,attach the FormView to your dockpane!

LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
 if (wParam == XTP_DPN_SHOWWINDOW)//如果pane是显 1034;状态的话
  {
   // get a pointer to the docking pane being shown.
   CXTPDockingPane* pPane = (CXTPDockingPane*)lParam;//获取lParam
   if (!pPane->IsValid())
   {
    switch( pPane->GetID() )
    {
         case 1:
        {
               pPane->AttachView(this,RUNTIME_CLASS(CMyDialogViewl),0);
        }
        break;
    }
   }
  
   return TRUE; // handled
  }
  return FALSE;
}
 

 



Posted By: th.sedlaczek
Date Posted: 19 October 2004 at 9:57am

Hi,

Thank you, but I have just Xtreme Toolkit Standart edition and it seams to me that CXTPDockingPane class ist not included there.

Also there is no AttachView method in CXTDockWindow class, but I have just found something similar called SetChild method. I will try this out!

But thank you anyway for your help!!!

Regards,

Thomas



Posted By: th.sedlaczek
Date Posted: 19 October 2004 at 12:00pm

Okay I have it!

It was working from the beginning and Spy++ was right:- It was visible! I simple didn't see it because my dialog was outside the docking frame area and therefore unvisible. Some how I was expecting it maped to the client area because of the create method which takes a pointer to the parent as argument. Sometimes it is soooooooo simple that you can not see it!

Greetings to China

Thomas




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net