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 8515991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:17:49+00:00 2026-06-11T05:17:49+00:00

I want to build a MFC dialog in which I add a simple TabControl

  • 0

I want to build a MFC dialog in which I add a simple TabControl. I want my tab pages to be instances of the same CDialog, but with some different parameters (such as which buttons are shown, for example).

I am using Visual Studio 2008.

I am relatively new to C++, but I’ve seen that each component (CButton, CDialog) has its own ID (which is static, so I theoretically I can’t instance the same component twice).

I would like to know how to do something like this:

for (index = 0 to tabNumber) {
  name = "TAB"+index;
  tabCtrl.add(new CustomDialog(name, i));
}
  • 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-06-11T05:17:51+00:00Added an answer on June 11, 2026 at 5:17 am

    You have to give different TabID while creating item.

    OnInitDialog()
    

    {
    m_cTab.Init();

    m_cTab.InsertItem(0,"Register new user");//tabID=0
    m_cTab.InsertItem(1,"Identify");// TabID=1
    

    //Register new user
    m_cTab.CreateButton(“Load Image”,23,TabID=0, 0, m_cTab.RightOf(22)+15, m_cTab.TopOf(19),60);
    //Identify
    m_cTab.CreateButton(“Register User”,24,TabID=1,P_LEFT,0, m_cTab.TopOf(20) ,60);

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

Sidebar

Related Questions

I have a couple of MFC applications. I don't want to unit-test UI but
i want build a blog using jekyll and octopress. but an error happened when
I have a simple mfc project built on a CDialog. I also have a
I want to build a WCF Server with MySQL Database which can communicate with
I want to build an app that uses core data, but all the tutorials
I want to build a bot that asks someone a few simple questions and
I want build a lightweight cached system (few server-resources) for easy serve pages (without
I want to build some kind of audio processing unit. I would connect some
I want to build a function which takes the sum of all rows in
i want build a photography app with effects . e.g. old images with brown

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.