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



Comments

  • Excellent job

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

    Originally posted by: Yong Teng

    Keep working! Buddy

    Reply
  • 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 http://www.caltiger.com. And believe me, it's popular.

    Thanks once again.

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


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

    Reply
  • It's very useful for me !!

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

    Originally posted by: Li Liu

    Thank you vey much !!!
    

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

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

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

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

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

    Adding:

    m_rcDrag = m_pAppBar->m_rcAppBar;

    to OnLButtonDown() will fix it.

    Reply
  • Loading, Please Wait ...

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

Top White Papers and Webcasts

  • The explosion in mobile devices and applications has generated a great deal of interest in APIs. Today's businesses are under increased pressure to make it easy to build apps, supply tools to help developers work more quickly, and deploy operational analytics so they can track users, developers, application performance, and more. Apigee Edge provides comprehensive API delivery tools and both operational and business-level analytics in an integrated platform. It is available as on-premise software or through …

  • Java developers know that testing code changes can be a huge pain, and waiting for an application to redeploy after a code fix can take an eternity. Wouldn't it be great if you could see your code changes immediately, fine-tune, debug, explore and deploy code without waiting for ages? In this white paper, find out how that's possible with a Java plugin that drastically changes the way you develop, test and run Java applications. Discover the advantages of this plugin, and the changes you can expect to see …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds