Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. tAB CONTROL

tAB CONTROL

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialc++help
11 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vcseeker
    wrote on last edited by
    #1

    Hi all, I want to use a tab control inside apropertyPage,but i have absolutly no idea about how to use a tab control in MFC.Can i get a step by step Tutorial to add a tab control and adding controls to each tab.I searched the web ,but couldn't found a good tuto.Any help would be appreciated.

    D J 2 Replies Last reply
    0
    • V vcseeker

      Hi all, I want to use a tab control inside apropertyPage,but i have absolutly no idea about how to use a tab control in MFC.Can i get a step by step Tutorial to add a tab control and adding controls to each tab.I searched the web ,but couldn't found a good tuto.Any help would be appreciated.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Are you talking about a property sheet that contains multiple property pages? If so, take a peek at CPropertySheet and CPropertyPage.

      V 2 Replies Last reply
      0
      • V vcseeker

        Hi all, I want to use a tab control inside apropertyPage,but i have absolutly no idea about how to use a tab control in MFC.Can i get a step by step Tutorial to add a tab control and adding controls to each tab.I searched the web ,but couldn't found a good tuto.Any help would be appreciated.

        J Offline
        J Offline
        Joan M
        wrote on last edited by
        #3

        NOTE: If you don't know how Property sheets work, continue reading, if you already know, don't continue... ;) Well, a "CPropertySheet" it's a container class, it contains several "CPropertyPage"s. in order to make it work you must follow those easy steps: 1. Create a dialog for each "page" you need. 2. Place all the controls inside the dialog using the resource editor. 3. Then you'll need to map all the messages you need, in order to do so, create a class for the newly created and populated dialog, and select the class CPropertyPage. 4. Repeat step 2 and 3 until you've finished to populate/define the recently created property pages (dialogs). 5. Now you must create a new class from the class wizard, select the base class CPropertySheet. 6. Modify the newly CPropertySheet in order to add the required pages in it's constructor. 7. Call the property sheet from your code. this is how it works... if you need more help on this topic, e-mail me... hope this helps...

        V 2 Replies Last reply
        0
        • J Joan M

          NOTE: If you don't know how Property sheets work, continue reading, if you already know, don't continue... ;) Well, a "CPropertySheet" it's a container class, it contains several "CPropertyPage"s. in order to make it work you must follow those easy steps: 1. Create a dialog for each "page" you need. 2. Place all the controls inside the dialog using the resource editor. 3. Then you'll need to map all the messages you need, in order to do so, create a class for the newly created and populated dialog, and select the class CPropertyPage. 4. Repeat step 2 and 3 until you've finished to populate/define the recently created property pages (dialogs). 5. Now you must create a new class from the class wizard, select the base class CPropertySheet. 6. Modify the newly CPropertySheet in order to add the required pages in it's constructor. 7. Call the property sheet from your code. this is how it works... if you need more help on this topic, e-mail me... hope this helps...

          V Offline
          V Offline
          vcseeker
          wrote on last edited by
          #4

          Thanks a lot,John and david. I solved my problem.

          1 Reply Last reply
          0
          • D David Crow

            Are you talking about a property sheet that contains multiple property pages? If so, take a peek at CPropertySheet and CPropertyPage.

            V Offline
            V Offline
            vcseeker
            wrote on last edited by
            #5

            Thanks a lot John and David, I solved my problem:)

            1 Reply Last reply
            0
            • J Joan M

              NOTE: If you don't know how Property sheets work, continue reading, if you already know, don't continue... ;) Well, a "CPropertySheet" it's a container class, it contains several "CPropertyPage"s. in order to make it work you must follow those easy steps: 1. Create a dialog for each "page" you need. 2. Place all the controls inside the dialog using the resource editor. 3. Then you'll need to map all the messages you need, in order to do so, create a class for the newly created and populated dialog, and select the class CPropertyPage. 4. Repeat step 2 and 3 until you've finished to populate/define the recently created property pages (dialogs). 5. Now you must create a new class from the class wizard, select the base class CPropertySheet. 6. Modify the newly CPropertySheet in order to add the required pages in it's constructor. 7. Call the property sheet from your code. this is how it works... if you need more help on this topic, e-mail me... hope this helps...

              V Offline
              V Offline
              vcseeker
              wrote on last edited by
              #6

              Hi , I again have a problem,i have this modal tabbed Dialog inside a propertyPage,I want this tabbed sheet as a fixed position(unmovable,unresizable).

              J 1 Reply Last reply
              0
              • D David Crow

                Are you talking about a property sheet that contains multiple property pages? If so, take a peek at CPropertySheet and CPropertyPage.

                V Offline
                V Offline
                vcseeker
                wrote on last edited by
                #7

                Hi , I again have a problem,i have this modal tabbed Dialog inside a propertyPage,I want this tabbed sheet as a fixed position(unmovable,unresizable).

                1 Reply Last reply
                0
                • V vcseeker

                  Hi , I again have a problem,i have this modal tabbed Dialog inside a propertyPage,I want this tabbed sheet as a fixed position(unmovable,unresizable).

                  J Offline
                  J Offline
                  Joan M
                  wrote on last edited by
                  #8

                  I don't understand you: if you have one thing inside another, normally the child window is not resizeable and neither it can be moveable... have you created the new window as a child of the parent one?

                  V 1 Reply Last reply
                  0
                  • J Joan M

                    I don't understand you: if you have one thing inside another, normally the child window is not resizeable and neither it can be moveable... have you created the new window as a child of the parent one?

                    V Offline
                    V Offline
                    vcseeker
                    wrote on last edited by
                    #9

                    Hi, No I am creating a window in OnSetActive() event of the propertyPage that contains it.I don't know how to make it a child. My code looks like this: //CReportWizPage is a propertyPage on which i want to create the Tabbed Pages. //CReportTabbed is the PropertySheet that embeds these pages. CReportWizPage::OnSetActive() { CPropertySheet* psheet = (CPropertySheet*) GetParent(); psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT); CReportTabbed report(IDS_TABBED,this); CReport1Tab rep1; CReport2Tab rep2; report.AddPage(&rep1); report.AddPage(&rep2); if(report.DoModal() == IDOK) { //........ } return CPropertyPage::OnSetActive(); }

                    J 1 Reply Last reply
                    0
                    • V vcseeker

                      Hi, No I am creating a window in OnSetActive() event of the propertyPage that contains it.I don't know how to make it a child. My code looks like this: //CReportWizPage is a propertyPage on which i want to create the Tabbed Pages. //CReportTabbed is the PropertySheet that embeds these pages. CReportWizPage::OnSetActive() { CPropertySheet* psheet = (CPropertySheet*) GetParent(); psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT); CReportTabbed report(IDS_TABBED,this); CReport1Tab rep1; CReport2Tab rep2; report.AddPage(&rep1); report.AddPage(&rep2); if(report.DoModal() == IDOK) { //........ } return CPropertyPage::OnSetActive(); }

                      J Offline
                      J Offline
                      Joan M
                      wrote on last edited by
                      #10

                      if you use DoModal(), then you are making the property sheet appear as a standalone component that isn't owned by nobody (only by the app). this->m_pPSEstacio = new CPSEstacio("", this, 0); this->m_pPSEstacio->Create(this, WS_CHILD | WS_TABSTOP | WS_VISIBLE); this->m_pPSEstacio->ModifyStyleEx(0,WS_EX_CONTROLPARENT); // if you don't do this you won't be able to get access to the parent's window controls by pressing tab... Hope this helps...

                      V 1 Reply Last reply
                      0
                      • J Joan M

                        if you use DoModal(), then you are making the property sheet appear as a standalone component that isn't owned by nobody (only by the app). this->m_pPSEstacio = new CPSEstacio("", this, 0); this->m_pPSEstacio->Create(this, WS_CHILD | WS_TABSTOP | WS_VISIBLE); this->m_pPSEstacio->ModifyStyleEx(0,WS_EX_CONTROLPARENT); // if you don't do this you won't be able to get access to the parent's window controls by pressing tab... Hope this helps...

                        V Offline
                        V Offline
                        vcseeker
                        wrote on last edited by
                        #11

                        Thanks John for help.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups