Click to See Complete Forum and Search --> : Skinned Windows Redraw and the Inefficient DeferWindowPos


dy13
September 8th, 2005, 09:32 PM
I am using the classic deferwindowpos algorithm as recommended by many to move/change multiple windows:
BeginDeferWindowPos(wpos);
for(int i=0;i <totalWnd;i++)
DeferWindowPos(...);
EndDeferWindowPos(wpos);

Unfortunately this does not work too well, especially since I am targetting multiple skinned (layered)dialog windows. There's either flicker, "springy" movement, or unfinished-skinning windows when I move or change the window skins. These trespasses only last a few milliseconds but are definitely noticeable. I've thought of two solutions, neither of which I know how to do. I was hoping someone can help me out or point me to a good tutorial on these topics:

1. How would I double-buffer the skins on my layered windows? I am using MFC and CImage.

2. EndDeferWindowPos does a poor job of making sure every single window is ready before redrawing. Is there a way to make certain windows redraw only AFTER all my windows are ready?

Thanks in advance.