Print Page | Close Window

question about dockingpane

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


Topic: question about dockingpane
Posted By: oldmonster
Subject: question about dockingpane
Date 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;
}



Replies:
Posted By: oldmonster
Date Posted: 03 September 2006 at 9:36pm
I use xtp9.601



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