Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Ribbon MDI apps
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon MDI apps

 Post Reply Post Reply
Author
Message
Tomas View Drop Down
Newbie
Newbie
Avatar

Joined: 21 July 2006
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tomas Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon MDI apps
    Posted: 21 July 2006 at 7:05pm

I am working on a MDI app. I would like to have a ribbon toolbar in each of my child frames. How can I do that?

Tomas
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2006 at 11:58am
Derive your child frames from CXTPFrameWndBase<CMDIChildWnd>, then initialize and create the CommandBars/Ribbon the same way as in your mainframe.
Codejock support
Back to Top
Tomas View Drop Down
Newbie
Newbie
Avatar

Joined: 21 July 2006
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tomas Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2006 at 5:46pm
Originally posted by ABuenger ABuenger wrote:

Derive your child frames from CXTPFrameWndBase<CMDIChildWnd>, then initialize and create the CommandBars/Ribbon the same way as in your mainframe.

If that works as embarrassing as it is I will have to kiss you.
I will test it on Monday.

Big smile

Tomas



Back to Top
Tomas View Drop Down
Newbie
Newbie
Avatar

Joined: 21 July 2006
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tomas Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2006 at 10:33am

Originally posted by ABuenger ABuenger wrote:

Derive your child frames from CXTPFrameWndBase<CMDIChildWnd>, then initialize and create the CommandBars/Ribbon the same way as in your mainframe.



It turns that in my test app I was already doing that. I am still crashing: This is how the create function looks like:

int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
        return -1;

    if (!InitCommandBars())
        return -1;

    CXTPCommandBars* pCommandBars = GetCommandBars();
//    pCommandBars->GetCommandBarsOptions()->bShowExpandButtonAlways = false;

    CXTPToolBar* pCommandBar=NULL;

    if( 1 )
    {
        CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)pCommandBars->Add(_T("The Ribbon"), xtpBarTop, RUNTIME_CLASS(CXTPRibbonBar));

        //CXTPRibbonTab* pTabWrite = pRibbonBar->AddTab(2);

    }

...
}



Any help will still be greatly appreciated.

 

Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2006 at 10:41am
Where does it crash?
 
Does GetCommandBars(); return a valid pointer or NULL? Add a ASSERT (NULL != pCommandBars);
 
Maybe you should try to rename "The Ribbon" to something else.
 
Codejock support
Back to Top
Tomas View Drop Down
Newbie
Newbie
Avatar

Joined: 21 July 2006
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tomas Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2006 at 11:02am
Originally posted by ABuenger ABuenger wrote:

Where does it crash?
 
Does GetCommandBars(); return a valid pointer or NULL? Add a ASSERT (NULL != pCommandBars);
 
Maybe you should try to rename "The Ribbon" to something else.
 


yea GetCommandBars is happy.

I changed the name didnt care.
It actually crashes after the OnCreate function.

This is the code stack where it crashes.


     ntdll.dll!7c901230()    
     [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]   
>    msvcr80d.dll!_CrtDbgBreak()  Line 89    C
     msvcr80d.dll!_VCrtDbgReportA(int nRptType=2, const char * szFile=0x010b1e04, int nLine=210, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x00120ed4)  Line 295    C
     msvcr80d.dll!_CrtDbgReportV(int nRptType=2, const char * szFile=0x010b1e04, int nLine=210, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x00120ed4)  Line 300 + 0x1d bytes    C
     msvcr80d.dll!_CrtDbgReport(int nRptType=2, const char * szFile=0x010b1e04, int nLine=210, const char * szModule=0x00000000, const char * szFormat=0x00000000, ...)  Line 317 + 0x1d bytes    C
     mfc80d.dll!AfxAssertFailedLine(const char * lpszFileName=0x010b1e04, int nLine=210)  Line 25 + 0x14 bytes    C++
     mfc80d.dll!CWnd::OnWndMsg(unsigned int message=21, unsigned int wParam=0, long lParam=0, long * pResult=0x001213ec)  Line 2028    C++
     ToolkitProEval1020vc80D.dll!0099b29f()    
     mfc80d.dll!CWnd::WindowProc(unsigned int message=21, unsigned int wParam=0, long lParam=0)  Line 1741 + 0x20 bytes    C++
     mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x01d85850, HWND__ * hWnd=0x00031452, unsigned int nMsg=21, unsigned int wParam=0, long lParam=0)  Line 240 + 0x1c bytes    C++
     mfc80d.dll!CWnd::SendMessageToDescendants(HWND__ * hWnd=0x0003144a, unsigned int message=21, unsigned int wParam=0, long lParam=0, int bDeep=1, int bOnlyPerm=1)  Line 2524    C++
     mfc80d.dll!CWnd::SendMessageToDescendants(HWND__ * hWnd=0x00031440, unsigned int message=21, unsigned int wParam=0, long lParam=0, int bDeep=1, int bOnlyPerm=1)  Line 2534    C++
     mfc80d.dll!CWnd::SendMessageToDescendants(HWND__ * hWnd=0x000c12d2, unsigned int message=21, unsigned int wParam=0, long lParam=0, int bDeep=1, int bOnlyPerm=1)  Line 2534    C++
     mfc80d.dll!CWnd::SendMessageToDescendants(HWND__ * hWnd=0x00071348, unsigned int message=21, unsigned int wParam=0, long lParam=0, int bDeep=1, int bOnlyPerm=1)  Line 2534    C++
     mfc80d.dll!CWnd::SendMessageToDescendants(unsigned int message=21, unsigned int wParam=0, long lParam=0, int bDeep=1, int bOnlyPerm=1)  Line 170 + 0x20 bytes    C++
     mfc80d.dll!CWnd::OnSysColorChange()  Line 3084    C++
     mfc80d.dll!CWnd::OnWndMsg(unsigned int message=21, unsigned int wParam=0, long lParam=0, long * pResult=0x001217cc)  Line 2028    C++
     ToolkitProEval1020vc80D.dll!00a0c5f1()    
     mfc80d.dll!CWnd::WindowProc(unsigned int message=21, unsigned int wParam=0, long lParam=0)  Line 1741 + 0x20 bytes    C++
     mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x00368008, HWND__ * hWnd=0x00071348, unsigned int nMsg=21, unsigned int wParam=0, long lParam=0)  Line 240 + 0x1c bytes    C++
     mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00071348, unsigned int nMsg=21, unsigned int wParam=0, long lParam=0)  Line 389    C++
     mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x00071348, unsigned int nMsg=21, unsigned int wParam=0, long lParam=0)  Line 407 + 0x15 bytes    C++
     msvcr80d.dll!__crtMessageBoxA(const char * lpText=0x001227f8, const char * lpCaption=0x102d1174, unsigned int uType=73746)  Line 145    C
     msvcr80d.dll!__crtMessageWindowA(int nRptType=2, const char * szFile=0x010b1e04, const char * szLine=0x0012486c, const char * szModule=0x00000000, const char * szUserMessage=0x0012386c)  Line 420 + 0x16 bytes    C
     msvcr80d.dll!_VCrtDbgReportA(int nRptType=2, const char * szFile=0x010b1e04, int nLine=210, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x00128900)  Line 417 + 0x28 bytes    C
     msvcr80d.dll!_CrtDbgReportV(int nRptType=2, const char * szFile=0x010b1e04, int nLine=210, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x00128900)  Line 300 + 0x1d bytes    C
     msvcr80d.dll!_CrtDbgReport(int nRptType=2, const char * szFile=0x010b1e04, int nLine=210, const char * szModule=0x00000000, const char * szFormat=0x00000000, ...)  Line 317 + 0x1d bytes    C
     mfc80d.dll!AfxAssertFailedLine(const char * lpszFileName=0x010b1e04, int nLine=210)  Line 25 + 0x14 bytes    C++
     mfc80d.dll!CWnd::OnWndMsg(unsigned int message=865, unsigned int wParam=0, long lParam=1219348, long * pResult=0x0012946c)  Line 2004 + 0x11 bytes    C++
     mfc80d.dll!CWnd::WindowProc(unsigned int message=865, unsigned int wParam=0, long lParam=1219348)  Line 1741 + 0x20 bytes    C++
     mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x01d84b58, HWND__ * hWnd=0x0003144a, unsigned int nMsg=865, unsigned int wParam=0, long lParam=1219348)  Line 240 + 0x1c bytes    C++
     mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x0003144a, unsigned int nMsg=865, unsigned int wParam=0, long lParam=1219348)  Line 389    C++
     mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x0003144a, unsigned int nMsg=865, unsigned int wParam=0, long lParam=1219348)  Line 407 + 0x15 bytes    C++
     user32.dll!77d48734()    
     user32.dll!77d48816()    
     user32.dll!77d4c63f()    
     user32.dll!77d4e905()    
     mfc80d.dll!CWnd::RepositionBars(unsigned int nIDFirst=0, unsigned int nIDLast=65535, unsigned int nIDLeftOver=59648, unsigned int nFlags=2, tagRECT * lpRectParam=0x01d7fef0, const tagRECT * lpRectClient=0x00000000, int bStretch=1)  Line 2735    C++
     mfc80d.dll!CFrameWnd::RecalcLayout(int bNotify=1)  Line 2030    C++
     mfc80d.dll!CFrameWnd::OnSize(unsigned int nType=0, int cx=1181, int cy=533)  Line 2081    C++
     mfc80d.dll!CMDIChildWnd::OnSize(unsigned int nType=0, int cx=1181, int cy=533)  Line 632    C++
     mfc80d.dll!CWnd::OnWndMsg(unsigned int message=5, unsigned int wParam=0, long lParam=34931869, long * pResult=0x00129e24)  Line 2052    C++
     SkinMDISampleD.exe!CXTPCommandBarsSiteBase<CMDIChildWnd>::OnWndMsg(unsigned int message=5, unsigned int wParam=0, long lParam=34931869, long * pResult=0x00129e24)  Line 209    C++
     mfc80d.dll!CWnd::WindowProc(unsigned int message=5, unsigned int wParam=0, long lParam=34931869)  Line 1741 + 0x20 bytes    C++
     mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x01d7fe80, HWND__ * hWnd=0x00031440, unsigned int nMsg=5, unsigned int wParam=0, long lParam=34931869)  Line 240 + 0x1c bytes    C++
     mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00031440, unsigned int nMsg=5, unsigned int wParam=0, long lParam=34931869)  Line 389    C++
     mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x00031440, unsigned int nMsg=5, unsigned int wParam=0, long lParam=34931869)  Line 407 + 0x15 bytes    C++
     ToolkitProEval1020vc80D.dll!00e3d0bc()    
     ToolkitProEval1020vc80D.dll!00e54eb8()    
     mfc80d.dll!CWnd::Default()  Line 274    C++
     mfc80d.dll!CWnd::OnSize(unsigned int __formal=0, unsigned int __formal=0, unsigned int __formal=0)  Line 416 + 0xf bytes    C++
     ToolkitProEval1020vc80D.dll!00e60612()    
     mfc80d.dll!CWnd::OnWndMsg(unsigned int message=5, unsigned int wParam=0, long lParam=34931869, long * pResult=0x0012a79c)  Line 2052    C++
     ToolkitProEval1020vc80D.dll!00e55633()    
     ToolkitProEval1020vc80D.dll!00e5eda3()    
     ToolkitProEval1020vc80D.dll!00e56da4()    
     user32.dll!77d48734()    
     user32.dll!77d48816()    
     user32.dll!77d4c63f()    
     user32.dll!77d4e905()    
     ToolkitProEval1020vc80D.dll!00e54f34()    
     mfc80d.dll!CWnd::Default()  Line 274    C++
     mfc80d.dll!CWnd::OnSize(unsigned int __formal=0, unsigned int __formal=0, unsigned int __formal=0)  Line 416 + 0xf bytes    C++
     ToolkitProEval1020vc80D.dll!00e60612()    
     mfc80d.dll!CWnd::OnWndMsg(unsigned int message=5, unsigned int wParam=0, long lParam=34931869, long * pResult=0x0012b030)  Line 2052    C++
     mfc80d.dll!CMDIChildWnd::DefWindowProcA(unsigned int nMsg=71, unsigned int wParam=0, long lParam=1228340)  Line 430    C++
     mfc80d.dll!CWnd::WindowProc(unsigned int message=71, unsigned int wParam=0, long lParam=1228340)  Line 1742 + 0x1c bytes    C++
     mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x01d7fe80, HWND__ * hWnd=0x00031440, unsigned int nMsg=71, unsigned int wParam=0, long lParam=1228340)  Line 240 + 0x1c bytes    C++
     mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00031440, unsigned int nMsg=71, unsigned int wParam=0, long lParam=1228340)  Line 389    C++
     mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x00031440, unsigned int nMsg=71, unsigned int wParam=0, long lParam=1228340)  Line 407 + 0x15 bytes    C++
     mfc80d.dll!CWnd::SetWindowRgn(HRGN__ * hRgn=0x00000000, int bRedraw=1)  Line 114 + 0x3e bytes    C++
     mfc80d.dll!CWnd::OnWndMsg(unsigned int message=125, unsigned int wParam=4294967280, long lParam=1233160, long * pResult=0x0012c59c)  Line 2056    C++
     ToolkitProEval1020vc80D.dll!00e54f34()    
     mfc80d.dll!CWnd::Default()  Line 274    C++
     mfc80d.dll!CWnd::OnStyleChanged(int __formal=-16, int __formal=-16)  Line 555 + 0xf bytes    C++
     ToolkitProEval1020vc80D.dll!00e606e3()    
     mfc80d.dll!CWnd::OnWndMsg(unsigned int message=125, unsigned int wParam=4294967280, long lParam=1233160, long * pResult=0x0012ce4c)  Line 2056    C++
     mfc80d.dll!_AfxModifyStyle(HWND__ * hWnd=0x00031440, int nStyleOffset=-16, unsigned long dwRemove=12582912, unsigned long dwAdd=8388608, unsigned int nFlags=32)  Line 99    C++
     mfc80d.dll!CWnd::ModifyStyle(HWND__ * hWnd=0x00031440, unsigned long dwRemove=12582912, unsigned long dwAdd=8388608, unsigned int nFlags=32)  Line 111    C++
     mfc80d.dll!CWnd::ModifyStyle(unsigned long dwRemove=12582912, unsigned long dwAdd=8388608, unsigned int nFlags=32)  Line 228 + 0x18 bytes    C++
     ToolkitProEval1020vc80D.dll!00a2b612()    
     ToolkitProEval1020vc80D.dll!00e6f34c()    
     SkinMDISampleD.exe!CChildFrame::OnCreate(tagCREATESTRUCTA * lpCreateStruct=0x0012e314)  Line 102 + 0xb bytes    C++
     mfc80d.dll!CWnd::OnWndMsg(unsigned int message=1, unsigned int wParam=0, long lParam=1237780, long * pResult=0x0012d808)  Line 2000 + 0xd bytes    C++
     SkinMDISampleD.exe!CXTPCommandBarsSiteBase<CMDIChildWnd>::OnWndMsg(unsigned int message=1, unsigned int wParam=0, long lParam=1237780, long * pResult=0x0012d808)  Line 209    C++
     mfc80d.dll!CWnd::WindowProc(unsigned int message=1, unsigned int wParam=0, long lParam=1237780)  Line 1741 + 0x20 bytes    C++
     mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x01d7fe80, HWND__ * hWnd=0x00031440, unsigned int nMsg=1, unsigned int wParam=0, long lParam=1237780)  Line 240 + 0x1c bytes    C++
     mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00031440, unsigned int nMsg=1, unsigned int wParam=0, long lParam=1237780)  Line 389    C++
     mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x00031440, unsigned int nMsg=1, unsigned int wParam=0, long lParam=1237780)  Line 407 + 0x15 bytes    C++
     ToolkitProEval1020vc80D.dll!00e3d0bc()    
     ToolkitProEval1020vc80D.dll!00e54eb8()    
     mfc80d.dll!CWnd::Default()  Line 274    C++
     mfc80d.dll!CWnd::OnCreate(tagCREATESTRUCTA * __formal=0x0012e314)  Line 384 + 0xf bytes    C++
     ToolkitProEval1020vc80D.dll!00e5f6e9()    
     mfc80d.dll!CWnd::OnWndMsg(unsigned int message=1, unsigned int wParam=0, long lParam=1237780, long * pResult=0x0012e1b0)  Line 2000 + 0xd bytes    C++
     mfc80d.dll!CDC::~CDC()  Line 139 + 0xf bytes    C++
     mfc80d.dll!CWnd::DefWindowProcA(unsigned int nMsg=544, unsigned int wParam=0, long lParam=1243276)  Line 1029 + 0x20 bytes    C++
     mfc80d.dll!CWnd::Default()  Line 274    C++
     ToolkitProEval1020vc80D.dll!00a5efab()    
     mfc80d.dll!CWnd::OnWndMsg(unsigned int message=544, unsigned int wParam=0, long lParam=1243276, long * pResult=0x0012f664)  Line 2004 + 0x11 bytes    C++
     ToolkitProEval1020vc80D.dll!00a63449()    
     mfc80d.dll!CWnd::WindowProc(unsigned int message=544, unsigned int wParam=0, long lParam=1243276)  Line 1741 + 0x20 bytes    C++
     mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x003687e4, HWND__ * hWnd=0x000c12d2, unsigned int nMsg=544, unsigned int wParam=0, long lParam=1243276)  Line 240 + 0x1c bytes    C++
     mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x000c12d2, unsigned int nMsg=544, unsigned int wParam=0, long lParam=1243276)  Line 389    C++
     mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x000c12d2, unsigned int nMsg=544, unsigned int wParam=0, long lParam=1243276)  Line 407 + 0x15 bytes    C++
     mfc80d.dll!CMDIChildWnd::Create(const char * lpszClassName=0x00154120, const char * lpszWindowName=0x01d7ce00, unsigned long dwStyle=1087340544, const tagRECT & rect={...}, CMDIFrameWnd * pParentWnd=0x00368008, CCreateContext * pContext=0x0012fb1c)  Line 548 + 0x1b bytes    C++
     mfc80d.dll!CMDIChildWnd::LoadFrame(unsigned int nIDResource=129, unsigned long dwDefaultStyle=1087340544, CWnd * pParentWnd=0x00000000, CCreateContext * pContext=0x0012fb1c)  Line 618 + 0x3b bytes    C++
     SkinMDISampleD.exe!CXTPFrameWndBase<CMDIChildWnd>::LoadFrame(unsigned int nIDResource=129, unsigned long dwDefaultStyle=13598720, CWnd * pParentWnd=0x00000000, CCreateContext * pContext=0x0012fb1c)  Line 248 + 0x18 bytes    C++
     mfc80d.dll!CDocTemplate::CreateNewFrame(CDocument * pDoc=0x01d7dc58, CFrameWnd * pOther=0x00000000)  Line 277 + 0x22 bytes    C++
     mfc80d.dll!CMultiDocTemplate::OpenDocumentFile(const char * lpszPathName=0x00000000, int bMakeVisible=1)  Line 121 + 0x13 bytes    C++
     mfc80d.dll!CDocManager::OnFileNew()  Line 848    C++
     mfc80d.dll!CWinApp::OnFileNew()  Line 22    C++
     mfc80d.dll!_AfxDispatchCmdMsg(CCmdTarget * pTarget=0x00445d00, unsigned int nID=57600, int nCode=0, void (void)* pfn=0x004119b5, void * pExtra=0x00000000, unsigned int nSig=56, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Line 82    C++
     mfc80d.dll!CCmdTarget::OnCmdMsg(unsigned int nID=57600, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Line 381 + 0x27 bytes    C++
     mfc80d.dll!CWinApp::ProcessShellCommand(CCommandLineInfo & rCmdInfo={...})  Line 24 + 0x20 bytes    C++
     SkinMDISampleD.exe!CSkinMDISampleApp::InitInstance()  Line 105 + 0xc bytes    C++
     mfc80d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f25, int nCmdShow=1)  Line 37 + 0xd bytes    C++
     SkinMDISampleD.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f25, int nCmdShow=1)  Line 29    C++
     SkinMDISampleD.exe!__tmainCRTStartup()  Line 578 + 0x35 bytes    C
     SkinMDISampleD.exe!WinMainCRTStartup()  Line 403    C


Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 24 July 2006 at 12:49pm
Hi,
before you add ribbon call
pCommandBars->SetTheme(xtpThemeRibbon);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2006 at 1:08pm
Originally posted by oleg oleg wrote:

Hi,
before you add ribbon call
pCommandBars->SetTheme(xtpThemeRibbon);
 
And pCommandBars->SetPaintManager (new CXTPRibbonTheme ());
If that is missing it causes a crash.
 
Edit: Just stepped through the code, pCommandBars->SetTheme(xtpThemeRibbon); and pCommandBars->SetPaintManager (new CXTPRibbonTheme ()); does the same.
 
Should SetTheme or SetPaintManager be used? Maybe you need to update the Ribbon sample.
 
Codejock support
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 24 July 2006 at 1:55pm
Hi,
yes they are same - SetPaintManager just allow set custom paintmanager derived from one of standard classes. Guess will change it in sample.
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Tomas View Drop Down
Newbie
Newbie
Avatar

Joined: 21 July 2006
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tomas Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2006 at 3:16pm
Originally posted by oleg oleg wrote:

Hi,
before you add ribbon call
pCommandBars->SetTheme(xtpThemeRibbon);


yup that made it worked.


Almost perfect. The only catch is that the title bar of the child window is showing which makes the hold thing look very strange. It will be perfect if the ribbon could use the top most. Alternately I can could dock the shortcut thingy at the bottom but the title bar still visible. Argg so close!!!

This will be the ideal setup:




Thought I got a feeling that someone is going to say "added into the feature request".

Tomas
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2006 at 3:41pm
You shouldn't call EnableFrameTheme, and if that doesn't help try to remove the WS_CAPTION style if the child window is maximized.
Codejock support
Back to Top
Tomas View Drop Down
Newbie
Newbie
Avatar

Joined: 21 July 2006
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tomas Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2006 at 3:56pm
Originally posted by ABuenger ABuenger wrote:

You shouldn't call EnableFrameTheme, and if that doesn't help try to remove the WS_CAPTION style if the child window is maximized.


Sweet! You guys rock! I am going to buy this thing just because of you people.

I am impress with your guys support.
Clap Thanks a million. Clap

Tomas
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.047 seconds.