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

CXTPToolBar in Dialog Box

 Post Reply Post Reply
Author
Message
gautambjain View Drop Down
Newbie
Newbie


Joined: 03 July 2008
Location: India
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote gautambjain Quote  Post ReplyReply Direct Link To This Post Topic: CXTPToolBar in Dialog Box
    Posted: 10 July 2008 at 2:19am

Using 12.0.1

I created a MFC project derived from CDialog (not SDI or MDI)

Based on DialogSample, I changed CDialog to CXTPDialogBase<CXTResizeDialog> everywhere.

After which I added the following code. But the toolbar is not showing up. Please help.

This code is copied and pasted from CDialogSample except for some menu names and toolbar names.



    VERIFY(InitCommandBars());
    CXTPCommandBars* pCommandBars = GetCommandBars();

    pCommandBars->SetMenu(_T("Menu Bar"), IDR_MENU_TOOLS);

    CXTPToolBar *pToolBar = pCommandBars->Add(_T("Standard"), xtpBarTop, RUNTIME_CLASS(CXTPToolBar));
    pToolBar->LoadToolBar(IDR_TOOLBAR_STANDARD);
   
    ((CXTPControlButton*)pToolBar->GetControls()->FindControl(xtpControlButton, ID_BUTTON_STAYONTOP, TRUE, FALSE))->SetStyle(xtpButtonIconAndCaption);

    pToolBar->GetControls()->CreateOriginalControls();
    pCommandBars->GetCommandBarsOptions()->ShowKeyboardCues(xtpKeyboardCuesShowWindowsDefault);
    pCommandBars->GetToolTipContext()->SetStyle(xtpToolTipOffice);




The problem is that the toolbar is not showing up. It is invisible.

Please help.
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 July 2008 at 5:32am
Hi,
Did you copy code from OnSize ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
gautambjain View Drop Down
Newbie
Newbie


Joined: 03 July 2008
Location: India
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote gautambjain Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2008 at 6:54am

Thanks, that worked.

I added OnSize and RepositionControls and it worked.

You sample projects are nice, but seriously, I think that you must add comments to your sample projects.

Improving your help docs and sample projects will reduce support cost.
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.045 seconds.