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

Dialogs

 Post Reply Post Reply
Author
Message
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Topic: Dialogs
    Posted: 09 June 2007 at 4:26am
Hi
 
Does anybody know how to get a dialog (without frames) to appear below popup buttons, eg. on ribbon bars
 
Thanks any help appreciated
Terry
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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: 10 June 2007 at 1:41am
Hello,
Use CXTPControlCustom to attach dialog.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2007 at 4:41am
Excellent, are there any examples showing this working please ?
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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: 11 June 2007 at 2:18am
Hi,
 
See for example Samples\CommandBars\CommonControls sample it show how to add standard combo boxes to Toolbar - use same way for ribbon and dialogs.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2007 at 6:18am
still none the wiser, anychance of an example here, eg. I have a dialog in my resource ID_MY_DIALOG, how would I make this appear on a ribbon when I click a button popup
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2007 at 9:46am

Ok I have the following code:
 
CXTPControlPopup *pControlPopup = (CXTPControlPopup *)pRibbonGroup->Add( xtpControlPopup, ID_FORMAT_ADDCUSTOM );
pControlPopup->SetBeginGroup( TRUE );

m_AddCustomDlg.Create( MAKEINTRESOURCE( CAddCustomDlg::IDD ), this );

CXTPControlCustom *pControlCustom = CXTPControlCustom::CreateControlCustom( &m_AddCustomDlg );



however how do I then attach this custom control to the xtpControlPopup so that when I click thispopup button it shows my dialog ??
 
Thanks, any help appreciated
Terry
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2007 at 3:46am
I would also be very interested in a working example so that pressing a toolbar button brings up my own dialog just below the button I pressed.
Simon HB9DRV
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2007 at 3:50am
The following code adds a dialog to a popup button:

CXTPControlPopup *pControlPopup = (CXTPControlPopup *)pRibbonGroup->Add( xtpControlPopup, ID_BUTTON );

m_CustomDlg.Create( MAKEINTRESOURCE( CCustomDlg::IDD ), this );

CXTPControlCustom *pControlCustom = CXTPControlCustom::CreateControlCustom( &m_CustomDlg );

(CXTPControlCustom *)pControlPopup->GetCommandBar()->GetControls()->Add( pControlCustom );

Any further questions please let me know
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2007 at 4:00am
Originally posted by terrym terrym wrote:

The following code adds a dialog to a popup button:

CXTPControlPopup *pControlPopup = (CXTPControlPopup *)pRibbonGroup->Add( xtpControlPopup, ID_BUTTON );

m_CustomDlg.Create( MAKEINTRESOURCE( CCustomDlg::IDD ), this );

CXTPControlCustom *pControlCustom = CXTPControlCustom::CreateControlCustom( &m_CustomDlg );

(CXTPControlCustom *)pControlPopup->GetCommandBar()->GetControls()->Add( pControlCustom );

Any further questions please let me know
 
Thanks - I'll give it a go this evening...
Simon HB9DRV
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2007 at 4:04am
only problem I am experiencing is that when I click a button, eg. CANCEL and then close the dialog, it does not close ?
 
i can close it by clicking outside the area, if you find solutioin please let me know.
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2007 at 4:27am
Originally posted by terrym terrym wrote:

only problem I am experiencing is that when I click a button, eg. CANCEL and then close the dialog, it does not close ?
 
i can close it by clicking outside the area, if you find solutioin please let me know.
Please cut and paste your dialog resource from the .rc file - will be interesting....
Simon HB9DRV
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2007 at 4:30am
Its just a standard dialog with an IDOK and IDCANCEL button, I then override OnCancel and OnOk
 
Normally these would then close the dialog, however for some reason the dialog closes but leaves a blank dialog lol :(
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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: 15 June 2007 at 4:50am
Yes, you have manually close popup (why it have close automatically?)
override OnOK and OnCancel and  call
XTPMouseManager()->SendTrackLost();
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2007 at 5:49am
Excellent, worked perfect :)
 
Thanks for continued great support.
 
Also off subject of this topic but is there a way of detecting if a ribbon was minimized/restored as we need to detect this to rebuild our workspace
 
Again, thanks for all the great support
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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: 15 June 2007 at 3:24pm
Hi
 
call pRibbonBar->IsRibbonMinimized (or IsMinimized)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 17 June 2007 at 4:41am
rather than poll pRibbonBar->IsRibbonMinimized every x frames, is there not a windows message I can use instead to say the ribbons changed state
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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: 18 June 2007 at 1:31am
Hello,
 
No, sorry, there is no message. You can change source code, make SetRibbonMinimized method virtual and override it in your custom Ribbon class. We will make it virtual too for next releases.
 
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2007 at 7:41am

Excellent as I am sure many other users would find SetRibbonMinimized() as a virtual function much better.

I have made the changes here and look forward to changes in next version.

Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2007 at 8:52am
I have tried this and made the function virtual, but it is not working ???
 
I have attached my CMyXTPRibbonBar class if anybody has any ideas :(
 
Thanks for any help, much appreciated

uploads/20070618_085216_CMyXTPRibbonBar.zip
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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: 19 June 2007 at 1:21am
Hi,
 
How do you create CMyXTPRibbonBar  instead CXTPRibbonBar ? Did you rebuild toolkit?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2007 at 5:47am
I create it using
 
CMyXTPRibbonBar *m_pRibbonBar;
and then use this for all calling
 
Cheers
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2007 at 5:48am
and yes I did rebuild all tookit with the new virtual
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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: 19 June 2007 at 3:00pm
Hi,
 
you also need
 
1. To add
DECLARE_XTP_COMMANDBAR(CMyXTPRibbonBar )
IMPLEMENT_XTP_COMMANDBAR(CMyXTPRibbonBar, CXTPRibbonBar) macros
 
 
2.
CMyXTPRibbonBar * pRibbonBar = (CXTPRibbonBar*)pCommandBars->Add(_T("The Ribbon"), xtpBarTop, RUNTIME_CLASS(CMyXTPRibbonBar ));
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2007 at 8:30pm
We already do #2, however #1 where do we put this as we get compile errors when we try.
 
Cheers
Terry
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2007 at 8:35pm
Ah sorted cheers, it was a ; in wrong place lol
 
Thanks for help, as works great now
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 20 June 2007 at 5:30am
Also we have noticed that:
 
ShowQuickAccess( BOOL bShow )
 
and
 
ShowQuickAccessBelowRibbon( BOOL bBelow )
 
should both really also be virtual as this allows to detect other situations that can change the size of the workspace view area etc.
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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.188 seconds.