>Hi,
>In a dialog box we have a multiline edit control with a vertical scroll bar.
>When we in the program set the edit control to read only and scrolls the
>text, the scrolled text get clutterd. It dont update the control so that the
>prevevious text is wiritten over instead of removing it first.
>Any idea how to avoid this?
I don't have a definite answer, so I hope someone else helps out. I
can say that I my multiline edit boxes scroll with no problem, and I
have _no_ code to handle vertical scrolling. I'm pretty sure I have no
code to handle messages meant specifically for edit boxes (although my
library and class structure makes checking this a bit difficult). If
you do have code to handle edit box messages, that may be the problem.
(I use straight C/C++, and that definitely biased my description.)
>
>Olav
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com
Use the following Windows messages to control scrolling
in an edit control:
EM_SETSEL
EM_LINESCROLL
EM_SCROLL
EM_SCROLLCARET
Hope these suggestions helps,
Kellie.
> Hi,
> In a dialog box we have a multiline edit control with a vertical scroll
> bar. When we in the program set the edit control to read only and
> scrolls the text, the scrolled text get clutterd. It dont update the
> control so that the prevevious text is wiritten over instead of
> removing it first.
> Any idea how to avoid this?
>
> Olav
Hi,
Just been fixing something like this today. My issue was because the
edit box background was set as transparent, and wasn't updated
properly. Are you doing any drawing where you're setting the background
as transparent or returning a null brush to a WM_CTLCOLOREDIT or
WM_CTLCOLORSTATIC?
Wild guess here. You process WM_CTLCOLORSTATIC and you call
SetBkMode((HDC)wParam, TRANSPARENT);
If so, that is your problem. What you need to do is call SetBkColor(...)
instead and set it to the same color as the background brush you have chosen
for the window.
--
John Carson