Application Security Testing: An Integral Part of DevOps
|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|
To change the mode you have to assign one of these values to the m_nWordWrap member and then call the WrapChanged() member function. If you don't call the WrapChanged() function the control window is not updated.
// Code to use with CRichEditView // Turn word wrap on m_nWordWrap = WrapToWindow; WrapChanged();
// Code to use with CRichEditCtrl // To turn word wrap off SetTargetDevice(NULL, 1); // To turn word wrap on - based on window width SetTargetDevice(NULL, 0); // To turn word wrap on - based on target device (e.g. printer) // m_dcTarget is the device context, m_lineWidth is the line width SetTargetDevice(m_dcTarget, m_lineWidth);