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. Facing problem while making one button as Default on PropertySheet

Facing problem while making one button as Default on PropertySheet

Scheduled Pinned Locked Moved C / C++ / MFC
help
5 Posts 2 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.
  • R Offline
    R Offline
    Ravi Jadhav
    wrote on last edited by
    #1

    I got a Property sheet with some pages on it in wizard style. On first page i am disabling the back and next button. The next button gets enabled when user enters something into edit control of page i.e. first page. Since Back and Next buttons are disabled while dispalying sheet, the cancel button is becoming as Default button. Now i want to make Next burtton as Default button as soon as user enters something into Edit control. So please give me suggestion or solution on this. Thanks for everything.

    B 1 Reply Last reply
    0
    • R Ravi Jadhav

      I got a Property sheet with some pages on it in wizard style. On first page i am disabling the back and next button. The next button gets enabled when user enters something into edit control of page i.e. first page. Since Back and Next buttons are disabled while dispalying sheet, the cancel button is becoming as Default button. Now i want to make Next burtton as Default button as soon as user enters something into Edit control. So please give me suggestion or solution on this. Thanks for everything.

      B Offline
      B Offline
      Bill Wilson
      wrote on last edited by
      #2

      That should happen automatically. What code do you use to re-activate the Next button? Good Luck, Bill

      R 1 Reply Last reply
      0
      • B Bill Wilson

        That should happen automatically. What code do you use to re-activate the Next button? Good Luck, Bill

        R Offline
        R Offline
        Ravi Jadhav
        wrote on last edited by
        #3

        Thanks Bill. Here is the scenario. I am enabling the Next button as soon as user enters something into Edit control. I mapped a message of edit control ON_EN_CHANGE in this function i am checking edit control is empty or not. If it is not empty then i am getting a pointer to next button from Sheet by using GetDlgItem(ID_WIZNEXT) and calling EnableWindow(TRUE). Now it is working perfectly as far as Enbling concerned. I want Next button as Default as soon as it gets enabled. Once again Thanks.

        B 1 Reply Last reply
        0
        • R Ravi Jadhav

          Thanks Bill. Here is the scenario. I am enabling the Next button as soon as user enters something into Edit control. I mapped a message of edit control ON_EN_CHANGE in this function i am checking edit control is empty or not. If it is not empty then i am getting a pointer to next button from Sheet by using GetDlgItem(ID_WIZNEXT) and calling EnableWindow(TRUE). Now it is working perfectly as far as Enbling concerned. I want Next button as Default as soon as it gets enabled. Once again Thanks.

          B Offline
          B Offline
          Bill Wilson
          wrote on last edited by
          #4

          Try using void SetWizardButtons( DWORD dwFlags ); It is a method of the parent property sheet. Its use is like this: Here is a snip from my last project that implemented wizards: CPropertySheet* pParent = (CPropertySheet*)GetParent(); ASSERT_KINDOF (CPropertySheet, pParent); pParent->SetWizardButtons(PSWIZB_NEXT | PSWIZB_BACK); // Disable buttons Hope this helps, Bill

          R 1 Reply Last reply
          0
          • B Bill Wilson

            Try using void SetWizardButtons( DWORD dwFlags ); It is a method of the parent property sheet. Its use is like this: Here is a snip from my last project that implemented wizards: CPropertySheet* pParent = (CPropertySheet*)GetParent(); ASSERT_KINDOF (CPropertySheet, pParent); pParent->SetWizardButtons(PSWIZB_NEXT | PSWIZB_BACK); // Disable buttons Hope this helps, Bill

            R Offline
            R Offline
            Ravi Jadhav
            wrote on last edited by
            #5

            Thanks Bill Yes it worked out...:)

            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