Print Page | Close Window

CXTPDockingPane

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=1211
Printed Date: 14 May 2024 at 7:50pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPDockingPane
Posted By: al1976
Subject: CXTPDockingPane
Date Posted: 27 September 2004 at 4:12pm

Hi,

I'm (newbie) trying to add some control (buttons, combobox...) to a CXTPDockingPane that is attached to an MDI application.

It would be great if I could do it from the Visual Studio resrouce editor using a CFormView/CDialog ( if its possible) or any other way would be fine to.

I'm using Xtreme Toolkit Pro 8.51

Thanks.




Replies:
Posted By: Oleg
Date Posted: 28 September 2004 at 12:02am

1. add new CFormView class

2.Attach it:

 

LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
 if (wParam == XTP_DPN_SHOWWINDOW)
 {
  CXTPDockingPane* pPane = (CXTPDockingPane*)lParam;

  if (!pPane->IsValid())
  {
   if (m_pFormFrame == NULL)
   {        ;
    m_pFormFrame = new CFrameWnd;
    
    CCreateContext context;
    context.m_pNewViewClass = RUNTIME_CLASS(CSimpleFormView);
    context.m_pCurrentDoc = NULL;
    
    m_pFormFrame->Create(NULL, NULL, WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, CRect(0, 0, 0, 0), this, NULL, 0, &context);
    m_pFormFrame->ModifyStyleEx(WS_EX _CLIENTEDGE, 0);
    m_pFormFrame->SendMessageToDescen dants(WM_INITIALUPDATE, 0, 0, TRUE, TRUE);
   }

   pPane->Attach(m_pFormFrame);
  }
 
  return TRUE;
 }
 return FALSE;
}



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: al1976
Date Posted: 28 September 2004 at 1:34am

I still can't get it done...

I have created thourgh the resource editor a new CFormView Class and added some controls, but

I don't see anywere in your code above where do I attach the CFormView ID (IDD_LOAD_FILE_FORMVIEW).

Plus, my application crashes on startup when I use the code above.

Please help.

This is my code:

LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
    if (wParam == XTP_DPN_SHOWWINDOW)
    {
        CXTPDockingPane* pPane = (CXTPDockingPane*)lParam;
  
       
        if (!pPane->IsValid())
        {

   if (m_pFormFrame == NULL)
   {
    m_pFormFrame = new CFrameWnd;
    CCreateContext context;
    context.m_pNewViewClass = RUNTIME_CLASS(LoadFileFormView); //My new CFormView
    context.m_pCurrentDoc = NULL;

    m_pFormFrame->Create(NULL, NULL, WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS,
     CRect(0, 0, 0, 0), this, NULL, 0, &context);
    m_pFormFrame->ModifyStyleEx(WS_EX _CLIENTEDGE, 0);
    m_pFormFrame->SendMessageToDescen dants(WM_INITIALUPDATE, 0, 0, TRUE, TRUE);


   }
   pPane->Attach(m_pFormFrame);

 

             switch (pPane->GetID())
             {
             case IDR_PANE_PROPERTIES:
                 {                              
                     if (m_wndProperties.GetSafeHwnd() == 0)
                     {
      
                           m_wndProperties.Create(NULL,
                               WS_CHILD|WS_CLIPCHILDREN|
                               WS_CLIPSIBLINGS|SS_CENTER,
                               CRect(0, 0, 0, 0), this, 0);
                     }
                     pPane->Attach(&m_wndProperties);

                     break;
                 }
             case IDR_PANE_OPTIONS:
                 {                              
                     if (m_wndOptions.GetSafeHwnd() == 0)
                     {
                           m_wndOptions.Create(NULL,
                               WS_CHILD|WS_CLIPCHILDREN|
                               WS_CLIPSIBLINGS|SS_CENTER,
                               CRect(0, 0, 0, 0), this, 0);
                     }
                     pPane->Attach(&m_wndOptions);
                     break;
                 }
             }
        }
        return TRUE;
    }
    return FALSE;
}



-------------
_Asafl_


Posted By: Oleg
Date Posted: 28 September 2004 at 11:40pm
https://forum.codejock.com/uploads/oleg/2004-09-28_234018_DockingFormView.zip - 2004-09-28_234018_DockingFormView.zip

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: al1976
Date Posted: 29 September 2004 at 9:01am

Thanks !!!!!!!!!!!!!!!!!!!!!!!

You guys have great support !!!!!!!!!!!!!!



-------------
_Asafl_


Posted By: Kenneth
Date Posted: 23 December 2004 at 9:23pm

I am using the example program in the following .zip

https://forum.codejock.com/uploads/oleg/2004-09-28_234018_DockingFormView.zip - 2004-09-28_234018_DockingFormView.zip

If I size the CSimpleFormView window to exactly fit the size of the CFrameWnd, then if I left mouse click on the right view border, the CSimpleFormView window jumps back to the left about 1/4 inch.  It then cannot be sized back to fit the CFrameWnd.

What is causing this?

I see the same problem in my application, which has a popup CFrameWnd (as in the Advanced example), where I create a pane that I place a CSplitterWnd, containing a CTreeview and CListView.  All works, except when I left mouse click on the bottom of the pane to resize.  The bottom of the pane jumps back 1/4" leaving a blank space between it and contols below it.  The pane then cannot be sized back, it always leaves the 1/4" space.  However I can size the CFrameWnd and remove the blank space.

I am using Toolkit Pro version 9.51.

 




Posted By: Indrajit
Date Posted: 07 March 2005 at 1:02pm

Hi,

This is probably a dummy question . How do I send/receive messages to/from controls (such as buttons, sliders & progress bars) in the embedded dialog of CSimpleFormView?

I would appreciate any help on this.
Thanks,
Indrajit




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