Google Groupes n'accepte plus les nouveaux posts ni abonnements Usenet. Les contenus de l'historique resteront visibles.

Drawing Tiled Background Image to TRichEdit

17 vues
Accéder directement au premier message non lu

Jakob Westhoff

non lue,
26 mai 2001, 13:43:0926/05/2001
à
Hi
I hope you can help me out with this.

What need to do is to Draw a Background Image to a TRichEditControl.

I am not sure how to do this. I hope you can give me hint or some example
code.

Jakob W.

Robert Dunn

non lue,
26 mai 2001, 23:48:4526/05/2001
à
Hi, Jakob.

Jakob Westhoff wrote:
>
> Hi
> I hope you can help me out with this.
>
> What need to do is to Draw a Background Image to a TRichEditControl.

What you need is a Rich Edit control that can have a transparent
background. AFAIK, this cannot be done with RE 1.0 (which TRichEdit
uses). You will need a control based upon RE 2.0 or 3.0. See
http://home.att.net/~robertdunn/Yacs.html for a FAQ that explains this
and additional information.

HTH.

robert

Remy Lebeau

non lue,
27 mai 2001, 00:17:4727/05/2001
à

"Robert Dunn" <rober...@worldnet.att.net> wrote in message
news:3B10791D...@worldnet.att.net...

> What you need is a Rich Edit control that can have a transparent
> background.

How do you figure that? Looking at his post, I see no indication that he
wants a transparent background, simply to draw an image as the background.
Those are two separate issues.

Would it simply be enough to subclass the RichEdit's WindowProc and paint
the image onto the Rich Edit's canvas (with help from a TControlCanvas) in
response to the WM_ERASEBACKGROUND message? I haven't tested this yet.


Gambit


Gambit


Jakob Westhoff

non lue,
27 mai 2001, 07:46:3227/05/2001
à
that's a good idea. I will try this thx.

Jakob W.

"Remy Lebeau" <gamb...@gte.net> schrieb im Newsbeitrag
news:3b10804e$1_1@dnews...

Robert Dunn

non lue,
27 mai 2001, 21:28:2027/05/2001
à
Hi, Remy.

Remy Lebeau wrote:
>
> "Robert Dunn" <rober...@worldnet.att.net> wrote in message
> news:3B10791D...@worldnet.att.net...
> > What you need is a Rich Edit control that can have a transparent
> > background.
>
> How do you figure that? Looking at his post, I see no indication that he
> wants a transparent background, simply to draw an image as the background.
> Those are two separate issues.

Well, they are separate issues, albeit closely related. I made the
statement to ensure that I understood, but I do not remember ever being
asked to draw *the* background -- it was always how to *a* background.
Maybe this time is different. <g>

> Would it simply be enough to subclass the RichEdit's WindowProc and paint
> the image onto the Rich Edit's canvas (with help from a TControlCanvas) in
> response to the WM_ERASEBACKGROUND message? I haven't tested this yet.

I think that this will not work for the same reason that you cannot make
the RE 1.0 control transparent. The WM_ERASEBACKGROUND message is
definitely broken based on my lengthy attempts to use it to create a
transparent control. Kimberly Paternoster's explanation (posted on my
FAQs page) seems reasonable -- she says that RE 1.0 paints the
background in the WM_PAINT message.

robert

Robert Dunn

non lue,
27 mai 2001, 21:29:4427/05/2001
à
Hi, Jakob.

Jakob Westhoff wrote:
>
> that's a good idea. I will try this thx.

Please let me know if this works on anything other than Win2K.

Thanks,
robert

0 nouveau message