Click to See Complete Forum and Search --> : CRichEditView/CRichEditCtrl


May 12th, 1999, 10:25 AM
I am using RichEditView to display some text for reporting. I am trying to center text, I can't figure out why this does not work?

PARAFORMAT paraFormat;
paraFormat.cbSize = sizeof(PARAFORMAT);
paraFormat.dwMask = PFM_ALIGNMENT;
paraFormat.wAlignment = PFA_CENTER;

SetParaFormat(paraFormat); // Set the paragraph.
GetRichEditCtrl().ReplaceSel("This is my title that I want to center");


Mind you, you could center text when RichEditCtrl is used in a dialog. The only difference I see is the RichEditView is not
attached to control. If you have any ideas as what else I need to do, please let me know. Thanks

May 14th, 1999, 08:43 AM
If I set the member variable m_nWordWarp = WrapNone it does not center text. The drawback to this that my text starts wrapping.