Print Page | Close Window

Toolbar on View Draw trouble

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=13212
Printed Date: 23 June 2025 at 6:29am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Toolbar on View Draw trouble
Posted By: jimmy
Subject: Toolbar on View Draw trouble
Date 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




Replies:
Posted By: Oleg
Date 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


Posted By: jimmy
Date Posted: 20 January 2009 at 8:35am
Hi Oleg,

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

  Jimmy



Posted By: jimmy
Date Posted: 20 January 2009 at 9:04am
Found the bug.
Some trouble with different resource language.

  Jimmy




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net