tabs VS property sheets

This is a discussion on tabs VS property sheets within the Windows Programming forums, part of the Platform Specific Boards category; Hi, I am a newbie at C++ programing. I am trying to write a program that displays the UI for ...

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    205

    tabs VS property sheets

    Hi,
    I am a newbie at C++ programing. I am trying to write a program that displays the UI for two different dialog based programs inside another dialog window. I was thinking that using tabs or property sheets might be a good idea to do that. I am using MSVS .NET 2003 and having some problems understanding how both tabs and property sheeps works and what's the difference. Anybody have any good links that explains that or could shed some light on the matter. Thanks
    Amish

  2. #2
    Even death may die... Dante Shamest's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    970
    The Property Sheet is actually a system-defined dialog box that manages the pages and provides a common container for them. It uses the Tab control.

    The Tab Control doesn't use a Property Sheet. But it does not manage the pages for you.

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,651
    >> Anybody have any good links...
    Property Sheet Reference
    Tab Control Reference

    As Dante mentioned, the property sheet api's make using tab controls easier by managing things for you.

    gg

  4. #4
    Registered User
    Join Date
    Dec 2004
    Posts
    205
    I have been trying to figure out how to use the property pages all day today but with no luck. I have no experience with MFC so it is hard. Do you guys know any place where I could get an example of a VERY simple program that uses the property pages or explains in details how to set it up using MSVS .NET 2003. Thanks a lot. I appreciate your help,
    Amish

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,651
    The links I posted show you have to use property sheets without using MFC. If you want to use MFC then read the MFC documetation on the subject:
    Visual C++ Concepts: Property Sheets and Property Pages

    You can browse other reference material on the subject here and here.

    gg

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    For just two dialogs I use a TAB

    I create the TAB as a frame for the dialogs (all the same size). I then create the dialogs when the app starts (or they are needed) but do not make them visible.

    When the user changes the TAB I hide the current dialog and show the selected one. ( ShowWindow() and / or SetWindowPos() )

    You will have to stop size changes and handle move messages for the dialogs (so the current dialog moves with the TAB)
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  7. #7
    Registered User
    Join Date
    Dec 2004
    Posts
    205
    Quote Originally Posted by novacain
    For just two dialogs I use a TAB

    I create the TAB as a frame for the dialogs (all the same size). I then create the dialogs when the app starts (or they are needed) but do not make them visible.

    When the user changes the TAB I hide the current dialog and show the selected one. ( ShowWindow() and / or SetWindowPos() )

    You will have to stop size changes and handle move messages for the dialogs (so the current dialog moves with the TAB)
    Hi Thanks for the answer. I was wondering if you could tell me how to make a dialogue so that is is invisible. I tried using Create but I can't get all the parameters right. Thanks
    Amish

  8. #8
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    In the Create() don't use WS_VISIBLE.

    Or

    use ShowWindow(), the flags being SW_HIDE / SW_SHOW.

    The dialogs visibility can be changed any number of times. May need a call to UpdateWindow() to see changes (probably not....)

    MFC or WIN32?
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Closing Property Sheets - PSM_GETCURRENTPAGEHWND Test
    By Tonto in forum Windows Programming
    Replies: 1
    Last Post: 05-07-2007, 07:22 AM
  2. Property Sheets
    By rEtard in forum Windows Programming
    Replies: 8
    Last Post: 07-22-2005, 09:34 AM
  3. WinApi - Property Sheets
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 06-13-2002, 02:32 PM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  5. Property Sheets :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 05-09-2002, 03:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21