我建了一个单文档,将窗口分割成两部分分别包含:ctrltree和ctrllist,但是当我在界面上弹出对话框,并关闭后,tree和list控件上有该对话框的阴影。请问该怎么办?

解决方案 »

  1.   

    你可以调用Invalidate( BOOL bErase = TRUE );函数。
    CWnd::Invalidate
    void Invalidate( BOOL bErase = TRUE );
    Parameters
    bErase
    Specifies whether the background within the update region is to be erased.
    Res
    Invalidates the entire client area of CWnd. The client area is ed for painting when the next WM_PAINT message occurs. The region can also be validated before a WM_PAINT message occurs by the ValidateRect or ValidateRgn member function.
      

  2.   

    比如在list中,右击出现菜单,点击“添加”,出现添加对话框,这个时候有菜单的阴影。退出后是可以刷新,没退出之前的菜单阴影该怎么办?