locked
MFC: Removing sunken border from a CFormview displayed in a CFrameWnd RRS feed

  • Question

  • Hello,

    I'm creating a Wizard generated MFC application. The right pane displays a CFrameWnd, which in turn displays various views at different times. Whenever it displays a CFormView, there is an unsightly sunken border around its perimetre. This sunken border does not appear if I display a CListView, for example.

    How can I remove this sunken border?

    Regards,
    Sternoceral
    Wednesday, August 1, 2007 11:35 AM

Answers

  •  Sternoceral wrote:
    Hello,

    I'm creating a Wizard generated MFC application. The right pane displays a CFrameWnd, which in turn displays various views at different times. Whenever it displays a CFormView, there is an unsightly sunken border around its perimetre. This sunken border does not appear if I display a CListView, for example.

    How can I remove this sunken border?

    Regards,
    Sternoceral

    Hi Sternoceral,

     

    Try this way:

    In your CFormView's OnInitialUpdate() method, add this code:

    Code Snippet
    ModifyStyleEx(WS_EX_CLIENTEDGE, 0, SWP_FRAMECHANGED);

     

     

    hope it helps

    rico


    Monday, August 6, 2007 7:25 AM

All replies

  •  Sternoceral wrote:
    Hello,

    I'm creating a Wizard generated MFC application. The right pane displays a CFrameWnd, which in turn displays various views at different times. Whenever it displays a CFormView, there is an unsightly sunken border around its perimetre. This sunken border does not appear if I display a CListView, for example.

    How can I remove this sunken border?

    Regards,
    Sternoceral

    Hi Sternoceral,

     

    Try this way:

    In your CFormView's OnInitialUpdate() method, add this code:

    Code Snippet
    ModifyStyleEx(WS_EX_CLIENTEDGE, 0, SWP_FRAMECHANGED);

     

     

    hope it helps

    rico


    Monday, August 6, 2007 7:25 AM
  • Thank you very much!
    Friday, December 13, 2019 9:32 AM