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. Displaying CPropertySheet in a Dialog

Displaying CPropertySheet in a Dialog

Scheduled Pinned Locked Moved C / C++ / MFC
c++javahelpquestion
5 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.
  • M Offline
    M Offline
    mmica
    wrote on last edited by
    #1

    Hi all, I'm kinda new to MFC and come from the world of Java so please bear with me. I have a dialog on which (amongst other things) I want to display a CPropertySheet (along with CPropertyPages ofcourse). Being the newbie that I am, I did the following: In the OnInit() method of my dialog I put down the following code: //m_ps is a member variable of type CPropertySheet m_ps.Construct("Test Property Sheet", this, 0); m_ps.SetWindowPos(this, 50,50,100,100, 0); m_ps.ShowWindow(SW_SHOW); This doesn't work (and also causes an assert). Can anyone help me out please?

    D RaviBeeR 2 Replies Last reply
    0
    • M mmica

      Hi all, I'm kinda new to MFC and come from the world of Java so please bear with me. I have a dialog on which (amongst other things) I want to display a CPropertySheet (along with CPropertyPages ofcourse). Being the newbie that I am, I did the following: In the OnInit() method of my dialog I put down the following code: //m_ps is a member variable of type CPropertySheet m_ps.Construct("Test Property Sheet", this, 0); m_ps.SetWindowPos(this, 50,50,100,100, 0); m_ps.ShowWindow(SW_SHOW); This doesn't work (and also causes an assert). Can anyone help me out please?

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

      An easier solution would be to use a CPropertySheet rather than a CDialog as the main window. While the articles themselves are not about the steps involved in doing this, I have an example here and here.


      "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

      M 1 Reply Last reply
      0
      • D David Crow

        An easier solution would be to use a CPropertySheet rather than a CDialog as the main window. While the articles themselves are not about the steps involved in doing this, I have an example here and here.


        "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

        M Offline
        M Offline
        mmica
        wrote on last edited by
        #3

        But I need to add a tree control outside the property sheet and have nodes on the tree add/remove pages from the property sheet accordingly. I think this can't be done with the CPropertySheet as a main window. Will look at the examples tho. Thanks :-)

        D 1 Reply Last reply
        0
        • M mmica

          But I need to add a tree control outside the property sheet and have nodes on the tree add/remove pages from the property sheet accordingly. I think this can't be done with the CPropertySheet as a main window. Will look at the examples tho. Thanks :-)

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

          Gotcha. It always helps to state all the necessary requirements so that unnecessary suggestions can be avoided.


          "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

          1 Reply Last reply
          0
          • M mmica

            Hi all, I'm kinda new to MFC and come from the world of Java so please bear with me. I have a dialog on which (amongst other things) I want to display a CPropertySheet (along with CPropertyPages ofcourse). Being the newbie that I am, I did the following: In the OnInit() method of my dialog I put down the following code: //m_ps is a member variable of type CPropertySheet m_ps.Construct("Test Property Sheet", this, 0); m_ps.SetWindowPos(this, 50,50,100,100, 0); m_ps.ShowWindow(SW_SHOW); This doesn't work (and also causes an assert). Can anyone help me out please?

            RaviBeeR Offline
            RaviBeeR Offline
            RaviBee
            wrote on last edited by
            #5

            You can create the property sheet as a child of your main dialog. See this[^] MSDN link for instructions. Alternatively, you could use a CTabCtrl and a bunch of child windows (a la "property pages"). See this[^] thread for info. Personally, I prefer the latter. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

            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