Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - assign color for ribbon skin
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

assign color for ribbon skin

 Post Reply Post Reply
Author
Message
barobax View Drop Down
Senior Member
Senior Member


Joined: 07 May 2008
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote barobax Quote  Post ReplyReply Direct Link To This Post Topic: assign color for ribbon skin
    Posted: 26 March 2009 at 4:29pm
Hello,
can I assign a color for ribbon Skin ?

Thanks in advance
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: 27 March 2009 at 1:54am
You can use only 4 standard color.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
barobax View Drop Down
Senior Member
Senior Member


Joined: 07 May 2008
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote barobax Quote  Post ReplyReply Direct Link To This Post 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 ?!?
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: 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
Back to Top
barobax View Drop Down
Senior Member
Senior Member


Joined: 07 May 2008
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote barobax Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2009 at 7:55pm
thanks oleg for your help
Back to Top
barobax View Drop Down
Senior Member
Senior Member


Joined: 07 May 2008
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote barobax Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2009 at 7:59pm
how can I Build an office 2007 skin ?!?
Back to Top
barobax View Drop Down
Senior Member
Senior Member


Joined: 07 May 2008
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote barobax Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2009 at 8:34pm
SetImageHandle have two parameters.I can't do it.
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: 01 April 2009 at 1:08am
Hi,
Set second parameter to NULL.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
barobax View Drop Down
Senior Member
Senior Member


Joined: 07 May 2008
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote barobax Quote  Post ReplyReply Direct Link To This Post 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 ?!?
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: 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
Back to Top
barobax View Drop Down
Senior Member
Senior Member


Joined: 07 May 2008
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote barobax Quote  Post ReplyReply Direct Link To This Post 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])
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 April 2009 at 11:08am
Hi,
Please send issue to support@codejock.com and attach Office2007Blue.dll that you tried.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
barobax View Drop Down
Senior Member
Senior Member


Joined: 07 May 2008
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote barobax Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2009 at 8:00am
thanks oleg,
I sent compressed sample and DLL's
Back to Top
tNgLoo View Drop Down
Groupie
Groupie


Joined: 21 April 2005
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote tNgLoo Quote  Post ReplyReply Direct Link To This Post 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*?).
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: 22 June 2009 at 4:00am

Hi,

 
You can call XTPOffice2007Images()->SetHandle(hModule) instead.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.142 seconds.