开发者社区 问答 正文

MFC CEditView如何去掉水平和垂直的滚动条?

网上查了一下。
BOOL EditView::PreCreateWindow(CREATESTRUCT& cs)
{

// TODO:  在此添加专用代码和/或调用基类
cs.style &= ~(WS_VSCROLL | WS_HSCROLL);

return CEditView::PreCreateWindow(cs);

}
这样还是不行。。

展开
收起
a123456678 2016-03-09 10:56:30 2640 分享 版权
1 条回答
写回答
取消 提交回答
  • You can modify the style of CREATESTRUCT in the function CMyEditView::PreCreateWindow(CREATESTRUCT& cs) like this:

    BOOL bPreCreated = CEditView::PreCreateWindow(cs);
    cs.style &= ~(WS_HSCROLL);
    cs.style &= ~(WS_VSCROLL);
    return bPreCreated;

    2019-07-17 18:55:35
    赞同 展开评论
问答地址: