CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007
    Posts
    119

    Question Suppressing dialog UI in a property sheet

    I have propertysheet with three dialogs.
    I want to process them automatically by calling OnWizardNext() in OnSetActive() method for not showing that dialog. It is working fine except for the final dialog. For the final dialog I am calling OnWizardFinish()on OnSetActive() of that dialog so that finish button functionality should automatically called but still I see that final dialog and need to press that finish button(don't know what am I missing).
    Can anyone please help me in that.

    Thanks,
    Mushtaque Nizamani

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Suppressing dialog UI in a property sheet

    Rather than call OnWizardNext you should use CPropertySheet::SetWizardButtons to set button "Finish" instead of "Next" (see the example in MSDN article "CPropertySheet::SetWizardButtons"). In that case you won't be able to go to your "final dialog": either "Back" or "Finish".
    Victor Nijegorodov

  3. #3
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: Suppressing dialog UI in a property sheet

    Quote Originally Posted by Mushq View Post
    I have propertysheet with three dialogs.
    Three property pages.
    Quote Originally Posted by Mushq View Post
    I want to process them automatically by calling OnWizardNext() in OnSetActive() method for not showing that dialog.
    I am not sure what do you mean by not showing that dialog. Assuming that you want to skip a page, you should not call OnWizardNext. You should use PressButton to si,ulate butto press. To skip a page or jump to any page return an ID of the page you want to jump to from OnWizardNext. Usually this is done in page preceding page to jump to. You can jump from to any page from any page.
    Quote Originally Posted by Mushq View Post
    For the final dialog I am calling OnWizardFinish()on OnSetActive() of that dialog so that finish button functionality should
    That is not a way to handle wizars, nor property pages.
    Both are usually used to collect some data step by step (page by page) and save data whem Finish button is pressed, User should have ability to cancel out without saving. You deprive user this functionality.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured