Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3302512
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:51:35+00:00 2026-05-17T20:51:35+00:00

Following the tutorial at http://www.codersource.net/mfc/mfc-tutorials/ctabctrl.aspx , I have declared the function ActivateTabDialogs() in my

  • 0

Following the tutorial at http://www.codersource.net/mfc/mfc-tutorials/ctabctrl.aspx , I have declared the function ActivateTabDialogs() in my header file and called it inside another function in my class. The compiler gives error C2065: 'ActivateTabDialogs' : undeclared identifier, at the line ActivateTabDialogs(); inside the definition of the function OnSelChange(). What am I violating here?

Here’s my declaration part in the header file TCGeriArama_TabCtrl.h

class CTCGeriArama_TabCtrl : public CTabCtrl
{
// Construction
public:
    CTCGeriArama_TabCtrl();

// Attributes

    //Array to hold the list of dialog boxes/tab pages for CTabCtrl
    int m_DialogID[2];

    int m_nPageCount;

    //CDialog Array Variable to hold the dialogs 
    CDialog *m_Dialog[2];

public:
// Operations
    //Function to Create the dialog boxes during startup
    void InitDialogs();

    //Function to activate the tab dialog boxes
    void ActivateTabDialogs();

Here’s the definition of ActivateTabDialogs() and the part I’m calling it inside TCGeriArama_TabCtrl.cpp

void CTCGeriArama_TabCtrl::ActivateTabDialogs()
{
    int nSel = GetCurSel();
    if(m_Dialog[nSel]->m_hWnd)
        m_Dialog[nSel]->ShowWindow(SW_HIDE);

    CRect l_rectClient;
    CRect l_rectWnd;

    GetClientRect(l_rectClient);
    AdjustRect(FALSE,l_rectClient);
    GetWindowRect(l_rectWnd);
    GetParent()->ScreenToClient(l_rectWnd);
    l_rectClient.OffsetRect(l_rectWnd.left,l_rectWnd.top);
    for(int nCount=0; nCount < m_nPageCount; nCount++){
        m_Dialog[nCount]->SetWindowPos(&wndTop, l_rectClient.left, l_rectClient.top, l_rectClient.Width(), l_rectClient.Height(), SWP_HIDEWINDOW);
    }
    m_Dialog[nSel]->SetWindowPos(&wndTop, l_rectClient.left, l_rectClient.top, l_rectClient.Width(), l_rectClient.Height(), SWP_SHOWWINDOW);

    m_Dialog[nSel]->ShowWindow(SW_SHOW);

}

//Selection change event for the class derived from CTabCtrl
void OnSelchange(NMHDR* pNMHDR, LRESULT* pResult)
{
    // TODO: Add your control notification handler code here
    ActivateTabDialogs(); // HERE'S WHERE THE COMPILER GIVES THE ERROR
    *pResult = 0;
}

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T20:51:35+00:00Added an answer on May 17, 2026 at 8:51 pm

    Turns out that I didn’t add the handler using the class wizard, and put the function OnSelChange() manually, and that was causing the problem. Thanks a lot for your attention

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am following this tutorial http://www.codeproject.com/KB/cpp/authforwebservices.aspx They have this in the tutorial [SoapHeader(Authentication, Required
I am following the following tutorial ( http://www.highoncoding.com/Articles/642_Creating_a_Stock_Widget_in_ASP_NET_MVC_Application.aspx ) on using ajax to render
I have gone through the following tutorial : http://www.javaworld.com/community/node/2915 And after reading the above
I was following this tutorial: http://www.marcofolio.net/webdesign/a_fancy_apple.com-style_search_suggestion.html And checking out the demo here: http://qpoit.com/marcofolio_demo/apple_search/ I
I'm following this tutorial on Flash Pro CS4: http://www.baycongroup.com/flashCS4/09_flashCS4.html I have a button. I
Trying the following tutorial http://www.androidsdkforum.com/android-sdk-development/3-oauth-twitter.html i am having trouble understanding callback URL my twitter
I am following this tutorial: http://www.generation5.org/content/2001/sr00.asp?Print=1 Right off the bat it asks me to
I am following the tutorial http://www.bit-101.com/blog/?p=2115 . In this tutorial I found a project
I'm following this tutorial: http://www.javascripttoolbox.com/jquery/ And I'm trying to get table rows that are
I'm using Ubuntu 10, python 2.6.5 I'm following this tutorial: http://www.djangobook.com/en/2.0/chapter02 I followed all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.