Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > General Discussion
  New Posts New Posts RSS Feed - CXTTabCtrl SetCurSel issues
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTTabCtrl SetCurSel issues

 Post Reply Post Reply
Author
Message
nktsrw View Drop Down
Newbie
Newbie


Joined: 13 March 2008
Location: Argentina
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote nktsrw Quote  Post ReplyReply Direct Link To This Post Topic: CXTTabCtrl SetCurSel issues
    Posted: 17 April 2008 at 10:51am
Hi,

I have a subclassed CXTTabCtrl, but adding three controls (dialogs) to the tab control and selecting the first one with SetCurSel(0) doesn't work correctly: it selects the first tab but the content is the last control added.
Instead using SetActiveView(0) it works fine.

Am I doing something wrong? this is a code snippet:

void MyTab::PreSubclassWindow()
{
     CXTTabCtrl::PreSubclassWindow();
     this->_Dialog1.Create(IDD_DIALOG1);
     this->_Dialog2.Create(IDD_DIALOG2);
     this->_Dialog3.Create(IDD_DIALOG3);

     this->AddControl(_T("Dialog1"), &(this->_Dialog1),0);
     this->AddControl(_T("Dialog2"), &(this->_Dialog2), 1);
     this->AddControl(_T("Dialog3"), &(this->_Dialog3), 2);

     //this->SetCurSel(0);
     this->SetActiveView(0);
}



Thanks,
Seb
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.172 seconds.