Print Page | Close Window

Black toolbar after Upgrade to 10.3!

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=4791
Printed Date: 11 November 2025 at 12:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Black toolbar after Upgrade to 10.3!
Posted By: rocco
Subject: Black toolbar after Upgrade to 10.3!
Date Posted: 14 August 2006 at 3:55am
This is my Toolbar before with 10.2



I just replaced headers and libraries. I Recompiled the hole project and that's my new toolbar!





That is my Code to create the toolbat



   // Initialize the command bars
    if (!InitCommandBars())
    {
        return(FALSE);
    }

    // Office 2007 Theme
    XTPPaintManager()->SetTheme(xtpThemeOffice2007);
    XTPImageManager()->SetIcons(IDR_MAINFRAME);

    XTP_COMMANDBARS_ICONSINFO* pIconsInfo = XTPPaintManager()->GetIconsInfo();
    pIconsInfo->bUseDisabledIcons = TRUE;
    pIconsInfo->bIconsWithShadow = FALSE;
    pIconsInfo->bUseFadedIcons = TRUE;

    // Wenn alle Buttons sichtbar sind soll das Drop-Down
    // am Ende der Symbolleiste nicht angezeigt werden.
    GetCommandBars()->GetCommandBarsOptions()->bShowExpandButtonAlways = FALSE;

    // Get a pointer to the command bars object.
    CXTPCommandBars* pCommandBars = GetCommandBars();
    if (pCommandBars == NULL)
    {
        TRACE0("Failed to create command bars object.\n");
        return(FALSE);      // fail to create
    }

    // Add the menu bar
    CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(_T("Menüleiste"),
        IDR_MAINFRAME);

    if(pMenuBar == NULL)
    {
        TRACE0("Failed to create menu bar.\n");
        return(FALSE);      // fail to create
    }

    // Create ToolBar
    CXTPToolBar* pToolBar = (CXTPToolBar*)pCommandBars->Add(_T("Symbolleiste"),
        xtpBarTop);

    if (!pToolBar || !pToolBar->LoadToolBar(IDR_TOOLBAR))
    {
        TRACE0("Failed to create toolbar\n");
        return(FALSE);
    }

    pCommandBars->HideCommands(arHiddenCmds, _countof(arHiddenCmds));   

    return(TRUE);


Is there something wrong with it?




Replies:
Posted By: Oleg
Date Posted: 14 August 2006 at 7:50am
Hi,
 
If you use Office 2007 theme, you have to add Styles file with bitmap files.
Copy it to \Styles folder.


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


Posted By: gpm1
Date Posted: 14 August 2006 at 9:19am
Hi,
But what happend with your example:

Just selected Office 2007 & Office 2003
 


Posted By: Oleg
Date Posted: 14 August 2006 at 9:28am
Same problem in sample :( Need to copy style to bun\Styles folder. :(
Thanks.


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


Posted By: gpm1
Date Posted: 14 August 2006 at 11:27am
Could you explain, please, where to get files( and type of them ) and where to put them?


Posted By: rocco
Date Posted: 15 August 2006 at 4:16am
Originally posted by oleg oleg wrote:

Hi,
 
If you use Office 2007 theme, you have to add Styles file with bitmap files.
Copy it to \Styles folder.


I like to have all my resources embeded in my prgramm. I link the XTP library statically. Is it possible to use internal resources with the Skin Framework?


Posted By: brianh
Date Posted: 16 August 2006 at 4:27am
Hi,
 
I am having the same problem with this theme, and I'm afraid I don't understand your solution Oleg.  Can you please clarify exactly what we need to do in order to fix this problem? 
 
When you say "you have to add Styles file with bitmap files", which file are you talking about and where is it?
 
Thanks


Posted By: Oleg
Date Posted: 16 August 2006 at 11:26am
You have to copy Source\Ribbon\Styles\Office2007Blue.dll  to \Styles folder of your executable. Or manually set handle
 
HMODULE hModule = LoadLibrary(m_csStylesPath + _T("Office2007Blue.dll"));
((CXTPOffice2007Theme*)pCommandBars->GetPaintManager())->SetImageHandle(hModule);
 
For 10.3.1 we added easy was to link style to exe.


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


Posted By: rocco
Date Posted: 21 August 2006 at 7:57am
hi

Now my toolbar ist fixed. But after close down my application i have this crash:
Debug Error! Damage after ignore block (#0) at 0x014C1740.
With 10.2 i don't have this error!?



     MSVCRTD.DLL!0032376f()    
     MSVCRTD.DLL!00323541()    
>    MFC42D.DLL!operator delete(void * p=0x014c1740)  Zeile 351 + 0xc    C++
     MFC42D.DLL!CMapPtrToPtr::RemoveAll()  Zeile 87 + 0x12    C++
     MFC42D.DLL!CMapPtrToPtr::FreeAssoc(CMapPtrToPtr::CAssoc * pAssoc=0x014c17bc)  Zeile 154    C++
     MFC42D.DLL!CMapPtrToPtr::RemoveKey(void * key=0x0014b9a0)  Zeile 254    C++
     MFC42D.DLL!CHandleMap::RemoveHandle(void * h=0x0014b9a0)  Zeile 211    C++
     MFC42D.DLL!CImageList::Detach()  Zeile 1138    C++
     MFC42D.DLL!CImageList::DeleteImageList()  Zeile 1146 + 0x8    C++
     MFC42D.DLL!CImageList::~CImageList()  Zeile 1126    C++
     xdtcd.exe!XTPPaintThemes::CXTPOffice2003Theme::~CXTPOffice2003Theme()  Zeile 67 + 0xe    C++
     xdtcd.exe!CXTPOffice2007Theme::~CXTPOffice2007Theme()  Zeile 93 + 0x1d    C++
     xdtcd.exe!CXTPOffice2007Theme::`scalar deleting destructor'(unsigned int __flags=1)  + 0x25    C++
     MFC42D.DLL!CCmdTarget::OnFinalRelease()  Zeile 519 + 0x1f    C++
     MFCO42D.DLL!CCmdTarget::InternalRelease()  Zeile 223    C++
     xdtcd.exe!CXTPPaintManager::Done()  Zeile 250    C++
     xdtcd.exe!CXTPPaintManager::CPaintManagerDestructor::~CPaintManagerDestructor()  Zeile 62    C++
     xdtcd.exe!$E356()  + 0x22    C++
     MSVCRTD.DLL!0031acaf()    
     MSVCRTD.DLL!0031abd0()    
     xdtcd.exe!WinMainCRTStartup()  Zeile 345    C
     KERNEL32.DLL!77e987e7()    




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