Application Desktop Toolbar (Appbar)

I have written a sample appbar application. Below is the step-by-step instruction on implementing it.

1. Download source.

2. Add AppBar.cpp, AppBar.h, ApBarDlg.cpp, ApBarDlg.h, Utility.cpp and Utility.h to project.

3. Derive a class from CAppBarDialog using IDD_APPBAR (or your own dialog in the resource). This dialog will contain all the controls in your appbar. You may prefer to derive from a CWnd in which case you should move all the message handlers from CAppBarDialog to your derived CWnd class. For simplicity, we will use CDialog here.

4. To show the appbar, you may put the create it anywhere in your program depending on when you would like for it to launch. In this example, it will launch when the user hits the "Show" button (BN_CLICKED on IDOK) on the main dialog and destroyed on exit.

5. Look at the implementation of OnDestroy and OnOK to see how the appbar is created and destroyed.

You may also download entire sample project.

Posted on : 3/15/98


  • Excellent job

    Posted by Legacy on 10/05/2000 12:00am

    Originally posted by: Yong Teng

    Keep working! Buddy

  • Excellant Stuff

    Posted by Legacy on 09/11/2000 12:00am

    Originally posted by: Partha Sarathi Dhar

    This is simply excellant. I've extended your logic to implement a full fledged Ad Bar. Its called FreeInstaller and is available for download at And believe me, it's popular.

    Thanks once again.

  • Many thanks

    Posted by Legacy on 05/04/2000 12:00am

    Originally posted by: Francesco

    Your application has been very usefull.
    Nobody problems with the different versions of VC++.
    I have just proove it, and i must say to you thank because you give me the just channel to proceed forward in my interesting project.
    Many congratulations.

  • The sample project doesn't work - why?

    Posted by Legacy on 04/20/2000 12:00am

    Originally posted by: Bob Sather

    I downloaded the sample project and built it in Visual C++ 6.0, under NT 4.0. It behaves oddly. The appbar appears, but it can't be resized or dragged to another edge of the screen. Also, the 'autohide' and 'always on top' buttons don't seem to work. I can't figure out what the 'turbomatt' button is for.

    Has anyone else had these same problems?

    Bob Sather
    Bracknell, England

  • It's very useful for me !!

    Posted by Legacy on 03/22/2000 12:00am

    Originally posted by: Li Liu

    Thank you vey much !!!

  • Thnx, BUT...

    Posted by Legacy on 02/04/2000 12:00am

    Originally posted by: Raist

    Thnx But wot if im working Outside the MFC framework?

    i've tried "modifing" your code to fit. but it seems that its more work than BASE Inheritance (Which i Still cant get working)

  • This is nice, but....

    Posted by Legacy on 01/13/2000 12:00am

    Originally posted by: Joshua Schaeffer

    This has been copied from the example available on the MSDN website, and leaves the same basic problem: it doesn't allow you to resize when on AutoHide mode.

    Can anyone add this functionality? I'm straining my brain as to how to implement it on my own, because the current example is spaghetti code.

  • Anyone Know how to do this in Vbasic

    Posted by Legacy on 11/15/1999 12:00am

    Originally posted by: AragorN StrideR

    Every site gives the c source of appbar.

    Anyone Know how to do this in Vbasic?

  • One question about Appbar and Desktop

    Posted by Legacy on 09/21/1999 12:00am

    Originally posted by: Krzysztof Zwirek

    I would like to use in one "MDI application": Appbar class and use this functions: CreateDesktop, Switch Desktop to create other desktop where I will have only my MDI application as Appbar. I tried to use this class and these functions in one application but I can use only Appbar class or functions for creating desktops. How could I use it in one application?

  • Very useful... but there's a slight bug

    Posted by Legacy on 08/24/1999 12:00am

    Originally posted by: Matt Scheybeler

    Very useful class, saved me a lot of time.

    Unfortunately there is a slight bug in the appbar dragging code in CAppBarDlg. It manifests itself in the following way:

    When the appbar has been attached to an edge for the first time, when the user clicks (without moving the mouse), the desktop resizes back to normal state behind the appbar. If the appbar is dragged or clicked on again, the desktop resizes properly.

    The reason for this is that if CAppBarDlg::OnLButtonUp() is called without a call to OnMouseMove(), m_rcDrag has not been initialised.


    m_rcDrag = m_pAppBar->m_rcAppBar;

    to OnLButtonDown() will fix it.

  • Loading, Please Wait ...

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

Top White Papers and Webcasts

  • Data integrity and ultra-high performance dictate the success and growth of many companies. One of these companies is BridgePay Network Solutions, a recently launched and rapidly growing financial services organization that allows merchants around the world to process millions of daily credit card transactions. Due to the nature of their business, their IT team needed to strike the perfect balance between meeting regulatory-mandated data security measures with the lowest possible levels of latency and …

  • Companies undertaking an IT project need to find the right balance between cost and functionality. It's important to start by determining whether to build a solution from scratch, buy an out-of-the-box solution, or a combination of both. In reality, most projects will require some system tailoring to meet business requirements. Decision-makers must understand how much software development is enough and craft a detailed implementation plan to ensure the project's success. This white paper examines the different …

Most Popular Programming Stories

More for Developers

RSS Feeds

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