Board index » delphi » Events in TMemo

Events in TMemo

I changed background of TMemo
to some picture.

Whenever user do keyboard click
and writes something Picture
is damaged. So I put some
code on event OnChange,
now is ok, but there is still
very fast and short flickering
of whitecolor while typing into.
I added more code to events
OnPaint (I had first to add that
event since there is no such
event) - but it doesen't remove
flickering.

What to do in order to have
smooth wirting on TMemo
and it's picture.

( I added picture using APIs and
control's canvas properties)

Thanks

 

Re:Events in TMemo


On Sat, 17 Jan 1998 20:13:03 +0100, "Petar Banicevic"

Quote
<peta...@geocities.com> wrote:
>I changed background of TMemo
>to some picture.

>Whenever user do keyboard click
>and writes something Picture
>is damaged. So I put some
>code on event OnChange,
>now is ok, but there is still
>very fast and short flickering
>of whitecolor while typing into.
>I added more code to events
>OnPaint (I had first to add that
>event since there is no such
>event) - but it doesen't remove
>flickering.

Try use :
LockWindowUpdate(Memo1.Handle);
before updating memo, and :
LockWindowUpdate(0);
when memo is ready to update (display).

Good Luck !

================
Pozdrowienia !!!
Marco
        Marek Szczepa?ski
        ITTI - MultimedGroup
        Poland

http://multimedserver.itti.com.pl/marco/ - under construction

Re:Events in TMemo


How do I find all files that end in *.doc on a harddrive and their
pathnames
so I can make sweeping changes in D3.

Re:Events in TMemo


duplicate message. Please do not crosspost messages or post to
multiple groups. Thanks.

Good luck.

Kurt

Re:Events in TMemo


How do I find all files that end in *.doc on a harddrive and their
pathnames so I can make sweeping changes in D3.

EX:
Dir *.doc :))))

Tell me more !

Re:Events in TMemo


Petar,

you probably handle the WM_ERASEBKGND message to draw the background bitmap
for your Tmemo descendent. Use the occasion to do a
SetBkMode( msg.wparam, TRANSPARENT ). Also set the controls Brush.Style to
bsClear, if you haven't done so already.

On WIn16 it was a nearly hopeless task to get a properly working multiline
edit control with things like a background bitmap, since the control did on
certain occasions paint outside the WM_PAINT message handler to speed up
performance. I assume that has been cleaned up by MS or you wouldn't have
gotten as far as you got at all <g>.

Peter Below (TeamB)  100113.1...@compuserve.com)

Re:Events in TMemo


Quote
>you probably handle the WM_ERASEBKGND message to draw the background
>bitmap for your Tmemo descendent. Use the occasion to do a
>SetBkMode( msg.wparam, TRANSPARENT ). Also set the controls
>Brush.Style to bsClear, if you haven't done so already.

Hmmm, strange, WM_ERASEBKGND message
is sent only when user presses BACKSPACE.
If I use SetBk... then whole control's canvas
became transparent so I can see window's desktop
through it.

If I don't use that then after each
character that was typed "Clearing
Until End of Line" is done.

Then I have to repaint it, and here
starts flickering.

Other Threads