The tab page background color can be assigned either in the UIR editor with the paint tool (the button with the little brush) or programmatically with SetTabPageAttribute (panelHandle, controlID, tabIndex, ATTR_BACKCOLOR, xxx); either passing a predefined color (e.g. VAL_PANEL_GRAY) or embedding the appropriate MakeColor () in the function.
Pay attention that you won't be able to change the background color if you have the Conform to system color or Use windows visual styles for controls panel options enabled.
Hi I have similar problem but in a different case:
I use windows 9.0 on windows 7 and use panel and my program is opened in 'Windows Style' on windows 7.
I don't want to change it to old apperance on Windows XP, since new version looks god, but when I add
a tab onto a panel in my program, it comes with white background color. and, trying to paint its background color
requires cancellation of windows style according to popup message appeared. Isn't it possible to change tab
background color in windows style.
thanks for any help.
In short, there is no way of changing the tab aspect if you have the 'Use windows visual style for controls" panel attribute set.
Given this, I can see 2 possible alternatives: you can programmatically reset that attribute for the single tab using SetCtrlAttribute with ATTR_DISABLE_PANEL_THEME attribute: the tab will be shown in "classic" style while the other controls will continue following the desktop theme; you can move tabs on the bottom or side border of the tab: this switches the tab from white color to window frame color; you can test this in the UIR editor. You won't be able to change assigned color in this case too.