![]() |
CXTPCommandBar in CDialog derived class |
Post Reply ![]() |
Author | |
Martin ![]() Newbie ![]() ![]() Joined: 26 April 2005 Location: Netherlands Status: Offline Points: 30 |
![]() ![]() ![]() ![]() ![]() Posted: 25 October 2005 at 3:44am |
Hi all, I don't know if this topic has been discussed before but here goes: Is it possible to use the commandbars in a CDialog derived class which I cannot derive from CXTResizeDialog (because I am already deriving from another CDialog based class which I just can't replace)? How do I get a pointer to the GetCommandBars() member function in my scenario (if possible)? TIA, Martin |
|
![]() |
|
Martin ![]() Newbie ![]() ![]() Joined: 26 April 2005 Location: Netherlands Status: Offline Points: 30 |
![]() ![]() ![]() ![]() ![]() |
Another one: I have defined a dialog based class as follows: #define CDlgBase CXTPDialogBase<CXTResizeDialog> class CMyDlg: public CDlgBase I now try to create a toolbar in the OnInitDialog function as follows: VERIFY(InitCommandBars()); CXTPCommandBars* pCommandBars = GetCommandBars(); CXTPToolBar* pToolBar = pCommandBars->Add(_T("Standard"), xtpBarTop); Only the commandbar doesn't show. Any ideas why not? I looked at the example "DialogSample" but I just can't figure it out. Additional info: it's created as a child window of a tabcontrol, with no borders. But I also tried the code on a "normal" popup dialog with the same result. Any help is greatly appreciated! TIA, Martin
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Add RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0); to OnSize handler. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Martin ![]() Newbie ![]() ![]() Joined: 26 April 2005 Location: Netherlands Status: Offline Points: 30 |
![]() ![]() ![]() ![]() ![]() |
Thanks a lot Oleg! That works! Do you also know the answer to my first question (see above)? Thanks! |
|
![]() |
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 |