我在:PreCreateWindow(CREATESTRUCT& cs)
{
cs.style |=(ES_MULTILINE|WS_HSCROLL|WS_VSCROLL );
cs.style&=~(ES_AUTOHSCROLL|ES_AUTOVSCROLL);
return CRichEditView::PreCreateWindow(cs);
}
不能还是自动换行.高手给个解决方案.
{
cs.style |=(ES_MULTILINE|WS_HSCROLL|WS_VSCROLL );
cs.style&=~(ES_AUTOHSCROLL|ES_AUTOVSCROLL);
return CRichEditView::PreCreateWindow(cs);
}
不能还是自动换行.高手给个解决方案.
[email protected]
CRichEditView::OnDraw(....)
{
....
CRect m_rect;
GetClentRect(&m_rect);
pDC->DrawText("XXXXXXXX...",&m_rect,DT_LEFT|DT_WORDBREAK);
.....
}
这样如果字串长度超过了m_rect的范围,会自动换行。
GetRichEditCtrl().SetTargetDevice(NULL, 1);
WrapChanged();
///////////////////////////////////////////////////////////////
/*
CRichEditView::m_nWordWrap
ResIndicates the type of word wrap for this rich edit view. One of the following values: WrapNone Indicates no automatic word wrapping.
WrapToWindow Indicates word wrapping based on the width of the window.
WrapToTargetDevice Indicates word wrapping based on the characteristics of the target device.
*////////////////////////////////////////////////////////////