How do I remove the border of the client area of ​​a window?

I don't want to see the border of the window area of ​​the window. Is there a way to remove them? The window is an SDI (Single Document) window.

I also noticed that the border is only displayed on the top and left side of the client area (not on the right and bottom). I was very confused.

Many thanks!

+1


source to share


1 answer


Maybe something like this would be useful in your case?

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
    cs.style = WS_POPUP | WS_VISIBLE;  // or others you want
    cs.dwExStyle = 0;  // or others you want

    return CFrameWnd::PreCreateWindow(cs);
}

      



This is due to the overload of CWnd :: PreCreateWindow to change the CREATESTRUCT , which defines the initialization parameters for windows.

dwExStyle refers to extended styles.

+3


source







All Articles