Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Designer (.XCB) problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Designer (.XCB) problem

 Post Reply Post Reply
Author
Message
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post Topic: Designer (.XCB) problem
    Posted: 06 October 2009 at 11:53am
I have an XCB file containing several toolbars, main menu, and context menus. I have spent a lot of time on it, and it works fine the way it is, but I'm unable to make any changes to it.

Loading it in Command Bar Designer and making any change (even just switching to XML view and back), and then saving, result in all icons and some toolbars missing when I load in the program; additionally, the Customize option becomes inoperable.

Exporting to XML and then importing results in completely empty toolbars and menus.

I have linked to a zip that includes the original XCB (and as exported to XML), and modified XCB and XML (though the "modification" was only to switch to XML view and back. (I got an Access Denied trying to attach it, even though I'm logged in.)

http://www.cerious.com/binaries/cerious/cjxcb.zip

I'm using the Command Bars Designer 13.1.0.0 dated 7/24/2009, which I believe is an update to fix problems with XML > 1MB.

Here is the code I'm using to load it (from a resource in the EXE).

void CMainFrame::GenerateCommandBars()
{
    CXTPCommandBars* pCommandBars = GetCommandBars();
    pCommandBars->SetMenu(_T("Menu Bar"), 0);

    HRSRC hRsrs = FindResource(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_COMMANDBARS), _T("RT_RCDATA"));
    ASSERT(hRsrs);
    if (hRsrs) {
        HGLOBAL hGlobal = LoadResource(AfxGetInstanceHandle(), hRsrs);
        if (hGlobal) {
            DWORD dwSize = SizeofResource(AfxGetInstanceHandle(), hRsrs);
            LPVOID pData = LockResource(hGlobal);
            CMemFile file((BYTE*)pData, dwSize);
            CArchive ar(&file, CArchive::load | CArchive::bNoFlushOnDelete);
            pCommandBars->LoadDesignerBars(ar);
        }
    }
}


Please help me find what's wrong!

Thanks,
Phillip

Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)

Platform: Windows 200x/XP/Vista/Win7 (32/64 bit)

Language: Visual C++ 9.0 (Studio 2008)

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.031 seconds.