Click here to Skip to main content
15,880,608 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 476.7K   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

 
GeneralA problem with refresh [modified] Pin
yyyzlf30-Nov-09 22:22
yyyzlf30-Nov-09 22:22 
when the other windows overlap the explorebar,it will not display correctly.
In class CExpBarXP add timer events
1.add a timer
<br />
int CExpBarXP::OnCreate(LPCREATESTRUCT lpCreateStruct) <br />
 SetTimer(1,50,NULL);<br />

2.response WM_ONTIMER
<br />
void CExpBarXP::OnTimer(UINT nIDEvent) <br />
{<br />
  // TODO: Add your message handler code here and/or call default<br />
  UpdateWindow();<br />
  _baseclassExpBarXP::OnTimer(nIDEvent);<br />
}<br />

3.release timer
<br />
void CExpBarXP::OnDestroy() <br />
{<br />
  KillTimer(1);	<br />
}<br />


modified on Thursday, December 10, 2009 8:28 PM

QuestionWindows 7? Pin
Stefan Dahlin28-Oct-09 5:32
Stefan Dahlin28-Oct-09 5:32 
AnswerRe: Windows 7? Pin
Member 850700522-Dec-11 4:39
Member 850700522-Dec-11 4:39 
QuestionI can't build this project!Why? Pin
hunzaixa16-Apr-08 23:01
hunzaixa16-Apr-08 23:01 
Generali can not build this project, pls help me. Pin
thuong1012773-Mar-08 19:11
thuong1012773-Mar-08 19:11 
Generalnice control Pin
an77777-Nov-07 16:58
an77777-Nov-07 16:58 
QuestionVISTA ? Pin
Michael Chourdakis21-Jun-07 7:14
mvaMichael Chourdakis21-Jun-07 7:14 
Generalerror Pin
aldo hexosa6-May-07 12:58
professionalaldo hexosa6-May-07 12:58 
GeneralShareable Section created by the linker Pin
Michael Chourdakis24-Apr-07 7:29
mvaMichael Chourdakis24-Apr-07 7:29 
GeneralRe: Shareable Section created by the linker Pin
Michael Chourdakis24-Apr-07 7:44
mvaMichael Chourdakis24-Apr-07 7:44 
QuestionA big error Pin
yhw198504011-Apr-07 16:52
yhw198504011-Apr-07 16:52 
Generalexplorer bar width Pin
manuel3579-Feb-07 8:33
manuel3579-Feb-07 8:33 
GeneralRe: explorer bar width Pin
Tornado8a15-Aug-07 22:45
Tornado8a15-Aug-07 22:45 
GeneralLoad C runtime library without using manifest Pin
sunika12-Nov-06 4:24
sunika12-Nov-06 4:24 
QuestionDisable TaskLink32? Pin
Stefan Dahlin6-Sep-06 1:48
Stefan Dahlin6-Sep-06 1:48 
Generalvs2005 error! Pin
kurome29-May-06 16:11
kurome29-May-06 16:11 
GeneralRe: vs2005 error! Pin
New_Rulz31-May-06 1:39
New_Rulz31-May-06 1:39 
GeneralRe: vs2005 error! Pin
kurome4-Jun-06 14:42
kurome4-Jun-06 14:42 
QuestionHow can I prevent closing the Explorer bar Pin
frewah27-May-06 13:01
frewah27-May-06 13:01 
AnswerRe: How can I prevent closing the Explorer bar Pin
frewah27-May-06 13:38
frewah27-May-06 13:38 
QuestionToo many paint messages Pin
gunag3-May-06 2:16
gunag3-May-06 2:16 
AnswerRe: Too many paint messages Pin
nanfang28-Sep-07 6:28
nanfang28-Sep-07 6:28 
QuestionHow to change the style on the fly (kind of a solution) Pin
Lars [Large] Werner19-Apr-06 7:29
professionalLars [Large] Werner19-Apr-06 7:29 
QuestionAgain Hiding/Showing problem Pin
gunag7-Apr-06 4:20
gunag7-Apr-06 4:20 
GeneralUpdate on the problem: Again Hiding/Showing problem Pin
gunag7-Apr-06 4:58
gunag7-Apr-06 4: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.