Tabbed Dialog Box Class

Environment: Windows NT4.0. SP5

Introduction

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 :
      • TAB_BORDER_LEFT
      • TAB_BORDER_RIGHT
      • TAB_BORDER_TOP
      • TAB_BORDER_BOTTOM
    • 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.

Downloads

Download demo project - 36 Kb
Download source - 8 Kb


Comments

  • 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=http://coachoutletblogs.com/]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=http://coachoutletblogs.com/]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=http://coachoutletblogs.com/]coach outlet blog[/url] a kind, Poketo's bags and wallets are interesting to look at and fun to carry. [url=http://coachoutletblogs.com/]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.

    Reply
  • 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=http://www.reelia.co.uk/]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=http://www.reelia.co.uk/]karen [url=http://www.reelia.co.uk/]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=http://www.reelia.co.uk/]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.

    Reply
  • 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=http://iloveshirt.webs.com]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=http://iloveshirt.webs.com]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

    Reply
  • 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=http://worldcupsoccerfacts.info/]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=http://worldcupsoccerfacts.info/]2014 brazil world cup soccer jerseys[/url] Sept. 11 at the New York [url=http://worldcupsoccerfacts.info/]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.

    Reply
  • 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

    Reply
  • Correction for multiple monitors

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

    Originally posted by: prc

    Be sure to change all occurances of:

    SM_CXSCREEN
    SM_CYSCREEN

    to

    SM_CXVIRTUALSCREEN
    SM_CYVIRTUALSCREEN

    (this goes for Kim's fix as well)

    Reply
  • 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;

    Reply
  • 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?


    Reply
  • 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 ???

    Thanks,

    Baptiste ;-)


    Reply
  • 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

    Reply
  • Loading, Please Wait ...

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

Top White Papers and Webcasts

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

  • Packaged application development teams frequently operate with limited testing environments due to time and labor constraints. By virtualizing the entire application stack, packaged application development teams can deliver business results faster, at higher quality, and with lower risk.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds