Thread: Using Tab control to change between dialogs

  1. #1

    Using Tab control to change between dialogs

    I've created a tab control wich I want to use to change between diferent dialogs. When I select a tab I will just show it's corresponding dialog in the tab control's client area.
    But what I can't work out is how to set the correct dialog size:
    I know the size of the tab control so the logical thing to do would be to put that size into the resource script for the dialog. But I don't think the numbers in a resource script correspond to width/height in pixels they all represent dialog units. Dose anyone know what the best thing to do for this creating a gui like this?

  2. #2
    train spotter
    Join Date
    Aug 2001
    near a computer
    Use GetClientRect() on the TAB ctrl. GetWindowRect() on the dialog.

    SetWindowPos() to change one of the sizes.

    Better to make one dynamicly (on the fly) rather than use a resource script (if the dialogs are not to complex).
    "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

  3. #3
    Thanx for the help novacain

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need a little help here about MFC and Tab Control stuff...
    By guitarist809 in forum Windows Programming
    Replies: 4
    Last Post: 09-19-2008, 10:36 AM
  2. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  3. Static control color change
    By Devil Panther in forum Windows Programming
    Replies: 6
    Last Post: 08-10-2005, 09:36 AM
  4. Tab Control
    By Unregistered in forum Windows Programming
    Replies: 0
    Last Post: 11-03-2001, 06:32 PM
  5. Replies: 2
    Last Post: 09-04-2001, 02:12 PM