Print Page | Close Window

Create a floating pane...

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=1120
Printed Date: 26 December 2024 at 7:59am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Create a floating pane...
Posted By: ddlittle
Subject: Create a floating pane...
Date Posted: 31 August 2004 at 10:15am

I'm trying to create a floating pane, which works, but not before resizing everything in the frame for the frame to fit.  Maybe I'm doing something wrong.  Anybody have any ideas?  Here's the code:

  m_paneManager.CreatePane(IDR_EDITPIPESIZES,CRect (0,0,100,100),(XTPDockingPaneDirection)NULL,NULL); // a NULL is the same as dockLeftOf apparently...

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

// lots of code for other panes omitted...
   switch (pPane->GetID())
             {
    case IDR_EDITPIPESIZES:
    {
     if(!m_pEditPipeSizes)
     {
      m_pEditPipeSizes = new CEditPipeSizes;
     }
     if(!m_pEditPipeSizes->GetSa feHwnd())
     {
      m_pEditPipeSizes->Cre ate(MAKEINTRESOURCE(IDD_EDITPIPESIZES),GetActiveView());
      pPane->Attach(m_pEdit PipeSizes);
      
      m_pEditPipeSizes->m_a uxInput = auxInput;
     } 
     CRect r;
     POINT pt;
     GetCursorPos(&pt);
     m_pEditPipeSizes->GetClient Rect(&r);
     int w = r.Width();
     int h = r.Height();
     r.top = pt.y;
     r.bottom = r.top + h + GetSystemMetrics(SM_CYCAPTION);
     r.left = pt.x ;
     r.right = r.left + w;
     
     m_paneManager.FloatPane(pPane, r);
    }
    break;
//.. more stuff

 

Any ideas?

Thanks...

- David Little


 




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