troubleshooting Question

Tab Control Simple question

Avatar of BerMuDa
BerMuDa asked on
System Programming
3 Comments1 Solution291 ViewsLast Modified:
I found the following code to create a tab control and attach items to it.
My question is where did m_One,m_two,m_three came from, whenever I compile the program i get the following errors for all of one two and three.
what are those m_one,m_two,m_three ?
Are these the dialog and text boxes I already assigned a value for?

error C2065: 'm_OnePage' : undeclared identifier
error C2228: left of '.Create' must have class/struct/union type
error C2065: 'IDD_ONE_DLG' : undeclared identifier

///////////////////////
// on the MyView.h file
CTabCtrl m_TabControl

///////////////////////
// on the MyView.cpp file
CMyView::OnInitialUpdate
{ . . .
 /////////////////////////////////////////////////
 // Define The Size Of The Main Tab
    m_TabControl.SetMinTabWidth(130);

    m_TabControl.InsertItem(0  , "Zero");
    m_TabControl.InsertItem(1 , "One");
    m_TabControl.InsertItem(2 , "Two");

    m_OnePage.Create(IDD_ONE_DLG , &m_TabControl);
    m_TwoPage.Create(IDD_TWO_DLG , &m_TabControl);    
    m_ThreePage.Create(IDD_THREE_DLG , &m_TabControl);

    m_TabControl.SetCurSel(0);

...
}

void CMyView::OnSelchangeTab(NMHDR* pNMHDR, LRESULT* pResult)
{
  RS16 nChoice = m_TabControl.GetCurSel();
  switch(nChoice)
  {
  case 0:
    m_OnePage.ShowWindow(SW_SHOW);
    m_TwoPage.ShowWindow(SW_HIDE);
    m_ThreePage.ShowWindow(SW_HIDE);
  case 1:
    m_OnePage.ShowWindow(SW_HIDE);
    m_TwoPage.ShowWindow(SW_SHOW);
    m_ThreePage.ShowWindow(SW_HIDE);
  case 2:
    m_OnePage.ShowWindow(SW_HIDE);
    m_TwoPage.ShowWindow(SW_HIDE);
    m_ThreePage.ShowWindow(SW_SHOW);
  }

 *pResult = 0;




ty
ASKER CERTIFIED SOLUTION
christophm

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros