CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    CRichEditView/CRichEditCtrl

    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


  2. #2
    Guest

    Re: CRichEditView/CRichEditCtrl

    If I set the member variable m_nWordWarp = WrapNone it does not center text. The drawback to this that my text starts wrapping.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured