如何创建一个字回绕的CEditView

解决方案 »

  1.   

    重载CWnd : : PreCreateWindow和修改CREATESTRUCT结构,关闭CEditView对象
    的ES_AUTOHSCROLL和WS_HSCROLL风格位, 由于CEditView : : PreCreateWindow显示
    设置cs. style,调用基类函数后要修改cs . style。
    BOOL CSampleEDitView : : PreCreateWindow (CREATESTRUCT&cs)
    {
        //First call basse class function .
        BOOL bResutl =CEditView : : PreCreateWindow (cs) ;    // Now specify the new window style .
        cs.style &= ~ (ES_AUTOHSCROLL |WS_HSCROLL);
        return bResult ;
    }