如何创建一个字回绕的CEditView


重载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
}

[返回“一学网www.onestudy.net”首页]