[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2287
  • Last Modified:

Win32 Tab Control Usage

I am able to create a tab control in Visual C++ 6.0 on my Win32 Application, but how do i get it to display a different group of controls for each tab?  Right now i can only get it to click across tabs, how do i get it to show different controls after clicking a different tab?  I've heard you have to use a different dialog for each tab???  A link or working sample code would help in explaining how to do this to me.  I have searched the web and could only find MFC based examples.  A quick response would be great because it will be about two weeks before i am able to do a response.  I am increasing the points.  Thanks in advance!
0
MatrixFreak
Asked:
MatrixFreak
  • 2
1 Solution
 
hsdhinaCommented:
Hi,
  Following is the sample code for using Tab Dialog using WIN32 application.

Thanks
hsdhina

        PROPSHEETPAGE   gPSP[2];
        PROPSHEETHEADER gPSH;
        int idx = 0;

        gPSP[idx].dwSize                      = sizeof(PROPSHEETPAGE);
        gPSP[idx].dwFlags                     = 0;
        gPSP[idx].hInstance                   = ghInstance;
        gPSP[idx].DUMMYUNIONNAME.pszTemplate  = MAKEINTRESOURCE(IDD_SPLASH);
        gPSP[idx].DUMMYUNIONNAME2.pszIcon     = NULL;
        gPSP[idx].pfnDlgProc                  = (DLGPROC)SplashDialogProc;
        gPSP[idx].pszTitle                    = NULL;
        gPSP[idx].lParam                      = 0;
        gPSP[idx].pfnCallback                 = NULL;
        idx++;

        gPSP[idx].dwSize                      = sizeof(PROPSHEETPAGE);
        gPSP[idx].dwFlags                     = 0;
        gPSP[idx].hInstance                   = ghInstance;
        gPSP[idx].DUMMYUNIONNAME.pszTemplate  = MAKEINTRESOURCE(IDD_WELCOME);
        gPSP[idx].DUMMYUNIONNAME2.pszIcon     = NULL;
        gPSP[idx].pfnDlgProc                  = (DLGPROC)WelcomeDialogProc;
        gPSP[idx].pszTitle                    = NULL;
        gPSP[idx].lParam                      = 0;
        gPSP[idx].pfnCallback                 = NULL;
        idx++;


        gPSH.dwSize                     = sizeof(PROPSHEETHEADER);
        gPSH.dwFlags                    = PSH_PROPSHEETPAGE | PSH_USEICONID | PSH_WIZARD;
        gPSH.hwndParent                 = ghMainWindowHandle;
        gPSH.hInstance                  = ghInstance;
        gPSH.DUMMYUNIONNAME.pszIcon     = "SetupIcon";
        gPSH.pszCaption                 = "Inteli-Installer";
        gPSH.nPages                     = idx;
        gPSH.DUMMYUNIONNAME2.nStartPage = 0;
        gPSH.DUMMYUNIONNAME3.ppsp       = (LPCPROPSHEETPAGE)&gPSP;
        gPSH.pfnCallback                = NULL;


where IDD_SPLASH & IDD_WELCOME are different dialog resources.
          SplashDialogProc & WelcomeDialogProc are callback functions
0
 
MatrixFreakAuthor Commented:
Well, i'm back and i haven't gotten a chance to try out your code yet but i will give a response by tomorrow or should i say today?  The code looks right so more than likely you will get the points.
0
 
MatrixFreakAuthor Commented:
It works great! Thank you for the help hsdhina.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now