I've asked what to do about the the smearing of text and background
in my (multi-line) edit control a few days ago.
It appears when scrolling and when using backspace the text will only
be erased when you clear the complete line. If you don't only the cursor
moves and text will simply be written over.

I was gonna use a pattern brush. But there is simply no can do.
As soon as you have text in it the only thing that determines the
background color is SetBkColor which again only allows a solid color.

The funny thing is you can edit the text in a single-line edit box just
fine using a pattern brush and even setting the background to

I've also tried subclassing it filling the background in response to
WM_ERASEBKGND using FillRect. Scrolling, selecting and editing will
make the selected lines white:

invoke SetBkMode,wParam,TRANSPARENT
;invoke SetBkColor,wParam,0EFEFEFh
invoke GetWindowRect,hWnd,addr rect
invoke FillRect,wParam,addr rect,hBackBrush

I think I will have to draw the edit box completely myself
or use solid color :mad: .

Another real bad problem I have is when I open PaintShop Pro
my program simply seems to forget I ever colored it:
Posted on 2002-08-18 05:23:17 by goofee