How to remove the border of the client area of a window?

南楼画角 提交于 2019-12-12 23:54:44

问题


I don't want the border of a window's client area to be seen. Is there any way to remove them? The window is a SDI(Single Document) window.

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

Thank you very much!


回答1:


Would something like this 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);
}

That involves overloading CWnd::PreCreateWindow in order to modify CREATESTRUCT which defines initialization parameters for a windows.

dwExStyle refers to the extended styles.



来源:https://stackoverflow.com/questions/423529/how-to-remove-the-border-of-the-client-area-of-a-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!