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
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