Is it possible to put ribbon bar on a dialog |
Post Reply |
Author | ||
vijaymahajan
Groupie Joined: 16 June 2008 Status: Offline Points: 92 |
Post Options
Thanks(0)
Posted: 16 June 2008 at 5:23am |
|
Hello, I want to put the ribbon bar on a dialog,as my application is dialog based.
Is it possible to implement ribbon bar on a dialog?
I have implemented the ribbon bar in a MDI application,now i also have to put the ribbon bar in a dialog based application.But there is no sample code available to refer.
Please help me if anyone have any idea about implementing a ribbon bar in a dialog based application.
Thanks And Regards,
Vijay Mahajan.
|
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hello,
Yes, its possible. See how DialogSample added Toolbars - use same way to add Ribbon.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Synapse
Groupie Joined: 28 June 2007 Status: Offline Points: 22 |
Post Options
Thanks(0)
|
|
Hi,
I'm trying to add a ribbon to a dialog. In the DialogSample project, in OnInitDialog(), I've added the following lines :
I have also commented the lines that were adding the menu and the toolbar. The code compiles and launches, but the ribbon doesn't display in the dialog. I thought that maybe it was because my ribbon was empty, so I've added an empty tab :
And now I have a crash on this line. Thank you |
||
Codejock Xtrem Skin Framework 2007 11.1.3
Windows XP SP2 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi, You also need add Ribbon bitmaps to resources:
#include "Styles\Office2007Blue\Office2007Blue.rc"
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Synapse
Groupie Joined: 28 June 2007 Status: Offline Points: 22 |
Post Options
Thanks(0)
|
|
I added this line to DialogSample.rc2 but it doesn't works. Do I need at list a tab in the ribbon to see something ?
|
||
Codejock Xtrem Skin Framework 2007 11.1.3
Windows XP SP2 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Try also add pRibbon->SetMinimumVisibleWidth(0);
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Synapse
Groupie Joined: 28 June 2007 Status: Offline Points: 22 |
Post Options
Thanks(0)
|
|
It still doesn't work. Here's my entire OnInitDialog() function
1) Why does the AddTab call crash ? 2) Do I need to add any ribbon operations outside of the OnInitDialog() function ? Thank you. |
||
Codejock Xtrem Skin Framework 2007 11.1.3
Windows XP SP2 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
Attach whole changed project. |
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Synapse
Groupie Joined: 28 June 2007 Status: Offline Points: 22 |
Post Options
Thanks(0)
|
|
Codejock Xtrem Skin Framework 2007 11.1.3
Windows XP SP2 |
||
lanlamer
Newbie Joined: 18 January 2008 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
|
Is the problem sovled or not? I also have the same problem.
|
||
lemongrass
Groupie Joined: 09 June 2006 Location: Austria Status: Offline Points: 28 |
Post Options
Thanks(0)
|
|
Hello,
I've the same issueand one more: If I create several tabs, than I can see only controls I added to the first tab, all the other tabs show nothing at all. If I change the order of the tabs, than always the first one shows controls, the others not. What can I do, I really need ribbons in dialog based application. Thanks a lot Mario |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
lemongrass
Groupie Joined: 09 June 2006 Location: Austria Status: Offline Points: 28 |
Post Options
Thanks(0)
|
|
Hi Oleg, thanks a LOT!
|
||
lemongrass
Groupie Joined: 09 June 2006 Location: Austria Status: Offline Points: 28 |
Post Options
Thanks(0)
|
|
Hello Oleg
I found an issue with listboxes used in your dialog sample: when I change back to MyTab, the Listbox remains CXTPRibbonTab* pTabHome = pRibbonBar->AddTab("MyTab"); pTabHome->AddGroup("Group"); CXTPRibbonTab* pTab2= pRibbonBar->AddTab("Tab2"); CXTPRibbonGroup* pGroup = pTab2->AddGroup("Group2"); CXTPControlListBox* pListMemory = new CXTPControlListBox(); pGroup->Add(pListMemory, IDC_LIST); CXTPControlComboBox* pComboMemory = new CXTPControlComboBox(); pGroup->Add(pComboMemory, IDC_COMBO); Thanks Mario |
||
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
|
Looks like the necessary WS_CLIPCHILDREN/WS_CLIPSIBLINGS-styles are missing. Correct? |
||
lemongrass
Groupie Joined: 09 June 2006 Location: Austria Status: Offline Points: 28 |
Post Options
Thanks(0)
|
|
thanks, but adding
CXTPControlListBox* pListMemory = new CXTPControlListBox(); CListBox* pListBox = pListMemory->GetListCtrl(); pListBox->ModifyStyle(0,WS_CLIPCHILDREN | WS_CLIPSIBLINGS); doesn't solve this issue. But maybe I am doing something wrong here as well. thanks a lot mario |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hello,
No, you are right :( CXTPControlListBox has problem in our code.
Please use Galleries instead. CXTPControlListBox was designed to be used for Popup menus only.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |