0

I've googled and all articles I've found show creating docking dialogs inside CMainFrame itself. I want/need to be able to create a Popup dialog that is in itself a dockable dialog as I need to create/add a multitude of dialogs to it but not the CMainFrame. ie.

class CustomObjectClassDocking : public CFrameWndEx
{
    public:
    DECLARE_DYNAMIC(CustomObjectClassDocking)
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
}

int CustomObjectClassDocking::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    m_wndObjectPane.EnableDocking(CBRS_ALIGN_ANY);
    EnableDocking(CBRS_ALIGN_ANY);
    EnableAutoHidePanes(CBRS_ALIGN_ANY);
    DockPane(&m_wndObjectPane);
}


void StartCustomDockDlg
{
   CustomObjectClassDocking *pCustDock = new CustomObjectClassDocking();
   pCustDock->Create(/*what is suppose to go here?*/); //stuck here currently.
}

*Class doesn't have to inherit from CFrameWndEx, but does need to be dockable.

Does anyone have any working examples, where I might find relevant info or how I'd go about this?

Thanks.

ReturnVoid
  • 1,106
  • 1
  • 11
  • 18

1 Answers1

0

After some more searching/testing, found a solution;

From the above;

void StartCustomDockDlg::StartCustomDockingDlg
{
    CRect wndRect;
    GetWindowRect(wndRect);
   CustomObjectClassDocking *pCustDock = new CustomObjectClassDocking();
   pCustDock->Create(NULL, NULL, WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME, wndRect, this);

}

following helped; C++ MFC Feature Pack --> Create multiple CDockablePanes onto an CDialog

Community
  • 1
  • 1
ReturnVoid
  • 1,106
  • 1
  • 11
  • 18