I've run into a problem where I can't really find a good, low maintenance solution. We're trying to integrate our hosted ActiveX WebBrowser control in a dialog box with tabs (the native C++ tab control) better, such as having its HTML font use the "Shell Dlg" font, removing the 3D border for the WebBrowser control, and making its background match the underlying tab control background.
It's however the last feature there that is the problem. In Windows Vista, when using the Aero or Basic themes, the native tab background is white, and when using the Classic theme (as in Windows 2000), the native tab background is instead given by the CSS color "threedface". So we can't assume a color. :(
The best solution I'd like to see would be one where the background could really be made transparent, but using the CSS "background-color: transparent" or "background-color: inherit" hasn't worked for me here. Perhaps there's also a method to "inject" code from within our hosting C++ application depending on the OS and theme being used, but this is not failsafe for future operating systems. :(
In summary, is there a good way to make the background in a HTML page being hosted in a WebBrowser control match the color of the underlying tab background?