Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Scrolling text in a edit control

14 views
Skip to first unread message

r_z_...@pen_fact.com

unread,
Mar 23, 2006, 3:41:39 PM3/23/06
to
On Thu, 23 Mar 2006 05:28:27 -0800, Olav
<Ol...@discussions.microsoft.com> wrote:

>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

Kellie Fitton

unread,
Mar 23, 2006, 5:10:42 PM3/23/06
to

Timmy

unread,
Mar 23, 2006, 6:03:30 PM3/23/06
to
On 2006-03-23 13:28:27 +0000, Olav <Ol...@discussions.microsoft.com> said:

> 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?

John Carson

unread,
Mar 24, 2006, 5:42:01 AM3/24/06
to
"Olav" <Ol...@discussions.microsoft.com> wrote in message
news:A5AD498E-1E39-4425...@microsoft.com

> 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

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


0 new messages