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. PropertySheets and PropertyPages

PropertySheets and PropertyPages

Scheduled Pinned Locked Moved C / C++ / MFC
8 Posts 4 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.
  • T Offline
    T Offline
    Taruni
    wrote on last edited by
    #1

    Hi, I am working on property sheets. I have initially added 5 pages. I am using the SetWizardMode(). In the 3rd page, OnWizardNext(), based on some condition, I am trying to remove the 4th page using RemovePage(3). But I am unable to do so. Please let me know as how this could be done at runtime.

    Taruni

    C 1 Reply Last reply
    0
    • T Taruni

      Hi, I am working on property sheets. I have initially added 5 pages. I am using the SetWizardMode(). In the 3rd page, OnWizardNext(), based on some condition, I am trying to remove the 4th page using RemovePage(3). But I am unable to do so. Please let me know as how this could be done at runtime.

      Taruni

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      Taruni wrote:

      But I am unable to do so.

      Why ? What is the exact problem ? EDIT: by the way, do you know that you can return the ID of the page you want to be displayed when you hit OnWizardNext ? So you could do that instead of removing the page.

      Cédric Moonen Software developer
      Charting control [v1.3]

      modified on Thursday, April 3, 2008 3:02 AM

      T R 2 Replies Last reply
      0
      • C Cedric Moonen

        Taruni wrote:

        But I am unable to do so.

        Why ? What is the exact problem ? EDIT: by the way, do you know that you can return the ID of the page you want to be displayed when you hit OnWizardNext ? So you could do that instead of removing the page.

        Cédric Moonen Software developer
        Charting control [v1.3]

        modified on Thursday, April 3, 2008 3:02 AM

        T Offline
        T Offline
        Taruni
        wrote on last edited by
        #3

        I have a propertysheet with 5 pages. The following is the OnWizardNext() of page3. LRESULT CPage3::OnWizardNext() { if(Value == 1) { sheet.RemovePage(&sheet.page4); } return CPropertyPage::OnWizardNext(); } At run time, when the "Value" is 1, I shouldn't get page4 tab. I should remove that. But I am unable to do so. Is my code correct? Please let me know.

        Taruni

        C D 2 Replies Last reply
        0
        • T Taruni

          I have a propertysheet with 5 pages. The following is the OnWizardNext() of page3. LRESULT CPage3::OnWizardNext() { if(Value == 1) { sheet.RemovePage(&sheet.page4); } return CPropertyPage::OnWizardNext(); } At run time, when the "Value" is 1, I shouldn't get page4 tab. I should remove that. But I am unable to do so. Is my code correct? Please let me know.

          Taruni

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #4

          Taruni wrote:

          sheet.RemovePage(&sheet.page4);

          :confused: What's that ? You said you were using RemovePage(3). What is page4 here ?

          Cédric Moonen Software developer
          Charting control [v1.3]

          T 1 Reply Last reply
          0
          • C Cedric Moonen

            Taruni wrote:

            sheet.RemovePage(&sheet.page4);

            :confused: What's that ? You said you were using RemovePage(3). What is page4 here ?

            Cédric Moonen Software developer
            Charting control [v1.3]

            T Offline
            T Offline
            Taruni
            wrote on last edited by
            #5

            As the parameter to the RemovePage is 0 based index of the page, I have tried to remove the page 4 by saying, sheet.RemovePage(3) and also I have tried by passing the reference of the page. sheet.RemovePage(&sheet.page4); But I was unable to remove the page.

            Taruni

            1 Reply Last reply
            0
            • C Cedric Moonen

              Taruni wrote:

              But I am unable to do so.

              Why ? What is the exact problem ? EDIT: by the way, do you know that you can return the ID of the page you want to be displayed when you hit OnWizardNext ? So you could do that instead of removing the page.

              Cédric Moonen Software developer
              Charting control [v1.3]

              modified on Thursday, April 3, 2008 3:02 AM

              R Offline
              R Offline
              Rajesh R Subramanian
              wrote on last edited by
              #6

              Your CPMRU is running low on power?

              Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

              C 1 Reply Last reply
              0
              • R Rajesh R Subramanian

                Your CPMRU is running low on power?

                Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                C Offline
                C Offline
                Cedric Moonen
                wrote on last edited by
                #7

                Nah, it's still broken :) . I should ask for a new one, seems it is required those days ;P

                Cédric Moonen Software developer
                Charting control [v1.3]

                1 Reply Last reply
                0
                • T Taruni

                  I have a propertysheet with 5 pages. The following is the OnWizardNext() of page3. LRESULT CPage3::OnWizardNext() { if(Value == 1) { sheet.RemovePage(&sheet.page4); } return CPropertyPage::OnWizardNext(); } At run time, when the "Value" is 1, I shouldn't get page4 tab. I should remove that. But I am unable to do so. Is my code correct? Please let me know.

                  Taruni

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

                  Taruni wrote:

                  sheet.RemovePage(&sheet.page4);

                  What happens if you ever need to re-add the page? Have you considered something like:

                  LRESULT CPage3::OnWizardNext()
                  {
                  if (Value == 1)
                  return 3; // the id of the page you want to skip to
                  else
                  return CPropertyPage::OnWizardNext(); // the next page in line
                  }

                  "Love people and use things, not love things and use people." - Unknown

                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                  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