Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CXTPTabControl::Reposition slows down insertions!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTabControl::Reposition slows down insertions!

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

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTabControl::Reposition slows down insertions!
    Posted: 13 June 2010 at 3:22pm
XTP 13.4.
 
Calling CXTPTabControl::AddItem multiple times slows down insertions a LOT!
 
It should be possible to add items without calling Reposition:
 
for (...)
   tab.AddItem(..., FALSE);
 
 
tab.Reposition();
PokerMemento - http://www.pokermemento.com/
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: 14 June 2010 at 4:50am
Thanks, added SetLockRedraw for future:

void CXTPTabControl::SetLockRedraw(BOOL bLockRedraw)
{
     m_nLockRedraw += bLockRedraw ? +1 : -1;
     ASSERT(m_nLockRedraw >= 0);
     
     if (m_nLockRedraw == 0)
          Reposition();
}

void CXTPTabControl::Reposition()
{
     if (!GetSafeHwnd())
          return;
     
     if (m_nLockRedraw > 0)
          return;
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.156 seconds.