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 - 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)
|