Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Bugs in CXTPOffice2003Theme
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bugs in CXTPOffice2003Theme

 Post Reply Post Reply
Author
Message
Dmitry View Drop Down
Groupie
Groupie


Joined: 28 November 2004
Location: Australia
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmitry Quote  Post ReplyReply Direct Link To This Post Topic: Bugs in CXTPOffice2003Theme
    Posted: 14 November 2005 at 7:22pm
Hi,

XTP's toolkit very closely resembles Office 2003 look, however, there are a couple of problems with the current CXTPOffice2003Theme:

1. Incorrect colours for floating toolbars.
This is partly addressed in http://forum.codejock.com/forum_posts.asp?TID=1751, however, the provided CXTPOffice2003ThemeEx incorrectly shows separators and also uses blue colours in Windows 2000, which is not the standard.

2. Incorrect colours for disabled alpha icons.
This is partly addressed in http://forum.codejock.com/forum_posts.asp?TID=1146, but this again is not the exact look.

Does XTP plan to fix those bugs properly in the standard CXTPOffice2003Theme?

Otherwise, does anyone have a latest and greatest theme that looks exactly like Office 2003?

Regards,
Dmitry

Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 16 November 2005 at 12:11am

I doubt Codejock considers these "bugs" really. I do have more updates to my Ex classes which fix more of the things above such as the separators, but I always like the blue oclor in Windows 2000.


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 November 2005 at 1:10am

Thank you Dmitry, Ryan,

for 9.81    problems 1 and 2 will be fixed

we found exactly formula of disabled Office 2003 icons. Ryan was very closed in http://forum.codejock.com/forum_posts.asp?TID=1146 - Thanks for sharing.

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Dmitry View Drop Down
Groupie
Groupie


Joined: 28 November 2004
Location: Australia
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmitry Quote  Post ReplyReply Direct Link To This Post Posted: 16 November 2005 at 5:26pm
Thanks very much, Oleg.

I'm very happy with the way the problems i report get fixed by XTP.

Do you know when 9.81 will be out?

or is there a hotfix for these problems?

Dmitry.
Back to Top
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post Posted: 16 November 2005 at 6:15pm

Great stuff... that's very good news for me.

Thanks for the updates.

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 17 November 2005 at 7:43am
I hope in next week we will release it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 December 2005 at 11:02pm

Hi, all,

9.81 released. How do you like Disabled icons for Office 2003 theme now?

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 07 December 2005 at 1:35am

Disabled icons look nearly exactly like Office 2003 now.

Does CXTPImageManager::m_dDisabledBrightnessFactor or CXTPImageManager::m_dDisabledAlphaFactor have any effect anymore then? I would think they still should, if a user wants to tweak the disable-generation method still.

I noticed the disabled *text* is now just grey, instead of a theme-matching color. Why is that?

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 December 2005 at 9:26am

Hi,

- We added aditional option

XTP_COMMANDBARS_ICONSINFO::bOfficeStyleDisabledIcons

if bOfficeStyleDisabledIcons is FALSE, old sheme is used.

 

- We made our disabled text same as in Office 2003. Check it, it is also gray.

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 07 December 2005 at 10:51am

I like the icons to match Office, so that is all fine. I just thought it would be useful to some people to still be able to tweak the OfficeStyleDisabledIcons using at least m_dDisabledAlphaFactor to darken/lighten them a little still.

I noticed the bars and colors generally became lighter for some colors, to more closely match Office 2003 too.
You are right, Office 2003 does use grey disabled text. It doesn't look as nice as the colored disabled text, but it should match Office 2003 I think, so that is fine as well.

Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 07 December 2005 at 11:23pm
Oleg, I noticed some theme's colors had the m_clrBlahDark and m_clrBlahLight replaced with m_clrBlah as a CXTPPaintManagerColorGradient now, but the values of light and dark are now switched. Nothing is drawn incorrectly, but the "dark" color value is ligher than the "light" value in some cases.

Is this just because the dark/light colors are more for determining up/down vs down/up and left/right vs right/left, or will a future version change this so the dark color is always darker?

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 December 2005 at 2:37am

Yes, sorry, we changed it, and yes some colors are switched to allow call:

XTPDrawHelpers()->GradientFill(pDC, rcFill, m_clrDockBar, TRUE, rc);

So really it is not light/dark, but left/right.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 08 December 2005 at 2:45am

I see. It was no big deal.  The bigger problem I had with my custom theme was the new fGradientFactor which I hadn't seen before. I notice it is set to 0.75f and such for some of the command bars backgrounds to make the gradients center point different. Very nice.

I don't think I have any real issues or bugs with the latest releases anymore :)

The best thing I can think of now is CXTPNativeXPTheme, or a different theme, should use DrawFrameControl, DrawEdge, and such, instead of just resembling the Office 2000 theme, when there is no Luna available. Might be useful for people with old theme add-ons like Window Blinds which might hook those system calls or something.
I have a class started which does a lot of that, but its pretty ugly, and not a lot of people probably really want to see big non-flat buttons on the toolbars.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 09 December 2005 at 12:26am
ok, thanks, we will check how it looks with Window Blinds/Style XP
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2005 at 12:40am

Here is what I wrote, and use, for the XP theme, so that it acts more native for Win2000 or without Luna available instead of just looking like Office 2000.

2005-12-10_003954_Theme.zip

It's not really that pretty of a theme, but I offer it as a choice in my application for users who might want it.

Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2005 at 12:51am
Here is how ugly it looks :)



Btw, in non-Luna the customize dialog has the right edge cut off the checkboxes:


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2005 at 1:13am

Thanks. I think we will add it to CustomThemes sample...

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2005 at 1:25am

Hmm about "right edge cut off the checkboxes"   you tested it with win2k?

Just checked with XP and 2000 and don't see it....

Actually it is CCheckBox from MFC without any modifications.... Microsoft... you know....

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2005 at 10:56am
Hmm, it happens for me only on Windows XP with the Windows Classic style (any color scheme) but not under Windows 2000.  I'm not sure why, but I wouldn't worry about it I guess.

Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2006 at 4:37am
When compiling the XTPDocingPaneOffice2003ThemeEx.cpp and XTPOffice2003ThemeEx.cpp under Codejock Toolkit 9.81, I get the following errors:

XTPDockingPaneOffice2003ThemeEx.cpp
CXTPDockingPaneOffice2003ThemeEx.cpp(19) : error C2065: 'm_clrActiveCaptionDark' : undeclared identifier
XTPDockingPaneOffice2003ThemeEx.cpp(20) : error C2065: 'm_clrActiveCaptionLight' : undeclared identifier
XTPDockingPaneOffice2003ThemeEx.cpp(21) : error C2065: 'm_clrNormalCaptionDark' : undeclared identifier
XTPDockingPaneOffice2003ThemeEx.cpp(22) : error C2065: 'm_clrNormalCaptionLight' : undeclared identifier

XTPOffice2003ThemeEx.cpp
XTPOffice2003ThemeEx.cpp(18) : error C2065: 'm_clrDockBarDark' : undeclared identifier
XTPOffice2003ThemeEx.cpp(19) : error C2065: 'm_clrDockBarLight' : undeclared identifier
XTPOffice2003ThemeEx.cpp(20) : error C2065: 'm_clrCommandBarDark' : undeclared identifier
XTPOffice2003ThemeEx.cpp(21) : error C2065: 'm_clrCommandBarLight' : undeclared identifier
XTPOffice2003ThemeEx.cpp(22) : error C2065: 'm_clrPopupDark' : undeclared identifier
XTPOffice2003ThemeEx.cpp(23) : error C2065: 'm_clrPopupLight' : undeclared identifier
XTPOffice2003ThemeEx.cpp(24) : error C2065: 'm_crlToolbarShadow' : undeclared identifier
XTPOffice2003ThemeEx.cpp(25) : error C2065: 'm_crlFloatingGripper' : undeclared identifier
XTPOffice2003ThemeEx.cpp(26) : error C2065: 'm_crlExpandNormalDark' : undeclared identifier
XTPOffice2003ThemeEx.cpp(27) : error C2065: 'm_crlExpandNormalLight' : undeclared identifier
XTPOffice2003ThemeEx.cpp(28) : error C2065: 'm_clrMenuExpandedDark' : undeclared identifier
XTPOffice2003ThemeEx.cpp(29) : error C2065: 'm_clrMenuExpandedLight' : undeclared identifier
XTPOffice2003ThemeEx.cpp(30) : error C2065: 'm_clrCircleDark' : undeclared identifier
XTPOffice2003ThemeEx.cpp(31) : error C2065: 'm_clrCircleLight' : undeclared identifier
XTPOffice2003ThemeEx.cpp(127) : error C2039: 'GetRawRect' : is not a member of 'CXTPControl'

Do anyone have updated files that are working with Codejock Toolkit 9.81?
Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2006 at 4:40am
Do we actually need these classes to get Office 2003 theme colors in Windows 2000, or is this now supported by Codejock Toolkit?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 January 2006 at 9:15am

Actually in some old version was added

pCommandBars->GetPaintManager()->SetLunaTheme(xtpSyste mThemeBlue); - to make Blue theme for CommandBars only and

XTPColorManager()->SetLunaTheme(xtpSystemThemeBlue); for all controls.

But repeat again. I and Microsoft :) don't recommend do it. Blue theme with non Blue Frame/ScrollBars/Controls looks ugly.

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2006 at 5:39am
Hm...

Does this mean that we should remove the CXTPDockingPaneOffice2003ThemeEx and CXTPOffice2003ThemeEx classes from our project and use some other standard Codejock functions to get Office 2003 look in both Windows XP and Windows 2000 (or applications should look the same in Windows XP and Windows 2000, even if Office 2003 does not look the same in Windows 2000)...

Or should we just modify the existing classes to compile - e.g. change from m_clrCommandBarDark to m_clrCommandBar.clrDark etc.?
Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2006 at 9:23am
Tried to replace the following code in your Wordpad example (Office 11):

    CXTPPaintManager::SetTheme(xtpThemeOffice2003);

with

    XTPColorManager()->SetLunaTheme(xtpSystemThemeBlue);

but then all blue colors disappeared - also in Windows XP.
Do the SetLunaTheme functiona work at all - in case how?

How do I get the blue Office 2003 colors in both Windows XP and Windows 2000?
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2006 at 7:11pm
I keep my Office2003Ex themes updated just because I havn't really bothered to see if the SetLunaTheme really entirely replaces it or not, but if anybody else still uses them, here they are:

---.h file---
class CXTPOffice2003ThemeEx : public CXTPOffice2003Theme
{
public:
    CXTPOffice2003ThemeEx(BOOL bGreyToBlue = TRUE, BOOL bYellowHighlight = TRUE);
    BOOL m_bGreyToBlue, m_bYellowHighlight;
protected:
    virtual void RefreshMetrics();
};


---.cpp file---

CXTPOffice2003ThemeEx::CXTPOffice2003ThemeEx(BOOL bGreyToBlue, BOOL bYellowHighlight)
{
    m_bGreyToBlue = bGreyToBlue;
    m_bYellowHighlight = bYellowHighlight;
    RefreshMetrics();
}

void CXTPOffice2003ThemeEx::RefreshMetrics()
{
    CXTPOffice2003Theme::RefreshMetrics();
    if( !m_bLunaTheme ) {
        CXTPColorManager *pClrMgr = XTPColorManager();
        COLORREF btn = pClrMgr->GetColor(COLOR_BTNFACE);
        if( m_bGreyToBlue && (btn == RGB(192, 192, 192) || btn == RGB(212, 208, 200) || btn == RGB(235, 233, 237)) ) {
            m_clrDockBar.clrDark = RGB(196, 218, 250);
            m_clrDockBar.clrLight = RGB(158, 190, 245);
            m_clrDockBar.fGradientFactor = 0.50f;
            m_clrCommandBar.clrDark = RGB(129, 169, 226);
            m_clrCommandBar.clrLight = RGB(221, 236, 254);
            m_clrCommandBar.fGradientFactor = 0.75f;
            m_clrToolbarExpand.clrDark = RGB(0, 53, 145);
            m_clrToolbarExpand.clrLight = RGB(117, 166, 241);
            m_clrToolbarExpand.fGradientFactor = 0.75f;
            m_clrMenuExpand.clrDark = RGB(129, 169, 226);
            m_clrMenuExpand.clrLight = RGB(227, 239, 254);
            m_clrMenuExpand.fGradientFactor = 0.50f;
            m_clrMenuExpandedGripper.clrDark = RGB(121, 161, 220);
            m_clrMenuExpandedGripper.clrLight = RGB(203, 221, 246);
            m_clrMenuExpandedGripper.fGradientFactor = 0.50f;
            m_clrPopupControl.clrDark = RGB(147, 181, 231);
            m_clrPopupControl.clrLight = RGB(227, 239, 255);
            m_clrPopupControl.fGradientFactor = 0.50f;
            m_clrToolbarShadow = RGB(59, 97, 156);
            m_clrFloatingGripper = RGB(42, 102, 201);
            m_clrStatusPane = RGB(211, 211, 211);
            m_clrTearOffGripper = RGB(169, 199, 240);
            m_grcLunaChecked.clrDark = RGB(255, 173, 85);
            m_grcLunaChecked.clrLight = RGB(255, 213, 140);
            m_grcLunaChecked.fGradientFactor = 0.50f;
            m_grcLunaPushed.clrDark = RGB(255, 207, 139);
            m_grcLunaPushed.clrLight = RGB(254, 142, 75);
            m_grcLunaPushed.fGradientFactor = 0.50f;
            m_grcLunaSelected.clrDark = RGB(255, 212, 151);
            m_grcLunaSelected.clrLight = RGB(255, 242, 200);
            m_grcLunaSelected.fGradientFactor = 0.50f;
            m_clrShadowFactor = RGB(22, 30, 54);
            m_clrStatusTextColor = RGB(0, 0, 0);
            m_clrDisabledIcon.clrDark = RGB(97, 122, 172);
            m_clrDisabledIcon.clrLight = RGB(233, 236, 242);
            m_clrDisabledIcon.fGradientFactor = 0.50f;
            m_bLunaTheme = TRUE;
            CreateGradientCircle();

            m_arrColor[0] = RGB(0, 0, 0);
            m_arrColor[1] = RGB(0, 78, 152);
            m_arrColor[2] = RGB(0, 84, 227);
            m_arrColor[3] = RGB(122, 150, 223);
            m_arrColor[4] = RGB(255, 255, 255);
            m_arrColor[5] = RGB(255, 255, 255);
            m_arrColor[6] = RGB(0, 0, 0);
            m_arrColor[7] = RGB(0, 0, 0);
            m_arrColor[8] = RGB(0, 0, 0);
            m_arrColor[9] = RGB(255, 255, 255);
            m_arrColor[10] = RGB(212, 208, 200);
            m_arrColor[11] = RGB(212, 208, 200);
            m_arrColor[12] = RGB(144, 153, 174);
            m_arrColor[13] = RGB(49, 106, 197);
            m_arrColor[14] = RGB(255, 255, 255);
//            m_arrColor[15] = RGB(236, 233, 216);
            m_arrColor[15] = btn;
            m_arrColor[16] = RGB(172, 168, 153);
            m_arrColor[17] = RGB(172, 168, 153);
            m_arrColor[18] = RGB(0, 0, 0);
            m_arrColor[19] = RGB(216, 228, 248);
            m_arrColor[20] = RGB(255, 255, 255);
            m_arrColor[21] = RGB(113, 111, 100);
            m_arrColor[22] = RGB(251, 248, 231);
            m_arrColor[23] = RGB(0, 0, 0);
            m_arrColor[24] = RGB(255, 255, 225);
            m_arrColor[25] = RGB(181, 181, 181);
            m_arrColor[26] = RGB(0, 0, 128);
            m_arrColor[27] = RGB(61, 149, 255);
            m_arrColor[28] = RGB(0, 0, 0);
            m_arrColor[29] = RGB(0, 0, 0);
            m_arrColor[30] = RGB(196, 219, 249);
            m_arrColor[31] = RGB(255, 238, 194);
            m_arrColor[32] = RGB(0, 0, 128);
            m_arrColor[33] = RGB(254, 128, 62);
            m_arrColor[34] = RGB(144, 157, 178);
            m_arrColor[35] = RGB(141, 141, 141);
            m_arrColor[36] = RGB(255, 192, 111);
            m_arrColor[37] = RGB(0, 0, 128);
            m_arrColor[38] = RGB(39, 65, 118);
            m_arrColor[39] = RGB(106, 140, 203);
            m_arrColor[40] = RGB(109, 150, 208);
            m_arrColor[41] = RGB(246, 246, 246);
            m_arrColor[42] = RGB(230, 227, 210);
            m_arrColor[43] = RGB(0, 45, 150);
            m_arrColor[44] = RGB(0, 0, 0);
            m_arrColor[45] = RGB(0, 0, 0);
            m_arrColor[46] = RGB(0, 0, 0);
            m_arrColor[47] = RGB(0, 0, 0);
            m_arrColor[48] = RGB(255, 251, 233);
            m_arrColor[49] = RGB(129, 126, 114);
            m_arrColor[50] = RGB(0, 0, 128);
            m_arrColor[51] = RGB(216, 231, 252);
            m_arrColor[52] = RGB(158, 190, 245);
            m_arrColor[53] = RGB(203, 225, 252);
            m_arrColor[54] = RGB(0, 45, 150);
            m_arrColor[55] = RGB(196, 218, 250);
            m_arrColor[56] = RGB(189, 211, 247);
            m_arrColor[57] = RGB(127, 157, 185);
            m_arrColor[58] = RGB(141, 141, 141);
            m_arrColor[59] = RGB(0, 0, 0);
            m_arrColor[60] = RGB(141, 141, 141);
        } else if(m_bYellowHighlight) {
            m_arrColor[31] = RGB(255, 238, 194);
            m_arrColor[33] = RGB(254, 128, 62);
            m_arrColor[36] = RGB(255, 192, 111);
            m_bLunaTheme = TRUE;
        }
    }
}


Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2006 at 4:33am
I can't see that the SetLunaTheme is resulting any Office 2003 look in Windows 2000 (the Office 2003 Windows XP look - the blue look), so I am still using your classes.

What about the other classes - i get compiler errors in the following classes with Toolkit Pro 9.81 (as seen above):
    CXTPDockingPaneOffice2003ThemeEx
    CXTPOffice2003ThemeEx

Please send me CXTPDockingPaneOffice2003ThemeEx as well!

Thanks!
Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Posted: 09 February 2006 at 1:19pm
Hello Ark.

Any news related to the
    CXTPDockingPaneOffice2003ThemeEx
    CXTPOffice2003ThemeEx
classes?
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2006 at 5:05pm
class CXTPDockingPaneOffice2003ThemeEx : public CXTPDockingPaneOffice2003Theme
{
public:
    CXTPDockingPaneOffice2003ThemeEx(BOOL bGreyToBlue = TRUE);
    BOOL m_bGreyToBlue;
protected:
    virtual void RefreshMetrics();
};

class CColorSetOffice2003Ex : public CXTPTabPaintManager::CColorSetOffice2003
{
public:
    CColorSetOffice2003Ex(BOOL bGreyToBlue = TRUE);
    virtual COLORREF FillClient(CDC* pDC, CRect rc, CXTPTabManager* pTabManager);
    BOOL m_bGreyToBlue;
protected:
    virtual void RefreshMetrics();
};

----------------------------------------------------

CXTPDockingPaneOffice2003ThemeEx::CXTPDockingPaneOffice2003T hemeEx(BOOL bGreyToBlue)
{
    m_bGreyToBlue = bGreyToBlue;
    RefreshMetrics();

    m_pTabPaintManager->SetAppearance(xtpTabAppearancePropert yPage2003);
    m_pTabPaintManager->SetColorSet(new CColorSetOffice2003Ex(bGreyToBlue));
    m_pPanelPaintManager->SetAppearance(xtpTabAppearancePrope rtyPage2003);
    m_pPanelPaintManager->SetColorSet(new CColorSetOffice2003Ex(bGreyToBlue));
}

void CXTPDockingPaneOffice2003ThemeEx::RefreshMetrics()
{
    CXTPDockingPaneOffice2003Theme::RefreshMetrics();

    if( !m_bLunaTheme ) {
        CXTPColorManager *pClrMgr = XTPColorManager();
        COLORREF btn = pClrMgr->GetColor(COLOR_BTNFACE);
        if( m_bGreyToBlue && (btn == RGB(192, 192, 192) || btn == RGB(212, 208, 200) || btn == RGB(235, 233, 237)) ) {
            m_clrNormalCaption.clrDark = RGB(129, 169, 226);
            m_clrNormalCaption.clrLight = RGB(221, 236, 254);
            m_clrNormalCaption.fGradientFactor = 0.75f;
            m_clrActiveCaption.clrDark = RGB(255, 166, 76);
            m_clrActiveCaption.clrLight = RGB(255, 213, 140);
            m_clrActiveCaption.fGradientFactor = 0.50f;
            m_clrNormalCaptionText = RGB(0, 0, 0);
            m_clrActiveCaptionText = RGB(0, 0, 0);
            m_clrSplitterGripper = RGB(191, 188, 177);
            m_clrSplitter = RGB(216, 231, 252);
            m_clrSplitterGradient.clrDark = RGB(196, 218, 250);
            m_clrSplitterGradient.clrLight = RGB(158, 190, 245);
            m_clrSplitterGradient.fGradientFactor = 0.50f;
            m_bLunaTheme = TRUE;

            m_arrColor[0] = RGB(0, 0, 0);
            m_arrColor[1] = RGB(0, 78, 152);
            m_arrColor[2] = RGB(0, 84, 227);
            m_arrColor[3] = RGB(122, 150, 223);
            m_arrColor[4] = RGB(255, 255, 255);
            m_arrColor[5] = RGB(255, 255, 255);
            m_arrColor[6] = RGB(0, 0, 0);
            m_arrColor[7] = RGB(0, 0, 0);
            m_arrColor[8] = RGB(0, 0, 0);
            m_arrColor[9] = RGB(255, 255, 255);
            m_arrColor[10] = RGB(212, 208, 200);
            m_arrColor[11] = RGB(212, 208, 200);
            m_arrColor[12] = RGB(128, 128, 128);
            m_arrColor[13] = RGB(49, 106, 197);
            m_arrColor[14] = RGB(255, 255, 255);
//            m_arrColor[15] = RGB(236, 233, 216);
            m_arrColor[15] = btn;
            m_arrColor[16] = RGB(172, 168, 153);
            m_arrColor[17] = RGB(172, 168, 153);
            m_arrColor[18] = RGB(0, 0, 0);
            m_arrColor[19] = RGB(216, 228, 248);
            m_arrColor[20] = RGB(255, 255, 255);
            m_arrColor[21] = RGB(113, 111, 100);
            m_arrColor[22] = RGB(251, 248, 231);
            m_arrColor[23] = RGB(0, 0, 0);
            m_arrColor[24] = RGB(255, 255, 225);
            m_arrColor[25] = RGB(181, 181, 181);
            m_arrColor[26] = RGB(0, 0, 128);
            m_arrColor[27] = RGB(61, 149, 255);
            m_arrColor[28] = RGB(0, 0, 0);
            m_arrColor[29] = RGB(0, 0, 0);
            m_arrColor[30] = RGB(158, 190, 245);
            m_arrColor[31] = RGB(255, 238, 194);
            m_arrColor[32] = RGB(0, 0, 128);
            m_arrColor[33] = RGB(254, 128, 62);
            m_arrColor[34] = RGB(144, 157, 178);
            m_arrColor[35] = RGB(197, 194, 184);
            m_arrColor[36] = RGB(255, 192, 111);
            m_arrColor[37] = RGB(0, 0, 128);
            m_arrColor[38] = RGB(39, 65, 118);
            m_arrColor[39] = RGB(106, 140, 203);
            m_arrColor[40] = RGB(109, 150, 208);
            m_arrColor[41] = RGB(246, 246, 246);
            m_arrColor[42] = RGB(230, 227, 210);
            m_arrColor[43] = RGB(0, 45, 150);
            m_arrColor[44] = RGB(0, 0, 0);
            m_arrColor[45] = RGB(0, 0, 0);
            m_arrColor[46] = RGB(0, 0, 0);
            m_arrColor[47] = RGB(0, 0, 0);
            m_arrColor[48] = RGB(255, 251, 233);
            m_arrColor[49] = RGB(129, 126, 114);
            m_arrColor[50] = RGB(0, 0, 128);
            m_arrColor[51] = RGB(236, 233, 216);
            m_arrColor[52] = RGB(172, 168, 153);
            m_arrColor[53] = RGB(239, 237, 222);
            m_arrColor[54] = RGB(0, 45, 150);
            m_arrColor[55] = RGB(236, 233, 216);
            m_arrColor[56] = RGB(236, 233, 216);
            m_arrColor[57] = RGB(127, 157, 185);
            m_arrColor[58] = RGB(180, 177, 163);
            m_arrColor[59] = RGB(0, 0, 0);
            m_arrColor[60] = RGB(180, 177, 163);
        }
    }
}

CColorSetOffice2003Ex::CColorSetOffice2003Ex(BOOL bGreyToBlue)
{
    m_bGreyToBlue = bGreyToBlue;
//    RefreshMetrics();
}

COLORREF CColorSetOffice2003Ex::FillClient(CDC* pDC, CRect rc, CXTPTabManager* pTabManager)
{
    pDC->FillSolidRect(rc, m_clrButtonNormal);
    return m_clrButtonNormal;
}

void CColorSetOffice2003Ex::RefreshMetrics()
{
    CColorSetOffice2003::RefreshMetrics();

    if( !m_bLunaTheme ) {
        CXTPColorManager *pClrMgr = XTPColorManager();
        COLORREF btn = pClrMgr->GetColor(COLOR_BTNFACE);
        if( m_bGreyToBlue && (btn == RGB(192, 192, 192) || btn == RGB(212, 208, 200) || btn == RGB(235, 233, 237)) ) {
            m_clrButtonHighlighted = RGB(255, 240, 201);
            m_clrNavigateButtonBorder = RGB(0, 0, 128);
            m_clrHeaderFace.clrDark = RGB(252, 253, 254);
            m_clrHeaderFace.clrLight = RGB(196, 218, 250);
            m_clrHeaderFace.fGradientFactor = 0.50f;
            m_clrAutoHideFace.clrDark = RGB(196, 218, 250);
            m_clrAutoHideFace.clrLight = RGB(158, 190, 245);
            m_clrAutoHideFace.fGradientFactor = 0.50f;
            m_clrFrameBorder = RGB(59, 97, 156);
            m_clrControlFace = RGB(236, 233, 216);
            m_clrHighlight = RGB(255, 255, 255);
            m_clrButtonSelected = RGB(255, 194, 115);
            m_clrButtonNormal = RGB(162, 192, 246);
            m_clrNormalText = RGB(0, 0, 0);
            m_clrInActiveText = RGB(0, 0, 0);
            m_clrSelectedText = RGB(0, 0, 0);
            m_clrHighlightText = RGB(0, 0, 0);
            m_clrDisabledText = RGB(172, 168, 153);
            m_csPropertyPage2003.clrDarkShadow = RGB(0, 53, 154);
            m_csPropertyPage2003.clrFrameBorder = RGB(59, 97, 156);
            m_csPropertyPage2003.clrBorderLeftHighlight = RGB(117, 166, 241);
            m_csPropertyPage2003.clrBorderTopHighlight = RGB(255, 255, 255);
            m_bLunaTheme = TRUE;
        }
    }
}

Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Posted: 24 May 2006 at 11:26am
How to get the blue Office 2003 colors when running Windows XP with "Windows Classic style" or when running Windows 2003 Server (where "Windows Classis style" is the default style)?
Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Posted: 24 May 2006 at 11:28am
Maybe this can be done by using the following functions:

pCommandBars->GetPaintManager()->SetLunaTheme(xtpSyste mThemeBlue); - to make Blue theme for CommandBars only and

XTPColorManager()->SetLunaTheme(xtpSystemThemeBlue); - for all controls.

But, I have never seen these functions working! Any examples available using these functions?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 24 May 2006 at 12:13pm

Hello,

call XTPColorManager()->SetLunaTheme(xtpSystemThemeBlue);  ; in App::InitInstance(); to make CommandBars use Office2003 blue theme.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2006 at 4:21am
I can't see any differences with or without the call to XTPColorManager()->SetLunaTheme(xtpSystemThemeBlue).

I have also tried with and without the following code to make this Office 2003 blue theme:
    CXTPOffice2003Theme::LoadModernToolbarIcons(IDR_MAINFRAME);
CXTPPaintManager::SetTheme(xtpThemeOffice2003);

pTabPaintManager->SetColorSet(new CColorSetOffice2003Ex());

m_DockingPaneManager.SetTheme(xtpPaneThemeOffice2003);

bool CMainFrameBase::Windows2000Setup() {
    // Set Office 2003 Theme
    XTAuxData().bXPMode = TRUE;
    XTThemeManager()->SetTheme(xtThemeOffice2003);
    CXTButton::SetDefaultTheme(new CXTButtonThemeOffice2003Ex());
    GetCommandBars()->SetPaintManager(new CXTPOffice2003ThemeEx());
    m_DockingPaneManager.SetCustomTheme(new CXTPDockingPaneOffice2003ThemeEx());
    m_DockingPaneManager.GetPaintManager()->GetTabPaintManage r()->SetColorSet(new CColorSetOffice2003Ex()) ;
    m_DockingPaneManager.GetPaintManager()->GetPanelPaintMana ger()->SetColorSet(new CColorSetOffice2003Ex());
    return true;
}

This is working fine (I get the Office 2003 blue theme), but it would be great to remove the non-codejock classes and use XTPColorManager()->SetLunaTheme(xtpSystemThemeBlue) - but I can't get it working. Do you have a very small sample using this function?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2006 at 9:43am

I not sure....

Seems you want XTPColorManager()->SetLunaTheme(xtpSystemThemeBlue) to color all parts of application like caption/scrollbars ?

It only works with Office2003 theme for our components....

If you want WindowsXP Luna style for whole application you can try SkinFramework.  See SkinMDISample/SkinControls from our last release.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2006 at 9:58am
If I can get blue colors in toolbar, main frame menu, pane etc., I will be happy - but I can't see any blue colors when using the XTPColorManager()->SetLunaTheme(xtpSystemThemeBlue) function call...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.