Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Ribbon in Dialog app
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon in Dialog app

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

Joined: 13 April 2007
Location: Bulgaria
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote ivox3m Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon in Dialog app
    Posted: 13 April 2007 at 8:10am
Hi,
 
I'm sorry that this topic has already been discussed, but I'm having a problem when trying to add a ribbon in DialogSample. I've downloaded the eval version 10.4.2 and copied the ribbon adding code from the Ribbon SDI sample to the DialogSample. Everytime I start the sample it crashes in xtpribbonbar.cpp line 375. If I comment out the RepositionControls function calls in OnSize it doesn't crash, but doesn't show the toolbars.
Please help!
Best Regards
Ivo
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: 13 April 2007 at 9:37am
Hi,
 
Attach here project to check what you done.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ivox3m View Drop Down
Newbie
Newbie
Avatar

Joined: 13 April 2007
Location: Bulgaria
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote ivox3m Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2007 at 2:51pm
Hi,
 
Thank you!
I'll attach the project after weekend maybe. If I can I'll attach it sooner
Best Regards
Ivo
Back to Top
ivox3m View Drop Down
Newbie
Newbie
Avatar

Joined: 13 April 2007
Location: Bulgaria
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote ivox3m Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2007 at 8:33pm
I don't have the project with me now, but I can explain simply what I've done. In the DialogSample I simply added the following two lines in OnInitDialog at the end:
CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)pCommandBars->Add("The Ribbon", RUNTIME_CLASS(CXTPRibbonBar));
pRibbonBar->EnableDocking(0);
 
After that the sample started crashing everytime as I explained it above. Please check it. I use the eval 10.4.2 version.
 
Best Regards
Ivo
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: 14 April 2007 at 1:27am
Hi,
 
You also need 2 things:
1.  in res\DialogSample.rc2 add
 
#include "Ribbon\Styles\Office2007Blue\Office2007Blue.rc"
2. before create ribbon set ribbon theme:
pCommandBars->SetTheme(xtpThemeRibbon);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ivox3m View Drop Down
Newbie
Newbie
Avatar

Joined: 13 April 2007
Location: Bulgaria
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote ivox3m Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2007 at 5:24am
Thank you!
It works great now.
Best Regards
Ivo
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.