Click here to Skip to main content
15,885,914 members
Articles / Desktop Programming / MFC
Article

XP style Explorer Bar (Win32/MFC)

Rate me:
Please Sign up or sign in to vote.
4.86/5 (54 votes)
4 Mar 20042 min read 477.2K   9.2K   146   154
Implementation of a shellstyle.dll aware XP Windows Explorer Bar

Image 1

Introduction

This article presents a full implementation of the Windows XP Explorer Bar as a set of Win32 controls and a MFC wrapper. The Explorer Bar works on Windows 98/Me/2k/XP and is fully shellstyle.dll aware, i.e. can be used with any XP visual theme (standard, 3rd party non-standard, and the classic Windows scheme).

The new custom controls include extended button controls, extended static controls, tasklink controls, and collapsible header controls.

Background

The Windows Explorer that comes with Windows XP introduces a fancy new control bar called "Explorer Bar". The bar handles one or more collapsible panes containing tasklinks or informative text and having a collapsible header control.

The Explorer Bar is neither exported by any API nor uses it the standard XP theme renderer. All bitmaps and metrics reside in specialized DLLs named "shellstyle.dll".

The implementation presented here has a full parser for this non-standard information and a highly sophisticated rendering engine allowing fade and roll effects to be applied to expanding/collapsing panes.

Using the code

The zip archive contains a Platform SDK like HTMLHelp file (explorerbar.chm) with the full documentation (Win32/MFC). You must build all configurations of explorerbar.dsw before using the library. If you are interested in the sample application, then build ExpBarSample.dsw as well.

After building all configurations of explorerbar.dsw you find the library in "explorerbar\lib" and the MFC wrapper in "explorerbar\lib\MFC".

General comments, points of interest

Approx. 18.000 lines of code needed to be written in order to support all functionalities of the Windows XP Explorer Bar, i.e. expect bug-fixes!

Even if the Explorer Bar will be exported in the future by an API, it will not work under Windows 98/Me/2k because it will probably use a new XP theme renderer tightly linked to Windows XP.

One big TODO item is a pure MFC version of the Explorer Bar. This would simplify the message handling stated in the Explorer Bar SDK (HTMLHelp). The current implementation (explorerbar.dll) has been written for Win32 applications for maximum platform support.

History

Version 1.0 is the first published version of the Explorer Bar. It is embedded in the great sizeable control bar by Cristi Posea.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior)
Germany Germany
Dipl.-Inform., 26 years experience (1985-2011) in coding/software development (C/C++/C#/Java/x86-Assembler), experienced in Win32/MFC/WPF development, UNIX (Linux/Solaris), and especially in IT-security

Comments and Discussions

 
GeneralRe: Crashes in Vista Pin
JamieRThomson29-May-07 4:12
JamieRThomson29-May-07 4:12 
GeneralRe: Crashes in Vista Pin
Michael Chourdakis19-Oct-07 9:27
mvaMichael Chourdakis19-Oct-07 9:27 
QuestionWin32 Pin
HarePorter4-Mar-06 3:26
HarePorter4-Mar-06 3:26 
QuestionControl CBStatic32 Object Pin
yhcha13-Feb-06 0:15
yhcha13-Feb-06 0:15 
AnswerRe: Control CBStatic32 Object Pin
gunag9-Mar-06 21:01
gunag9-Mar-06 21:01 
GeneralRe: Control CBStatic32 Object Pin
Joeny1-May-06 3:44
Joeny1-May-06 3:44 
GeneralMemory Leak Pin
Alexander Gräf3-Oct-05 14:24
Alexander Gräf3-Oct-05 14:24 
GeneralRe: Memory Leak Pin
melcug25-Jan-06 6:20
melcug25-Jan-06 6:20 
You can check some messages posted by me on 7 Jul '04 and on 13 Jul '04 about a lot of memory leaks and resource error fixes for this beautiful control:
http://www.codeproject.com/docking/IngoExpBar.asp?df=100&forumid=34098&fr=26&select=869512#xx869512xx[^]

Best regards,
Mugurel Nechita (nechitam@yahoo.com)
GeneralWould it be possible Pin
Stefan Dahlin27-Sep-05 23:02
Stefan Dahlin27-Sep-05 23:02 
GeneralSuch a nice control, but such a coding mess Pin
Alexander Gräf26-Sep-05 3:18
Alexander Gräf26-Sep-05 3:18 
GeneralRe: Such a nice control, but such a coding mess Pin
Ingo A. Kubbilun26-Sep-05 3:35
Ingo A. Kubbilun26-Sep-05 3:35 
GeneralRe: Such a nice control, but such a coding mess Pin
Alexander Gräf26-Sep-05 3:51
Alexander Gräf26-Sep-05 3:51 
GeneralThe image is not displaying properly. Pin
santhu_sindhu18-Aug-05 20:14
santhu_sindhu18-Aug-05 20:14 
GeneralUpdate ExplorerBar Pin
Puhhbaerchen10-Jul-05 5:18
Puhhbaerchen10-Jul-05 5:18 
GeneralRe: Update ExplorerBar Pin
Ingo A. Kubbilun10-Jul-05 22:33
Ingo A. Kubbilun10-Jul-05 22:33 
Generalcompile questions Pin
vaccy30-May-05 21:16
vaccy30-May-05 21:16 
GeneralRe: compile questions Pin
Ingo A. Kubbilun30-May-05 21:52
Ingo A. Kubbilun30-May-05 21:52 
GeneralRe: compile questions Pin
vaccy31-May-05 20:33
vaccy31-May-05 20:33 
GeneralRe: compile questions Pin
Ingo A. Kubbilun31-May-05 23:45
Ingo A. Kubbilun31-May-05 23:45 
GeneralRe: compile questions Pin
BFSer2-Jun-05 6:26
BFSer2-Jun-05 6:26 
QuestionPosible to Manually Set Background Color? Pin
j.jonez25-May-05 13:39
j.jonez25-May-05 13:39 
AnswerRe: Posible to Manually Set Background Color? Pin
Ingo A. Kubbilun30-May-05 22:03
Ingo A. Kubbilun30-May-05 22:03 
GeneralWTL ExplorerBar Pin
Ralph Wetzel25-Mar-05 22:38
Ralph Wetzel25-Mar-05 22:38 
GeneralFix for bitmaps whose width is not DWORD aligned Pin
Kristinm18-Feb-05 1:53
Kristinm18-Feb-05 1:53 
GeneralRe: Fix for bitmaps whose width is not DWORD aligned Pin
Kristinm18-Feb-05 1:58
Kristinm18-Feb-05 1:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.