   Screen invalidation when switchinbg tabs...
  Win32/C++In order to prevent tearing in my program I have set the last argument of all my InvalidateRect(); calls to false and handled my drawing with buffering.  However, when I switch between my three tabs, I see the background color of my program "tear" through for a brief second.  This is the behavior one sees when the last argument of InvalidateRect(); is set to true.Is there some part of the Win32 tab controls that inherently sends a request to invalidate the whole window?   
  Is your drawing taking place within the tab window?If so, is it actually done to the tab control HWND, or to a child window?If it's done to a child window, make that child window not have a background brush, and set the tab control window style to include WS_CLIPCHILDREN. (If you draw to the actual tab control, then it's harder, since the tab control has no way of knowing which parts of it you will cover with your own drawing, and therefore has to redraw the whole background. It doesn't sound as though this is the case..)It's also possible that you have several child windows, which is an often used technique for multiple tabs. If that is so, make sure to not hide the windows one at a time, and then show the new active tab window, since that can make the background shine through for a short time in between hiding and showing.   ;  The buttons that are redrawn are child windows which are not drawn to the tab.  The tab control itself only takes up about 1/4 of the window.  However, the whole window is being invalidated, not just the buttons or tab control.  I think that is more of the overall problem.   ;  I fixed this by handling the WM_ERASEBKGND message.  I still have some small issues but I will deal with those at another time.  Thanks for the suggestions!   ;  I have fixed most of this problem.  However, I am still seeing slight tearing on one part of my window.  It isn't the overall background or the buttons within a tab.  I am seeing tearing on the blank portion of the tab itself.  The buttons draw properly, it is the actual tab that is tearing.   ;  I suspect I may be seeing this tearing due to the background color not being set properly even though it has been specified previously.  Does anyone know of a way to check what background color a win32 program is currently set to?   