谢谢

解决方案 »

  1.   

    重载,formview的WM_NCPAINT可以解决。
      

  2.   

    void CFfaaView::OnInitialUpdate()
    {
    ModifyStyleEx(WS_EX_CLIENTEDGE,WS_EX_STATICEDGE);
    ModifyStyle(-1,WS_CHILD|WS_VISIBLE);
    CFormView::OnInitialUpdate();
    GetParentFrame()->RecalcLayout();
    ResizeParentToFit();}
      

  3.   

    然后,在onNcpaint里写上如下几句话
    CWindowDC dc(this);
    CRect rectClient;
    GetClientRect(rectClient);
    CRect rectWindow;
    GetWindowRect(rectWindow);
    ScreenToClient(rectWindow);
    rectClient.OffsetRect(-rectWindow.left, -rectWindow.top);
    dc.ExcludeClipRect(rectClient);
    rectWindow.OffsetRect(-rectWindow.left, -rectWindow.top); // Paint to a memory device context to help
    // eliminate screen flicker...

    // and draw a sunken border for the client area.
    SendMessage(WM_ERASEBKGND, (WPARAM)dc.m_hDC);
    dc.DrawEdge(rectWindow, BDR_RAISEDINNER, BF_RECT);