Print Page | Close Window

Possible bug in CXTPTabClientWnd

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=6027
Printed Date: 18 July 2025 at 9:57pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Possible bug in CXTPTabClientWnd
Posted By: danpetitt
Subject: Possible bug in CXTPTabClientWnd
Date Posted: 07 January 2007 at 5:08pm
I have little icons in my tabs, when i need to change them I call the .UpdateContents() method, but this only changes the text and not the icon.
 
If I click the tab then the tab is refreshed, but otherwise it isnt.
 
I added the following line (in bold) and it now works:

void CXTPTabClientWnd::UpdateContents()
...
    // update text if necessary
    pFoundItem->SetCaption(GetItemText(pChildWnd));
    pFoundItem->SetImageIndex( pFoundItem->GetImageIndex() );
 
Is this a bug, or is there something else I should do.



Replies:
Posted By: Oleg
Date Posted: 08 January 2007 at 3:02am
Hello,
 
How you set icon?


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


Posted By: danpetitt
Date Posted: 08 January 2007 at 7:03am

By overriding GetItemIcon in my derived TabClientWnd .. basically to put in a ReadOnly icon into the tab instead of the file icon.



Posted By: Oleg
Date Posted: 08 January 2007 at 7:44am
Hi, Remove this change and just call Invalidate (or RecalcLayout)
 
from StyleView sample:
 
void CStylerView::SetLoading(BOOL bLoading)
{
 int nState = bLoading ? -1 : 3;
 if (m_nLoadingState != nState)
 {
  m_nLoadingState = nState;
  GetMainFrame()->m_MTIClientWnd.Invalidate(FALSE);
 }
}


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


Posted By: danpetitt
Date Posted: 08 January 2007 at 7:46am
But wont that cause all the tabs to flicker and redraw unnecessarily?



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