From: JY on
Hi,

What would be the simplest thing I could do to display static text (rich) in
a dialog? Looks like a simple static control would not support this.Do I have
to use a CRichEditCtrl?

TIA,
JY
From: David Lowndes on
>What would be the simplest thing I could do to display static text (rich) in
>a dialog? Looks like a simple static control would not support this.Do I have
>to use a CRichEditCtrl?

For anything more than a single font you will require either a rich
edit or HTML control (the former is probably the simplest solution
here).

Dave
From: Joseph M. Newcomer on
As pointed out, you have to use a rich edit control (which you can disable) or a HTML
control (I don't know if it does anything weird if it is disabled).

Otherwise, you are on your own to do TextOut commands in your OnPaint handler for a
subclassed control and do your own formatting.
joe

On Thu, 11 Feb 2010 04:38:01 -0800, JY <sd(a)nospamgroup.com> wrote:

>Hi,
>
>What would be the simplest thing I could do to display static text (rich) in
>a dialog? Looks like a simple static control would not support this.Do I have
>to use a CRichEditCtrl?
>
>TIA,
>JY
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: AliR on
What you do is create a hidden CRichEditCtrl, and then send it
EM_FORMATRANGE messages, with the DC where you want it to display.

Here is a sample:
http://www.learnstar.com/AliR/RTFScalerMFC.zip

AliR.


"JY" <sd(a)nospamgroup.com> wrote in message
news:407F5D70-7BAC-4E5B-A325-14E360A8888A(a)microsoft.com...
> Hi,
>
> What would be the simplest thing I could do to display static text (rich)
> in
> a dialog? Looks like a simple static control would not support this.Do I
> have
> to use a CRichEditCtrl?
>
> TIA,
> JY


From: AliR on
I got bored and put together a CRichStatic class. You can use it just like
CStatic class but when you call SetWindowText you have to pass it RTF text.

http://www.learnstar.com/AliR/RichStatic.zip

And a sample application to go with it:
http://www.learnstar.com/AliR/RichStaticSample.zip

AliR.

"AliR" <AliR(a)online.nospam> wrote in message
news:%23BCqIE1qKHA.3464(a)TK2MSFTNGP06.phx.gbl...
> What you do is create a hidden CRichEditCtrl, and then send it
> EM_FORMATRANGE messages, with the DC where you want it to display.
>
> Here is a sample:
> http://www.learnstar.com/AliR/RTFScalerMFC.zip
>
> AliR.
>
>
> "JY" <sd(a)nospamgroup.com> wrote in message
> news:407F5D70-7BAC-4E5B-A325-14E360A8888A(a)microsoft.com...
>> Hi,
>>
>> What would be the simplest thing I could do to display static text (rich)
>> in
>> a dialog? Looks like a simple static control would not support this.Do I
>> have
>> to use a CRichEditCtrl?
>>
>> TIA,
>> JY
>
>


 |  Next  |  Last
Pages: 1 2
Prev: Can I render an HTML Table
Next: VC++