Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Toolbar on View Draw trouble
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Toolbar on View Draw trouble

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


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Topic: Toolbar on View Draw trouble
    Posted: 20 January 2009 at 4:38am
Hello,

We have a simple Tool on top of a view.
VERIFY(InitCommandBars());
CXTPCommandBars* pCommandBars = GetCommandBars();

pCommandBars->SetPaintManager(new CXTPOffice2003Theme());

CXTPToolBar* pToolBar = pCommandBars->Add(_T("Global Online State Commands"), xtpBarTop);
pToolBar->SetDefaultButtonStyle( xtpButtonCaption );
VERIFY(pToolBar->LoadToolBar(IDR_TOOLBAR_ONLINESTATE_GLOBAL));
pToolBar->EnableDocking(xtpFlagAlignTop);

pCommandBars->GetCommandBarsOptions()->ShowKeyboardCues(xtpKeyboardCuesShowWindowsDefault);
pCommandBars->GetCommandBarsOptions()->bShowExpandButtonAlways = FALSE;

CXTPControls *pControls = pToolBar->GetControls();
CXTPControl *pControl = pControls->Add(xtpControlLabel, ID_ONLINESTATE_LABEL, 0, 0 );
if (pControl)
    pControl->SetCaption("All Safe-CPU(s)");

// pToolBar->OnRecalcLayout();

The toolbar has no Icons, only Caption.
The caption strings are in the string resource table.

On some computer (not all), some toolbar button does not show the text.
there are empty buttons on the toolbar.
The click on the empty button work correct.
Any idea ?

  Jimmy

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: 20 January 2009 at 8:09am

Maybe you added pToolBar->SetDefaultButtonStyle( xtpButtonCaption );
in some current release but in these "some computers" state is loaded from registry and override this setting.

Try call pToolBar->SetDefaultButtonStyle after LoadCommandBars.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2009 at 8:35am
Hi Oleg,

In this function we don't have a LoadCommandBars call.

  Jimmy

Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2009 at 9:04am
Found the bug.
Some trouble with different resource language.

  Jimmy

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.328 seconds.