![]() |
|
![]() | ||
|
Subject:
Colored Property Sheets (Wizards) in Windows
Category: Computers > Programming Asked by: harryh-ga List Price: $10.00 |
Posted:
10 Jan 2003 22:04 PST
Expires: 09 Feb 2003 22:04 PST Question ID: 141537 |
After asking this question: http://answers.google.com/answers/main?cmd=threadview&id=139638 I am now able to create dialog boxes with non standard colors. Now I want to create a property sheet dialog with non standard colors. I can successfully make all of the actual sheets in the wizard use my colors, but the surrounding area as well as the Back and Next buttons are still black on grey. How can I have windows paint these items in non standard colors? -Harry |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: Colored Property Sheets (Wizards) in Windows
From: studboy-ga on 12 Jan 2003 23:54 PST |
Try overriding CPropertySheet::OnInitDialog If you look into the property sheet source code-- looks like all the buttons (Back, Next, Cancel, Help, ...) are created there. |
Subject:
Re: Colored Property Sheets (Wizards) in Windows
From: harryh-ga on 13 Jan 2003 00:16 PST |
Well studboy, I'll check it out but I'm still not using MFC :-). I suspect that this question is going to be a bit more challenging than my first because (as we learned last time) the only way to get non-default colored buttons is to use OwnerDraw buttons, but I'm not even creating the Back/Next buttons. Windows does that automatically when I call ::PropertySheet(). Anyways, I'll be greatful if you happen to know anything I don't. -Harry |
Subject:
Re: Colored Property Sheets (Wizards) in Windows
From: studboy-ga on 13 Jan 2003 00:54 PST |
Hi Harry OnInitDialog code does hint to where the solution maybe-- for example--in DlgProp.cpp: // CPropertySheet -- a tabbed "dialog" (really a popup-window) ... BOOL CPropertySheet::OnInitDialog() { // change tab style if scrolling tabs desired (stacked tabs are default) ... seems to me the backdrop is a tabbed control. Try emulating what MFC does-- modify the color of the tab control before doing what DoModal/Create does. This link points to the MFC solution: he had to modily both CDialog and CTabCtrl. You already did the Cdialog part-- the surrounding area is the CtabCtrl part. I think... Let me know if it works. |
Subject:
Re: Colored Property Sheets (Wizards) in Windows
From: studboy-ga on 13 Jan 2003 00:54 PST |
http://www.codeguru.com/mfc/comments/46234.shtml |
Subject:
Re: Colored Property Sheets (Wizards) in Windows
From: studboy-ga on 13 Jan 2003 00:57 PST |
Also, just curious--is there a reason why you are not using MFC? Also why so particular about the colors? :) |
Subject:
Re: Colored Property Sheets (Wizards) in Windows
From: harryh-ga on 13 Jan 2003 11:22 PST |
Not using MFC because it's generally more trouble than it's worth for small applications. It also adds a lot of code bloat. Need the colors because it looks nice. Pretty sells. I'm not convinced we're on the right track with the CTabCtrl, but I should have some time later today to check it out. I'll let you know. -Harry |
Subject:
Re: Colored Property Sheets (Wizards) in Windows
From: studboy-ga on 13 Jan 2003 13:22 PST |
Yes, code bloat maybe -- but MFC does cut down some development time especially when the GUI part is heavily dependent upon. Well, I guess that's my opinion I guess. I took a second look at the MFC source and looks like the TabCtrl is part of the PropertySheet dialog--you can extract the handle to it and then modify it. Same goes for the buttons on there: BOOL CPropertySheet::OnInitDialog() { // change tab style if scrolling tabs desired (stacked tabs are default) if (!m_bStacked) { HWND hWndTab = (HWND)::GetDlgItem(m_hWnd, AFX_IDC_TAB_CONTROL); if (hWndTab != NULL) CWnd::ModifyStyle(hWndTab, TCS_MULTILINE, TCS_SINGLELINE, 0); ... HWND hWnd = ::GetDlgItem(m_hWnd, _afxPropSheetButtons[i]); ... |
Subject:
Re: Colored Property Sheets (Wizards) in Windows
From: studboy-ga on 14 Jan 2003 12:48 PST |
Hi Harry Any luck with this one? Thanks |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |