Print Page | Close Window

[BUG?] XTPControlGallery.cpp(362)

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=18834
Printed Date: 16 November 2024 at 1:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [BUG?] XTPControlGallery.cpp(362)
Posted By: znakeeye
Subject: [BUG?] XTPControlGallery.cpp(362)
Date Posted: 17 August 2011 at 4:48am
XTP 15.1.2
CString strCaption;
if (nId > 0 && strCaption.LoadString(nId))
{
    pItem->SetCaption(strCaption);
 
 
What if pItem already has a caption? Is the above really correct? (Not to mention that you should always use your own XTPResourceManager()->LoadString().)
 
I would suggest something like this:
 
CString strCaption;
if (nId > 0 && pItem->GetCaption().GetLength() == 0 && strCaption.LoadString(nId))
{
     pItem->SetCaption(strCaption);


-------------
PokerMemento - http://www.pokermemento.com/



Replies:
Posted By: Oleg
Date Posted: 24 August 2011 at 8:26am
Hi,

Thanks, good suggestion.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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