Quote:
Originally Posted by well named
turns out something was being finicky about what order you added child controls to Control collections when re-laying things out
but only on windows xp
my "random walk code changes" bug fixing technique strikes again :P
I tried to psychic debug it for fun, here's what I came up with:
I probably shouldn't try to guess this from an offhand comment, but..
Let's call the window you have trouble with hWndBad.
Since you are in a tab control, is hWndBad visible (style) and not covered (z-order) when the invalidation occurs?
Does hWndBad get paint messages? Spyxx will tell you this conclusively.
Does hWndBad get invalidated? Test this: At some time when you think it should be invalid, call GetUpdateRect/Rgn, or try PeekMessage(hWndBad, WM_PAINT, WM_PAINT).
If hWndBad does get invalidated, and your paint code executed, but it looks wrong, that says maybe look at WS_CLIPSIBLINGS or WS_CLIPCHILDREN of other windows.
If hWndBad does get invalidated, and your paint code did not execute, somebody else validated the window...
If hWndBad doesn't get invalidated, definitely look carefully at visibility / zorder.
If you do an InvalidateRect (or RedrawWindow, if you like fps) of the tab control in code, does that change things?