When I create a property page in a property sheet or a tab control on Windows XP and the visual styles (themes) are enabled, the background is a bitmap displaying a gradient. This works very well. However when the property page gets too big (height >600 pixels, width doesn't matter), the size of the according Windows XP background bitmap seems to be too small and the gradient wraps over. So after a dark area a light one is attached below (see attached screenshot). This looks ugly.
I think Windows XP takes this background bitmap from the file C:\WINDOWS\Resources\Theme
(resource "BLUE_TABBACKGROUND_BMP" or "HOMESTEAD_TABBACKGROUND_B
MP" or "METALLIC_TABBACKGROUND_BM
P") which has the height of 600 pixels.
As I have a lot of overlying dialogs and controls just painting something on my own in the background is no solution. How can I prevent the wrapping? Can I force stretching the bitmap instead of wrapping it or can I replace the bitmap by a larger one for my whole process?
// just a MFC example - one way of many how to do this