I was trying to make my own tab control so I can open several files in my program. I was trying to do this by creating a richedit control for each tab and then hiding and showing those when a user clicks on a different tab. Maybe it isn't the best way, but it seems to work ok, except the edit controls flicker when switching back and forth.
If I handle the WM_ERASEBKGND message and just return 0, there is no flicker. Problem is, I need to erase the background except where the edit control is. So what is the easiest way to erase the entire background except for a certain rect?
According to this page, I should be able to call InvalidateRect with the last parameter as false, but that doesn't seem to work:
Code:case WM_PAINT: { RECT rc; GetWindowRect(hRiched[currentEdit],&rc); InvalidateRect(hwnd,&rc,0); tab.RedrawTabs(); }



LinkBack URL
About LinkBacks


