Click here to Skip to main content
15,888,590 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi, I want to use a property sheet with 3 pages inside a colored dialog. I managed to create a dynamic property sheet inside the dialog. I could also change the color of the property page. But I cannot change the color of the border of the property sheet and it is still in the default windows dialog color. Could anyone help me to color it. I cannot use tab control(Otherwise it would be easy). Please help me. I also traversed the following link but it didnot work with me. :( Help! --> Problem with CPropertySheet[^]
Posted
Updated 28-Feb-11 1:19am
v3
Comments
mbue 10-Mar-11 10:07am    
You cant change the drawing behaviour of a common control. The frame will been painted by the control themselves. The only thing you can do is subclassing and draw it by your own. But you will loose all windows design behaviours, because you cant do any kind of mixed paint mode.
aravindkrgec 11-Mar-11 6:35am    
Ya that is true. Thanks for the response. But I can adjust with 98 model style. But the dirty look of the border of a property sheet made my GUI terrible. Now I can subclass all other control and make it more buetiful.

At last I made it. I could color the entire area of the property sheet. I implemented it by using the following code:
MIDL
newBrush1 = ::CreateSolidBrush(COLOR);
OldBrush = (HBRUSH)::SetClassLong(GetTabControl()->GetSafeHwnd(), GCL_HBRBACKGROUND, (LONG)newBrush1);

To change the background color of the tab, override the owner draw.
 
Share this answer
 
Have you tried just changing the border for the page (perhaps to "thin") in the properties when you open the page in the dialog editor?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900