如何删除窗口工作区的边框? [英] How to remove the border of the client area of a window?

查看:91
本文介绍了如何删除窗口工作区的边框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不希望看到窗口客户区的边框.有什么办法可以删除它们?该窗口是一个SDI(单一文档)窗口.

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.

非常感谢!

推荐答案

这样对您有用吗?

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);
}

涉及重载 CWnd :: PreCreateWindow 以便修改定义窗口初始化参数的 CREATESTRUCT .

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

dwExStyle 指的是扩展样式.

这篇关于如何删除窗口工作区的边框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆