Tabbed Dialog Box Class

Environment: Windows NT4.0. SP5


This class implements a brand new kind of dialog box that can be used with dialog based aplications.

This class contains a Tab instead of the Dialog Title Bar. What is so cool about this dialog is that the dialog actually docks to side of the desktop. Then when the dialog loses focus, the main body of the dialog disappears with only the tab remaining visible!! This is great for admin type applications that you always want your user to have available, yet not in the way.

Then when you want to reactivate the dialog, instead of searching either the Task Bar or the Task Manager for your dialog, you simply move your mouse over the dialog's tab and the complete dialog reappears!

Implementing the Tab Dialog

  1. Create your dialog resource as normal and get Class Wizard to generate a dialog class and data members for you. The dialog should'nt have the "Title Bar" and "System Menu" styles enabled.
  2. Insert TabDialog.cpp file into your project.
  3. include "TabDialog.h" file in your Dialog header File.
  4. Change the base class of the dialog to CTabDialog. Make sure you change all occurrence of CDialog to CTabDialog.
  5. On your Dialog constructor, you can modify the TabDialog properties :
    • m_hTitleIcon : handle to an icon to use as the Tab Icon
    • m_sTitle : Title to display in the Tab
    • m_bCloseBox : TRUE if you want a close bbox to appear in the Tab
    • m_bAutoTabSize : TRUE if you want the Tab Dialog to automatically compute the Tab size, depending of the Icon, the title and the close box.
    • m_nBorderPos : indicate the desktop border you want your tab dialog to be attached on. follwing values are possibles :
    • m_nXpos or m_nYpos : indicate the position in pixels of the tab Dialog, on the border you chosed.
    • m_bTopMost : TRUE if you want the Tab Dialog to be topMost
    • m_bAutoHide : TRUE if you want the Tab Dialog to auto show/hide when the mouse move on and out of it
    • m_nTabHeight : height of the tab in pixels.
    • m_nTabWidth : width of the tab in pixels (used if m_bAutoTabSize = FALSE)
  6. At runtime you can call the following methods : void SetTopMost(BOOL bTopMost) : specify the new TopMost status of the Window void SetAutoHide(BOOL bAutoHide): specify the new AutoHide status of the Window

The Sample Project

I have included a sample Dialog based project which illustrates how the CTabDialog class can be used. It is a very simple dialog-based application which displays some basic controls.


Download demo project - 36 Kb
Download source - 8 Kb


  • It's been a ornate week in lieu of of direct masticate retailer|stop alternate online

    Posted by Stoompota on 06/24/2013 12:45pm

    Art can come in all different shapes and sizes, [url=]coach outlet website[/url] and for Poketo, art happens to also come via handbag and wallet. Based out of Los Angeles, Poketo works with more than 200 international artists to create and produce limited handbags, purses, messenger bags, wallets, laptop cases and shopping bags. Founders Ted Vadakan and Angie Myung married each other and established Poketo in 2003, because "making art that goes beyond the traditional gallery space is exciting," says Myung. Now, Poketo is collaborating with Target stores to release colorful and artsy graphic-printed products. Priced from $4.99 to $29.99, Poketo's Target collection will hit Target [url=]coach outlet website[/url] stores August 10th. Now getting your hands on Poketo's wildly artistic bags and wallets will be easier than ever! Truly eclectic and nearly one of [url=]coach outlet blog[/url] a kind, Poketo's bags and wallets are interesting to look at and fun to carry. [url=]coach outlet website[/url] Whether you like their Recycled Suit Tote Bag for the shocking responses from on-lookers or one of their cartoon-inspired wallets for your back pocket, the generality is clear: art is in, and Poketo has established the space for artists to create it for everyone.

  • 2013 the set and high jinks goods online representing accoucheur scrupulously, Seize more you products onw

    Posted by Glonesciece on 06/23/2013 05:58pm

    Italian handbag designer,Forzieri, takes their latest collection into top gear in collaboration with esteemed luxury performance car brand, Maserati. This merger of lavish design styles produces an array of handbags and leather [url=]karen millen[/url] goods that make even the most tenured epicurean swoon with delight. It's time to toss that makeup bag you've had since high school, and upgrade to something more becoming. With theMaseratiRed Leather Beauty Case, no one can question your devotion to glamour. [url=]karen [url=]karen millen outlet online[/url] millen dresses[/url] The posh design and supple leather are a tribute to Maserati's infamous styling and Forzieri's impeccable construction. Now you can have the best of both worlds. Maserati's signature trident logo is all the hardware you need for a bold and [url=]karen millen online[/url] daring statement. TheMaserati Croco Zip Around Walletcombines this powerful emblem with an exotic flair by incorporating croc into the design. The all-around zip keeps your things encased in quality and style. Forzieri hasn't neglected all you fashion-forward gents either. TheMaserati Black Leather City Bagis a great stow away bag while trekking the metropolitan streets. An added bonus: the embossed Maserati logo gives you the seal of approval should you encounter petrolheads along the way. Carry on, you sexy stud. Forzieri is a master at tuning into the finer qualities of a handbag, which is evident with theMaserati Genuine Leather Satchel in Beige. Luxury doesn't always have to be flashy; in fact, it welcomes an air of poise and refinement. The clean lines and texture of this bag draw out the sophistication inherent in both brands. The two lady-like handles, and multiple compartments make this a functional piece that does double-duty.

  • cheap jerseys online,team jerseys cheap,cheap jerseys soccer

    Posted by claicyroott on 06/21/2013 12:23am

    o their more illustrious opponents. Galatasaray Cim Bom Bom The Turkish club, set up by students of a French high school, went on tour to Switzerland in the early 1900s where they learnt a Swiss song called Jim Bom Bom. Once [url=]cheap soccer jerseys wholesale[/url] they returned home it got lost in translation. Olympiakos legend The Greek outfit became known as Thrylos legend after a successful run in the 1930s which garnered six league titles. For a spell, the side featured a forward line made up exclusively of the five Andrianopoulos [url=]cheap soccer jerseys online[/url] brothers. Middle school is full of changes for preteens. While in middle school your child will be prepared for the challenges and opportunities of high school. One way to help your child develop in middle school is to allow him or her to participate on a middle school sports team. Below is what you should know about sports during the middle school years. Middle School and Sports If your tween is interested in joining a club or organization in middle school, you might want to encourage him to consider trying out for a middle school sports team. Being on an athletic team in middle school can be beneficial to your child. For starters, he or she will learn a great deal about discipline and responsibility by attending scheduled practices, games and participating in drills. But being on a team can also help your child make new friends and develop his social circle. But there are other reasons to consider trying out for a sports team. Being on a team can help your child stay in shape, and physical exercise can also help stressed out tweens deal with stress, and overcome some of the other challenges that middle school presents. If your child hopes to play on a high school sports team, trying out for a middle school team can help. Many high school athletes improve their sport and skills during the middle school years, and some high schools and middle schools actually share coaches, will help your child's visibility should she decide to try out for a team in high school. If your chil

  • wholesale soccer jerseys boonies allocation coming this biggest soccer party.

    Posted by Merejensejage on 06/17/2013 10:02am

    The Cowboys might ask Gurode to take a paycut or seek a possible trade. Jones said the team will speak with Gurode and his agent when the team returns to Dallas on Sunday. Gurode's agent, Kennard McGuire, was unavailable for comment. The Cowboys will start third-string center Kevin Kowalski in Gurode's [url=]2014 world cup jersey[/url] place. The backup to Gurode, Phil Costa, is out two-to-four weeks as he recovers from a knee injury. Cowboys owner Jerry Jones said Gurode made the trip here and was told the team is holding him out for a business decision. Gurode, who missed the start of training camp while he recovered from minor knee surgery, is healthy according to Jones. Jones said Costa is expected to be ready for the season opener, [url=]2014 brazil world cup soccer jerseys[/url] Sept. 11 at the New York [url=]wholesale soccer jerseys[/url] Jets. More to come. MINNEAPOLIS -- Cowboys starting center Andre Gurode will not play in Saturday night's game at the Minnesota Vikings.

  • More concessions with herveleger, more seize napping!

    Posted by Mrtopflixbs on 03/28/2013 03:20am

    herve leger outlet herve leger swimwear herve leger bandage dresses herve leger for cheap herve leger dresses sale herve leger swimsuit herve leger outlet refurbished iphones for sale ipad for sale iphone 3gs sale

  • Correction for multiple monitors

    Posted by Legacy on 11/01/2002 12:00am

    Originally posted by: prc

    Be sure to change all occurances of:




    (this goes for Kim's fix as well)

  • m_nBorderPos = TAB_BORDER_RIGHT, not working rigth

    Posted by Legacy on 03/07/2002 12:00am

    Originally posted by: Kim Andersen

    Hey there!

    There is a bug in OnInitDialog(),

    if you want your app. to start at the right screen.
    The follow code has to be added.

    In OnInitDialog() - TabDialog.cpp


    // make sure X and Y positions are correct depending on the window position

    if ((m_nBorderPos == TAB_BORDER_BOTTOM) || (m_nBorderPos == TAB_BORDER_TOP))
    m_nYpos = 0;
    else if (m_nBorderPos == TAB_BORDER_RIGHT) // Add Kim
    // Get the right X pos start.
    int cxScreen = GetSystemMetrics(SM_CXSCREEN);
    m_nXpos = cxScreen - m_nInitialWidth - m_nTabHeight;
    else // TAB_BORDER_LEFT
    m_nXpos = 0;

  • Will it work with parents other than the desktop?

    Posted by Legacy on 07/13/2001 12:00am

    Originally posted by: Peter Ritchie

    Will it work as a non-modal dialog with a parent other than the desktop?

  • How to resize the dialogue ?

    Posted by Legacy on 05/31/2001 12:00am

    Originally posted by: Baptiste Pierard

    Congratulation for this great code.
    In one of this dialog, I draw a TreeView. Sometimes, instead of the scrollbar, I would like to enlarge the dialog. How can I do that ? I try to change the Wnd property to Resizable, but the region need to be updated?
    Can you help me ???


    Baptiste ;-)

  • How to Remove The your dialog

    Posted by Legacy on 04/19/2001 12:00am

    Originally posted by: Rajesh Ugemuge

    How to remove ur dialog so that only my dialog should work

  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date