Why are some strings displayed as garbage when I scroll my read-only multiline Win32 edit control ve

Posted by sharptooth on Stack Overflow See other posts from Stack Overflow or by sharptooth
Published on 2010-04-25T11:36:32Z Indexed on 2010/04/25 11:43 UTC
Read the original article Hit count: 165

Filed under:
|
|
|

In my native C+ Win32 GUI application I have a property sheet with two property pages. One of the property pages contains an edit box:

EDITTEXT   IDC_EDIT_ID,x,y,width,height,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | WS_VSCROLL | WS_HSCROLL | NOT WS_TABSTOP,WS_EX_STATICEDGE

I set a multiline text to this edit box. The text has more lines than the edit can fit, so some of the text is clipped and a vertical scroll bar appears.

When I scroll up with the mouse the lines that come "from under clip area" are drawn as garbage - it looks like first one line is drawn, then some other line is drawn on the same place without first painting the background. The lines that just move up - ones that were visible before scrolling and remain visible after scrolling are displayed allright.

What's the reason and workaround for this behavior?

© Stack Overflow or respective owner

Related posts about gui

Related posts about Windows