how clean a transparent static control?

the static control is transparent. but how can i clean it?

(i mean the image is showed 1 above another, instead clean the control complete and then show the new one)
what do u mean clean? delete text?
the image\text all... and then show the new 'frame' without see the last 'frame'
I experienced this very same problem this week.

My issue was that the control was big enough for many lines of text but only contained one, and did NOT have multiple lines enabled in the control properties.

When it erased, it only erased the area occupied by the text, not the entire control.

the solution for me was to resize the control so that it just contained the text. that fixed it for me.

basically, if you do not have multiple lines enabled in properties, then do not size the control bigger than it needs to be.
RedrawWindow() resolve it ;)
1
2
3
RECT d;
                GetClientRect(hwnd,&d);
                RedrawWindow(hwnd,&d,nullptr,RDW_ERASENOW);

but i have, sometimes, flickers: why?
Topic archived. No new replies allowed.