Print Page | Close Window

Refresh problem with in CFormView

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


Topic: Refresh problem with in CFormView
Posted By: edwardlj
Subject: Refresh problem with in CFormView
Date 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?
 



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