I'm attempting to format rich text with C# by sending messages to the
underlying richedit control.

The text can be formatted by sending an EM_SETPARAFORMAT message.
However, when I set the wAlignment to be PFA_JUSTIFY, it doesn't work.
I know that this option only works with Rich Edit 2.0 or later
version. Wouldn't VS .Net 2003 be using at least that version of the
control (or newer)? Has anyone gotten this to work?

Thanks in advance!

Re: Justifying Text in a RichText control by lori

lori
Thu Aug 12 11:40:56 CDT 2004

Anyone ???

lori.pearsall7@gte.net (FinallyInSeattle) wrote in message news:<c987b316.0408051334.656fdce3@posting.google.com>...
> I'm attempting to format rich text with C# by sending messages to the
> underlying richedit control.
>
> The text can be formatted by sending an EM_SETPARAFORMAT message.
> However, when I set the wAlignment to be PFA_JUSTIFY, it doesn't work.
> I know that this option only works with Rich Edit 2.0 or later
> version. Wouldn't VS .Net 2003 be using at least that version of the
> control (or newer)? Has anyone gotten this to work?
>
> Thanks in advance!

Re: Justifying Text in a RichText control by Patrick

Patrick
Thu Aug 12 18:38:10 CDT 2004

This works best by using the ITextDocument interface of the richtextbox. You
can check www.vbaccelerator.com , there is a richtextbox control there which
would answer all your concerns, unfornately the code is in vb so you will
have to translate to c#. Of note you should be using the Paraformat2
structure with the sendmessage api to get the justification done.

"FinallyInSeattle" <lori.pearsall7@gte.net> wrote in message
news:c987b316.0408120840.2802e123@posting.google.com...
> Anyone ???
>
> lori.pearsall7@gte.net (FinallyInSeattle) wrote in message
news:<c987b316.0408051334.656fdce3@posting.google.com>...
> > I'm attempting to format rich text with C# by sending messages to the
> > underlying richedit control.
> >
> > The text can be formatted by sending an EM_SETPARAFORMAT message.
> > However, when I set the wAlignment to be PFA_JUSTIFY, it doesn't work.
> > I know that this option only works with Rich Edit 2.0 or later
> > version. Wouldn't VS .Net 2003 be using at least that version of the
> > control (or newer)? Has anyone gotten this to work?
> >
> > Thanks in advance!