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

CXTPTabControl

 Post Reply Post Reply
Author
Message
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTabControl
    Posted: 12 September 2005 at 3:35pm

The OnNotify callback for CXTPTabControl appears to have a major problem, or at least it is working completely different then the OnNotify callback for the CXTFlatTabCtrl and CXTTabCtrl.

When processing the TCN_SELCHANGE notification, if you issue a SetCurSel(value), where value is not the same as the CurSel value received in the OnNotify, you receive another immediate OnNotify notification.   This goes into a infinite loop!  This does not happen in the CXTTabCtrl and CXTFlatTabCtrl.

If I select the following for the color scheme, the luna color for blue is correct, but not for olive and silver.

m_TabCtrl.GetPaintManager()->SetAppearance(xtpTabAppearan ceVisualStudio2005);
 m_TabCtrl.GetPaintManager()->DisableLunaColors(FALS E);
 m_TabCtrl.GetPaintManager()->SetOneNoteColors(TRUE) ;
 

I set the color via the following call:

void CTabSwitch::SetTheme(int theme,int scheme)
 {
 if(scheme >= 10 && scheme <= 12)
      {
      if(theme == 10)
           XTPColorManager()->SetLunaTheme(xtpSystemThemeBlue);
      if(theme == 11)
           XTPColorManager()->SetLunaTheme(xtpSystemThemeOlive);
      if(theme == 12)
           XTPColorManager()->SetLunaTheme(xtpSystemThemeSilver);
      m_flatTabCtrl.GetPaintManager()->SetColor(xtpTabColorVisu alStudio);
      }
 else if(scheme == 3)
      m_TabCtrl.GetPaintManager()->SetColor(xtpTabColorOffice20 03);
      else
      m_TabCtrl.GetPaintManager()->SetColor(xtpTabColorWinXP);
 }



Edited by Kenneth
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2005 at 12:58pm
The behavior of the CXTPTabControl OnNotify callback is really bizarre.  The developer really needs to implement a OnNotify callback and monitor when the TCN_SELCHANGE is being sent.  It defies any logic I have seen, including sending TCN_SELCHANGE notifications when tabs are being inserted and when a SetCurSel is issued.
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.063 seconds.