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. A Bug with MFC Aero Wizards ?

A Bug with MFC Aero Wizards ?

Scheduled Pinned Locked Moved C / C++ / MFC
c++comhelptutorialquestion
2 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.
  • A Offline
    A Offline
    Ahmed Charfeddine
    wrote on last edited by
    #1

    I am using MFC 9.0 to create Aero Wizard on Vista. Evrything seems to be OK : creating a prpertysheet, setting the PSH_AEROWIZARD, adding propertypages, etc. However the next and back buttons only work when the following functions of the currently active page are returning the zero value :

    LRESULT OnWizardNext();

    LRESULT OnWizardBack();

    When the return value is zero, the framework uses the order by which the developer called CPropertySheet::AddPage for each page instance as an information rules for navigation. However, the developer is allowed, according to the application logic, to override those function and return the dialog resource ID of specific page. That case, the framework navigates to this latter one instead of the default page. example :

    LRESULT CPage1::OnWizardNext()
    {
    // TODO: Add your specialized code here and/or call the base class
    return CPage3::IDD;
    }

    When the PSH_AEROWIZARD flag is set, unfortunately, this is not accepted : the next and back button do not work. What's going on ? Is this a bug ? In this case, is there a way how I can intercept the next and back clicks so I can make explicit calls to CPropertySheet::SetActivePage ? Thank you in advance.

    Easy Profiler : Now open source ! http://www.codeproject.com/KB/cpp/easyprofiler.aspx

    G 1 Reply Last reply
    0
    • A Ahmed Charfeddine

      I am using MFC 9.0 to create Aero Wizard on Vista. Evrything seems to be OK : creating a prpertysheet, setting the PSH_AEROWIZARD, adding propertypages, etc. However the next and back buttons only work when the following functions of the currently active page are returning the zero value :

      LRESULT OnWizardNext();

      LRESULT OnWizardBack();

      When the return value is zero, the framework uses the order by which the developer called CPropertySheet::AddPage for each page instance as an information rules for navigation. However, the developer is allowed, according to the application logic, to override those function and return the dialog resource ID of specific page. That case, the framework navigates to this latter one instead of the default page. example :

      LRESULT CPage1::OnWizardNext()
      {
      // TODO: Add your specialized code here and/or call the base class
      return CPage3::IDD;
      }

      When the PSH_AEROWIZARD flag is set, unfortunately, this is not accepted : the next and back button do not work. What's going on ? Is this a bug ? In this case, is there a way how I can intercept the next and back clicks so I can make explicit calls to CPropertySheet::SetActivePage ? Thank you in advance.

      Easy Profiler : Now open source ! http://www.codeproject.com/KB/cpp/easyprofiler.aspx

      G Offline
      G Offline
      Greg Marr
      wrote on last edited by
      #2

      MFC 9.0 assumes that the Parent() of the CPropertyPage is the CPropertySheet. With the Aero Wizards, that's not the case, there are two other HWNDs in between. Therefore, the code in CPropertyPage::MapWizardResult() that tries to find the CPropertySheet to do the conversion from resource ID to PROPSHEETPAGE_RESOURCE doesn't run. You will need to do the conversion yourself.

      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