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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CPropertySheet Questons

CPropertySheet Questons

Scheduled Pinned Locked Moved C / C++ / MFC
questionlearning
8 Posts 4 Posters 1 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
    moobob
    wrote on last edited by
    #1

    I have a CPropertySheet which has two property pages in Wizard mode. In my OnWizardFinish handler on the second page I do an EndDialog(IDOK). I then call another modal dialog, dialogB. The wizard dialog does not go away until dialogB is dismissed and the return from the OnWizardFinish is executed. - Is there anyway to make the wizard dialog go away immediatly, the EndDialog does not seem to do it? - I've unchecked the System Menu resource from the wizard dialog. The CPropertySheet puts the system close button (X) in the upper right corner. Is there a way to remove it? Thanks in advance, Bob

    J D 2 Replies Last reply
    0
    • M moobob

      I have a CPropertySheet which has two property pages in Wizard mode. In my OnWizardFinish handler on the second page I do an EndDialog(IDOK). I then call another modal dialog, dialogB. The wizard dialog does not go away until dialogB is dismissed and the return from the OnWizardFinish is executed. - Is there anyway to make the wizard dialog go away immediatly, the EndDialog does not seem to do it? - I've unchecked the System Menu resource from the wizard dialog. The CPropertySheet puts the system close button (X) in the upper right corner. Is there a way to remove it? Thanks in advance, Bob

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      As for your first question, probably calling CMyPropertySheet::ShowWindow(SW_HIDE) before launching the second dialog will do. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      M 1 Reply Last reply
      0
      • J Joaquin M Lopez Munoz

        As for your first question, probably calling CMyPropertySheet::ShowWindow(SW_HIDE) before launching the second dialog will do. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

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

        Thanks for your response. This has no effect, the dialog is still behind the latest one, as it was before.

        J J 2 Replies Last reply
        0
        • M moobob

          Thanks for your response. This has no effect, the dialog is still behind the latest one, as it was before.

          J Offline
          J Offline
          Joaquin M Lopez Munoz
          wrote on last edited by
          #4

          You sure? Try this sequence:ShowWindow(SW_HIDE), launch dialog, EndDialog. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

          1 Reply Last reply
          0
          • M moobob

            Thanks for your response. This has no effect, the dialog is still behind the latest one, as it was before.

            J Offline
            J Offline
            James R Twine
            wrote on last edited by
            #5

            Are you calling ShowWindow( SW_HIDE ) directly from within the OnWizardFinish() handler, or are you calling GetParent() -> ShowWindow( SW_HIDE )?    As for the system menu, you can try specifying WS_POPUP without WS_SYSMENU when you create the Property Sheet, or modifying the Sheet's styles after creation.    Unchecking the System Menu in the Dialog/Resource Editor does little for you in this case, because the dialog editor is used to modify the Pages, not the Sheet.    Peace! -=- James. "Fat people are hard to kidnap." (Try Check Favorites Sometime!)

            M 1 Reply Last reply
            0
            • M moobob

              I have a CPropertySheet which has two property pages in Wizard mode. In my OnWizardFinish handler on the second page I do an EndDialog(IDOK). I then call another modal dialog, dialogB. The wizard dialog does not go away until dialogB is dismissed and the return from the OnWizardFinish is executed. - Is there anyway to make the wizard dialog go away immediatly, the EndDialog does not seem to do it? - I've unchecked the System Menu resource from the wizard dialog. The CPropertySheet puts the system close button (X) in the upper right corner. Is there a way to remove it? Thanks in advance, Bob

              D Offline
              D Offline
              dazinith
              wrote on last edited by
              #6

              why not just have whatever called the CPropertySheet call the dialog whenever it returns? if (MySheet.DoModal() == ID_WIZFINISH) { dialogB.doModal(); } if you have a good reason then ignore my question :) -dz

              1 Reply Last reply
              0
              • J James R Twine

                Are you calling ShowWindow( SW_HIDE ) directly from within the OnWizardFinish() handler, or are you calling GetParent() -> ShowWindow( SW_HIDE )?    As for the system menu, you can try specifying WS_POPUP without WS_SYSMENU when you create the Property Sheet, or modifying the Sheet's styles after creation.    Unchecking the System Menu in the Dialog/Resource Editor does little for you in this case, because the dialog editor is used to modify the Pages, not the Sheet.    Peace! -=- James. "Fat people are hard to kidnap." (Try Check Favorites Sometime!)

                M Offline
                M Offline
                moobob
                wrote on last edited by
                #7

                James, The GetParent()->ShowWindow(SW_HIDE) does the trick, thanks. How would I modify the Sheet's style after creation to have WS_POPUP without WS_SYSMENU? I assume I would do it in it's OnInitDialog()? Thanks, Bob

                M 1 Reply Last reply
                0
                • M moobob

                  James, The GetParent()->ShowWindow(SW_HIDE) does the trick, thanks. How would I modify the Sheet's style after creation to have WS_POPUP without WS_SYSMENU? I assume I would do it in it's OnInitDialog()? Thanks, Bob

                  M Offline
                  M Offline
                  moobob
                  wrote on last edited by
                  #8

                  I've got it, it's ModifyStyle (WS_SYSMENU, 0) in the Sheet's OnInitDialog. Thanks for your help. Bob

                  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