MFC, C ++. When you show and hide the ctrls on the screen I can turn off the paint a bit

I have a screen that says 20 controls. I want to show all twenty and then hide only those that are not related to what I am working on.

psudoCode.
for each element 
    show element 

for each element in hide list
    hide element.

      

My problem is between the outlines of the screen colors. It looks very ugly. I know I have seen this, but for the life of me I cannot find this code or even remember which application I saw in this code.

Does anyone know how to suspend the paint a bit?

0


source to share


1 answer


As recently suggested to me, use CWnd :: SetRedraw



wnd.SetRedraw(FALSE)
... // do your stuff with elements
wnd.SetRedraw(TRUE)

      

+2


source







All Articles