Refresh problem with in CFormView |
Post Reply |
Author | |
edwardlj
Newbie Joined: 21 April 2007 Status: Offline Points: 1 |
Post Options
Thanks(0)
Posted: 21 April 2007 at 12:18am |
Hi.
I use a DockingPane in MDI application. and the view is a CFormView. It is ok to create the pane. But when I hide the pane and activate it again by click its icon, the refresh get problem( It seems the formview does not refresh at all). I change the CFormView to CView and it works. The code is as following: BOOL CUserFrame::PreCreateWindow(CREATESTRUCT& cs) { if( !CMDIChildWnd::PreCreateWindow(cs) ) return FALSE; cs.style |= WS_CLIPCHILDREN|WS_CLIPSIBLINGS|WS_CHILD; return TRUE; } int CUserFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) return -1; SetMenu(NULL) ; // control bars objects have been created and docked. m_paneManager.InstallDockingPanes(this); // Create docking panes. m_paneManager.CreatePane( IDR_PANE_PROPERTIES, CRect(0, 0,210, 120), xtpPaneDockLeft); int nID = IDR_PANE_PROPERTIES; m_paneManager.SetIcons(IDB_BITMAP_ICONS, &nID, 1); m_paneManager.SetTheme(m_themeCurrent); return 0; } LRESULT CUserFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam) { if (wParam == XTP_DPN_SHOWWINDOW) { CXTPDockingPane* pPane = (CXTPDockingPane*)lParam; if (!pPane->IsValid()) { ASSERT (pPane->GetID() == IDR_PANE_PROPERTIES); if (!m_wndPropertyGrid.m_hWnd) { m_wndPropertyGrid.Create(CRect(0, 0, 0, 0), this, 1000); m_wndPropertyGrid.SetOwner(this); CFont font; font.CreatePointFont(180, _T("Arial")); LOGFONT lf; font.GetLogFont( &lf ); CXTPPropertyGridItem* pSettings = m_wndPropertyGrid.AddCategory(_T("Settings")); pSettings->AddChildItem(new CXTPPropertyGridItem(_T("Text"), _T("www.codejock.com"))); pSettings->AddChildItem(new CXTPPropertyGridItemFont(_T("Font"), lf)); pSettings->AddChildItem(new CXTPPropertyGridItemColor(_T("Color"), RGB(0,0, 255))); pSettings->Expand(); } pPane->Attach(&m_wndPropertyGrid); } return TRUE; } return FALSE; } Can anybody help me, how to solute this problem? |
|
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 |