How to draw transparent areas for child control?
I have a CTabCtrl subclass that I am trying to override WM_PAINT to do a custom drawing. The only problem is that when I change the selected tab, I get artifacts in the dialog where the old paint code was not removed before the new code is drawn on top. (Standard tab controls have a tab selected 2 pixels larger than unselected tabs, so when you navigate from selected to unselected, you're left with the previous artifacts.)
What is the best way to "reshape" this area? I tried to get parent DC and BitBlt'ing on the child DC, but that doesn't work because the parent DC already contains the image of that control.
a source to share
Are you also overriding the WM_ERASEBACKGROUND message? You should probably do this and remove the region in the control.
You can use DrawThemeParentBackground to paint the background (XP and later) if you don't want to replace all of the drawing logic.
a source to share