Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - New version problems
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

New version problems

 Post Reply Post Reply
Author
Message
BastianPL View Drop Down
Groupie
Groupie
Avatar

Joined: 15 April 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote BastianPL Quote  Post ReplyReply Direct Link To This Post Topic: New version problems
    Posted: 25 February 2011 at 3:16pm
Hi, I have 2 problems using new version 15.0.1
For some reason subitems of systemmenu are not show as in previous version.

The code used to create this control is as usual in OnCreateControl...

if ( lpCreateControl->nID == ID_SETTINGS && lpCreateControl->nIndex == 5 )
{
CXTPControlPopup* pControl = CXTPControlPopup::CreateControlPopup( xtpControlButtonPopup );

CMenu menu;
menu.LoadMenu( IDR_SETTINGS );

CXTPRibbonSystemPopupBarPage* pPopupBar = new CXTPRibbonSystemPopupBarPage();
pPopupBar->SetCommandBars( GetCommandBars() );

pPopupBar->LoadMenu(menu.GetSubMenu(0));

CXTPControl* pControlLabel = pPopupBar->GetControls()->Add( xtpControlLabel, ID_FILE_SETTINGS_LABEL, NULL, 0 );
pControlLabel->SetWidth( 320 );
pControlLabel->SetItemDefault( TRUE );
pControlLabel->SetStyle( xtpButtonCaption );

pPopupBar->SetShowGripper( FALSE );
pPopupBar->SetDefaultButtonStyle( xtpButtonCaptionAndDescription );
pPopupBar->SetIconSize( CSize(32, 32) );

pControl->SetCommandBar( pPopupBar );
pPopupBar->InternalRelease();
lpCreateControl->pControl = pControl;
return TRUE;
}

Hoever it looks a bit doggy.. Same code was working fine in previous version.


Bastian
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: 25 February 2011 at 3:57pm
you don't need create CXTPRibbonSystemPopupBarPage if you don't use it as PopupBarPage.
just create as CXTPPopupBar:
CXTPPopupBar* pPopupBar = new CXTPPopupBar();

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
BastianPL View Drop Down
Groupie
Groupie
Avatar

Joined: 15 April 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote BastianPL Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2011 at 4:20pm
Oleg thanks for a quick response

Yes, that sorts out problems with scrolling. But in fact it loosk better as popupbarpage (like in Ribbon example where print functions are displayed in one Page).

Any other suggestions?
Bastian
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: 27 February 2011 at 1:51pm
Hi,

You can add more buttons to main Popup to increase its height. Now CXTPRibbonSystemPopupBarPage aligned to its height. You can copy source code of CXTPRibbonSystemPopupBarPage to your local CMyRibbonSystemPopupBarPage and not include "if (nHeight > sz.cy) sz.cy = nHeight;" line.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
BastianPL View Drop Down
Groupie
Groupie
Avatar

Joined: 15 April 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote BastianPL Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2011 at 2:42pm
Ok That will do for now. However maybe it will be possible to add this as a feature to next version.

Last thing will be missing frame around CXTPRibbonSystemPopupBarPage as as in your example.
Bastian
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.172 seconds.