Recently, tabctrl was used to implement a setting interface, and the system's built-in controls encountered a problem. In this case, you can change the background image to another color.Color_3dfaceFor example, if the background is changed to light blue, I want the non-tab and non-customer areas of the control to be displayed in the same color as the background, but this is not possible in the default control. After reading the example in codeproject, this person completed the undrawn part of the control by processing the wm_erasebkgnd message, and I used an XP-style control, it seems that this is still ineffective!
If you re-define a tabctrl file, the tabctrl file will not be used because of the heavy workload.
Suddenly I was inspired to decide to use the method of setting the display area of the control to remove the areas that are not painted with the same background color, so that I can get the desired effect.
I will not post the specific code for the moment, because there are some special processing and there is no guarantee for universality. This article only provides one method. The following is a comparison of the results.
Effect before processing:
Effect after processing: