Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Create a floating pane...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Create a floating pane...

 Post Reply Post Reply
Author
Message
ddlittle View Drop Down
Senior Member
Senior Member


Joined: 19 February 2004
Location: United States
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote ddlittle Quote  Post ReplyReply Direct Link To This Post Topic: Create a floating pane...
    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


 

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 7.547 seconds.