question about dockingpane |
Post Reply |
Author | |
oldmonster
Newbie Joined: 28 April 2006 Status: Offline Points: 5 |
Post Options
Thanks(0)
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; } |
|
oldmonster
Newbie Joined: 28 April 2006 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
I use xtp9.601
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |