Application Desktop Toolbar (Appbar)
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:00amOriginally posted by: Yong Teng
Keep working! Buddy
ReplyExcellant Stuff
Posted by Legacy on 09/11/2000 12:00amOriginally 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.
ReplyMany thanks
Posted by Legacy on 05/04/2000 12:00amOriginally 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.
ReplyThe sample project doesn't work - why?
Posted by Legacy on 04/20/2000 12:00amOriginally 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
ReplyBracknell, England
It's very useful for me !!
Posted by Legacy on 03/22/2000 12:00amOriginally posted by: Li Liu
ReplyThnx, BUT...
Posted by Legacy on 02/04/2000 12:00amOriginally 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)
ReplyThis is nice, but....
Posted by Legacy on 01/13/2000 12:00amOriginally 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.
ReplyAnyone Know how to do this in Vbasic
Posted by Legacy on 11/15/1999 12:00amOriginally posted by: AragorN StrideR
Every site gives the c source of appbar.
Anyone Know how to do this in Vbasic?
ReplyOne question about Appbar and Desktop
Posted by Legacy on 09/21/1999 12:00amOriginally 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?
ReplyVery useful... but there's a slight bug
Posted by Legacy on 08/24/1999 12:00amOriginally 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 ...