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

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

问题描述:

网上查了一下。

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

    return CEditView::PreCreateWindow(cs);
}

这样还是不行。。

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;