Print Page | Close Window

assign color for ribbon skin

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=13820
Printed Date: 22 June 2025 at 7:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: assign color for ribbon skin
Posted By: barobax
Subject: assign color for ribbon skin
Date Posted: 26 March 2009 at 4:29pm
Hello,
can I assign a color for ribbon Skin ?

Thanks in advance



Replies:
Posted By: Oleg
Date Posted: 27 March 2009 at 1:54am
You can use only 4 standard color.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: barobax
Date Posted: 28 March 2009 at 7:12pm
Hello,
Thanks Oleg,

when I include CodeJock resources my executable size is huge. how can I add skin resources to a dynamic library and load from it ?!?


Posted By: Oleg
Date Posted: 30 March 2009 at 1:38am
Hi,
 
Create dll and load it:
 
 //HMODULE hModule = LoadLibrary(m_csStylesPath + _T("Office2007Blue.dll"));
 //((CXTPOffice2007Theme*)pCommandBars->GetPaintManager())->SetImageHandle(hModule);


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: barobax
Date Posted: 31 March 2009 at 7:55pm
thanks oleg for your help


Posted By: barobax
Date Posted: 31 March 2009 at 7:59pm
how can I Build an office 2007 skin ?!?


Posted By: barobax
Date Posted: 31 March 2009 at 8:34pm
SetImageHandle have two parameters.I can't do it.


Posted By: Oleg
Date Posted: 01 April 2009 at 1:08am
Hi,
Set second parameter to NULL.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: barobax
Date Posted: 01 April 2009 at 4:44pm
Hi,
I removed three lines of code in rc2 and my application load perfectly but when I remove Blue theme resource line in rc2 my application throw an exception.

How can I load four themes from DLL ?!?


Posted By: Oleg
Date Posted: 02 April 2009 at 4:55am

Hi,

Repeat same code with RibbonSample and attach it here. I don't know how you build dll and load it to sugget something.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: barobax
Date Posted: 04 April 2009 at 4:12pm
Hi Oleg,
You are very good. thanks for your helps repeatly.

I changed the OnOptionsStyle(UINT nStyle) code as below :

    switch (nStyle)
    {
        case ID_OPTIONS_STYLEBLUE:
            lpszIniFile = _T("./Office2007Blue.dll");
            break;
        case ID_OPTIONS_STYLEBLACK:
            lpszIniFile = _T("./Office2007Black.dll");
            break;
        case ID_OPTIONS_STYLEAQUA:
            lpszIniFile = _T("./Office2007Aqua.dll");
            break;
        case ID_OPTIONS_STYLESILVER:
            lpszIniFile = _T("./Office2007Silver.dll");
            break;
    }

    HMODULE hModule = LoadLibrary(lpszIniFile);
   
    ((CXTPOffice2007Theme*)GetCommandBars()->GetPaintManager())->SetImageHandle(hModule, NULL);

But when my main module try to load following assertion occured

http://img91.imageshack.us/img91/70/skinassertion.th.jpg


-------------
(Farsi IS WRONG you must say [PARSI])


Posted By: Oleg
Date Posted: 06 April 2009 at 11:08am
Hi,
Please send issue to mailto:support@codejock.com - support@codejock.com and attach Office2007Blue.dll that you tried.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: barobax
Date Posted: 07 April 2009 at 8:00am
thanks oleg,
I sent compressed sample and DLL's


Posted By: tNgLoo
Date Posted: 22 June 2009 at 2:22am
I get same problem, any solution out?
without include "office2007blue.rc"
statement "CXTPPaintManager::SetTheme(xtpThemeRibbon);" will popup assertion.
 as your discription, insert
HMODULE hModule = LoadLibrary(m_csStylesPath + _T("Office2007Blue.dll"));
 ((CXTPOffice2007Theme*)pCommandBars->GetPaintManager())->SetImageHandle(hModule);
before CXTPPaintManager::SetTheme(xtpThemeRibbon);
but I get an exception because no CXTPOffice2007Theme* will prints to before SetTheme statement ( new CXTPRibbonTheme() not run in current time, where to find CXTPOffice2007Theme*?).


Posted By: Oleg
Date Posted: 22 June 2009 at 4:00am

Hi,

 
You can call XTPOffice2007Images()->SetHandle(hModule) instead.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net