Well.. I've been able to put images on most of the controls, but controls like the tabstrip don't have a DC .. so I'm not sure how to go about skinning it.
Any Suggestions?
Printable View
Well.. I've been able to put images on most of the controls, but controls like the tabstrip don't have a DC .. so I'm not sure how to go about skinning it.
Any Suggestions?
Are you using the container or non-container tab control?
I'm using the non-container tab control.. Tabstrip
Put an Image control over it, to correspond with the coordinates, or use the FindWindow API function to get the hWnd, then use that to get a device context, and paint onto it.
thats an OK idea if you just want to skin the client area of the tabstrip control, but if you stretch an image over the entire thing it covers the tabs, and I want to skin the tabs themselves as well as the client area.
If you know the dimensions of each tab, and which one is selected, you can skin the tabs individually. I'm sure I saw a tab control somewhere that had this facility - I'll check.
Even if i could get the coordinates and size of the individual tabs (sounds hard, havent actually tried it) it would cover up the tabs caption. The image needs to be directly drawn to the tab control... I just don't know how to do it :)
Actually, since you're using the TabStrip control, it would probably be easier to write your own control! Interesting project, and I'm sure loads of people here would help if there was scope for developer-selected features.
use GetDC then getwindowrect,
then stretchblt.. and paint that damn control! :D