Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - question about dockingpane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

question about dockingpane

 Post Reply Post Reply
Author
Message
oldmonster View Drop Down
Newbie
Newbie


Joined: 28 April 2006
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote oldmonster Quote  Post ReplyReply Direct Link To This Post Topic: question about dockingpane
    Posted: 02 September 2006 at 11:22pm
I have some textbox controls or listcontrol in Dlg1 and Dlg2,if the APP is running and Dlg2 not showed firstly, Only I click the tab label of Dlg2, it can be update, or else it cann't work. 
How to update the content of these controls by codes?
Can you give me some codes?
Thanks a lot. 
 
this is my codes:
MainFrm.h
CXTPDockingPaneManager m_paneManager;
CXTPDockingPane*    pPane1;//pane1   
CDlg1               Dlg1;
 
CXTPDockingPane*       pPane2; 
CDlg2             Dlg2; //pane2
MainFrm.cpp
create Funtion
pPane1= m_paneManager.CreatePane(IDR_PANE1,CRect(0, 0,240, 150), xtpPaneDockRight);
if(!pPane1)
{
 TRACE0("failed to create!\n");
 return -1;
}
pPane2= m_paneManager.CreatePane(IDR_PANE2,CRect(0, 0,240, 150), xtpPaneDockRight);
if(!pPane2)
{
 TRACE0("failed to create!\n");
 return -1;
}
m_paneManager.AttachPane(pPane1, pPane2);

LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
    if (wParam == XTP_DPN_SHOWWINDOW)
    {
        CXTPDockingPane* pPane = (CXTPDockingPane*)lParam;
       
        if (!pPane->IsValid())
        {
            switch (pPane->GetID())
            {
   case IDR_PANE1:
   {
    if (!::IsWindow(Dlg1.m_hWnd))
    {
     Dlg1.Create(IDD_DLG1, this);
    }
    pPane->Attach(&Dlg1);
    break;
   }
   case IDR_PANE2:
   {
    if (!::IsWindow(Dlg2.m_hWnd))
    {
     Dlg2.Create(IDD_DLG2, this);
    }
    pPane->Attach(&Dlg2);
    break;
   }
   }
        }
        return TRUE;
    }
    return FALSE;
}
Back to Top
oldmonster View Drop Down
Newbie
Newbie


Joined: 28 April 2006
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote oldmonster Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2006 at 9:36pm
I use xtp9.601
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 0.156 seconds.