Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC8.0
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. Frown | :( Help! --> Problem with CPropertySheet[^]
Posted 28-Feb-11 2:03am
Edited 28-Feb-11 2:19am
v3
Comments
mbue at 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 at 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
good
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.
  Permalink  
Rate this: bad
good
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?
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 5,170
1 DamithSL 4,357
2 Maciej Los 3,750
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,851


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 10 Mar 2011
Copyright © CodeProject, 1999-2014
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