0

I have a screen with say 20 controls on it. I want to show all twenty, then hide only the ones that don't relate to what I'm working on.

psudoCode.
for each element 
    show element 

for each element in hide list
    hide element.

My problem is that between the loops the screen paints. It looks very ugly.
I know I've seen this done but for the life of me I can't find that code, or even remember what app I'd seen that code in..

Does anyone know how to suspend the paint for a bit?

baash05
  • 4,394
  • 11
  • 59
  • 97

1 Answers1

2

As someone suggested to me not long ago, use CWnd::SetRedraw

wnd.SetRedraw(FALSE)
... // do your stuff with elements
wnd.SetRedraw(TRUE)
Peter
  • 7,216
  • 2
  • 34
  • 46