CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2005
    Posts
    125

    Question Query regarding Dialog-Based Application !!!!

    Hi Gurus,
    I am working on a Dialog-based application. There are Total 4 dialogs in the application. Each dialog is Modal One. Each has a Next and Previous button. This all was developed by a previous developer at my company. But due to Modal thing, When I press NEXT, Current dialog disapprears and Next dialog appears. My boss is not happy with this thing. He wants all dialogs to be a part of Appliction framework (for example Notepad type), where dialog change should occur within the application so that it will not look like next,previous application.

    Can it be done?? Can I create a application framework within which dialogs will get changed and application framework won't disappear while changing dialogs??

    Thanks in Advance for Your valuable time & help.

    Regards,
    Prateek J Duble

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Query regarding Dialog-Based Application !!!!

    Sounds like CPropertySheet in Wizard mode may be what you want.

  3. #3
    Join Date
    Feb 2005
    Location
    Czech Republic, Prague
    Posts
    283

    Re: Query regarding Dialog-Based Application !!!!

    Hi,

    You should use CTabCtrl control on your main dialog. Then the partial dialogs install as pages to this CTabCtrl. Then place Next and Prev buttons next to the CTabCtrl and in their on_click handler do the page selection.

    Regards,
    MartinCz.

  4. #4
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Query regarding Dialog-Based Application !!!!

    Quote Originally Posted by MartinCz
    Hi,

    You should use CTabCtrl control on your main dialog. Then the partial dialogs install as pages to this CTabCtrl. Then place Next and Prev buttons next to the CTabCtrl and in their on_click handler do the page selection.

    Regards,
    MartinCz.
    That'll work, but why re-invent the wheel? Check out CPropertySheet and CPropertyPage like GCDEF suggested. These do everything that MartinCz suggested, but it's all "built right in."

    Viggy

  5. #5
    Join Date
    Feb 2005
    Location
    Czech Republic, Prague
    Posts
    283

    Re: Query regarding Dialog-Based Application !!!!

    Yes. I agree. But if you are going to make a wizard-like Property sheet of a nonstandard look in any way, it is better to use the original CTabCtrl. I meen other buttons, or their placemet or if you plan to have another controls on the dialog than just next, prev and the tabs. The CTabCtrl method is just better when you want to do modifications to the standard look and feel

  6. #6
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: Query regarding Dialog-Based Application !!!!

    There are 2 options ( both using CPropertySheet and CPropertyPages)
    • Wizard mode - This is used when your dialogs have to go through an exact sequence of steps and you cannot jump from one step to another in a random way. The wizard mode enforces that by having you to go thru next & prev steps which are predetermined and you cannot skip pages. If your application demands this, you have to use the above classes in wizard mode. You call SetWizardMode method of CPropertySheet to enable this
    • Tab mode - This is used when your dialogs do not have any sequence as such. You are just showing several pages with different options and user is free to go to any page at any time and change items and do stuff. This mode is normally used when you have various settings which are not related to each other and hence can be modified independent of one another. And here the data that you operate on doesn't impose a sequence of events to happen

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