Click here to Skip to main content
13,048,805 members (85,459 online)
Rate this:
Please Sign up or sign in to 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 28-Feb-11 1:03am
Updated 28-Feb-11 1:19am
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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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

To change the background color of the tab, override the owner draw.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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?

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 10 Mar 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100