Click here to Skip to main content
Click here to Skip to main content

SeaShell - More Explorer controls

, 3 Oct 2000
Rate this:
Please Sign up or sign in to vote.
A set of shell controls and other useful classes
<!-- Link to demo file download -->
  • Download demo project - 277 Kb
  • <!-- Article image -->

    Sample Image - seashell.jpg

    <!-- Add the rest of your HTML here -->

    Introduction

    SeaShell contains a set of classes that provides three main controls

    • CIEShellTreeCtrl
    • CIEShellListCtrl
    • CIEShellComboBox

    They can be used independently or integrated as in Explorer


    Features

    • Full drag and drop support including right button and drag and drop to/from windows explorer
    • Context menu support including Owner Draw,SendTo and the new OpenWith(W2K only) menus
    • Auto refresh from both tree and list controls
    • Filter support using wild cards eg. *.cpp *.htm or based on file type
    • Uses settings from explorer to show compressed files in a different color,double click to open file etc.
    • Complete integration between all three controls


    History

    First version so expect problems

    Usage

    First you must include SeaShellExt.h in your stdafx.h file and you will need all the files included in the sub folder SeaShellExt except for the frame and view files if you intend to use it only in a dialog box. The demo shows you how to use it in a frame window and a dialog box.

    This is what you need to do to add all the controls to a dialog box

    Add this code to the OnInitDIalog function

       // Point the combo box to the tree control(optional)
       m_cbShell.SetTreeCtrlWnd(m_tcShell.GetSafeHwnd());
    
       // Point the tree control to the list control(optional)
       m_tcShell.SetListCtrlWnd(m_lcShell.GetSafeHwnd());
    
       // Point the tree control to the combo box(optional)
       m_tcShell.SetComboBoxWnd(m_cbShell.GetSafeHwnd());
    
       // Populate the tree starting from the desktop
       m_tcShell.LoadFolderItems();
    
       // or populate the tree starting from a system file path
       // m_tcShell.LoadFolderItems(_T("C:\\folder1\\folder2"));
    

    To hook up the controls in CView check out the demo it comes with classes CIEShellTreeView and CIEShellListView that you can use.

    The about box has a demo of the list control without shell support that adds a progress bar to a column in a similar fashion to napster if any one has seen it. Thanks to Chris Maunder for his CTextProgressCtrl which I slightly modified.

    There is limited support for CHtmlView to show the web browser when you click on the Internet Explorer folder. But this won't work in in a dialog.


    Acknowledgments

    It also includes some files form other sources most notably

  • CoolMenu from Paul DiLascia(MSJ)
  • ShellContextMenu from Oz Solomonovich(WndTabs)
  • InPlaceEdit from Zafir Anjum (Codeguru)


  • and some other snippets, but I can't remember from where.

    Thanks guys

    If anyone wants to convert it to an MFC extension DLL there is a macro CTRL_EXT_CLASS that is used in most classes that will help.

    One final note I compiled using the platform SDK for W2K but I have included a file W2KFix.h that defines the COM interfaces that it needs.

    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

    About the Author

    Philip Oldaker

    New Zealand New Zealand
    No Biography provided

    Comments and Discussions

     
    Questioncool, PinmemberXiaoK Lin25-Apr-12 3:55 
    GeneralIt's best for me. [modified] PinmemberRacuca24-Apr-11 15:35 
    QuestionIts release version is fine, but the debug version does not work. Does anybody know how to solve this problem? Pinmemberlaolonga18-Oct-08 11:29 
    GeneralNeed help, please! PinmemberCrocodileBuck26-May-08 6:49 
    GeneralRe: Need help, please! PinmemberCrocodileBuck27-May-08 4:31 
    QuestionAsk for getting folder's IContextMenu2 interface and show it? Pinmemberhiker13-Jan-08 23:59 
    GeneralOpening folders in the tree control. Pinmemberawinter8-Jan-08 6:04 
    GeneralDoesn't compiles in VS2005! Pinmembera_b_pathak17-Jun-07 23:34 
    GeneralRe: Doesn't compiles in VS2005! Pinmemberchenxuan078-Sep-08 20:41 
    GeneralRe: Doesn't compiles in VS2005! Pinmemberchenxuan078-Sep-08 23:00 
    QuestionCan't drag tree items in dialog project Pinmembernanfang20-May-07 8:23 
    QuestionMay I use it in my commercial applications? Pinmembernanfang7-May-07 3:02 
    Questiongood project,if you can write a control,it will perfect Pinmemberchenjian14-Aug-06 15:52 
    GeneralThe style of Windows XP Pinmembertakayuki san19-Jul-06 20:59 
    GeneralWill not compile, needs improvements... PinmemberFred Ackers23-May-06 7:25 
    GeneralAutoRefresh Pinmemberfabiocannizzo3-Apr-05 10:06 
    QuestionNice project, what about the bugs ? PinsussGnarf4-Mar-04 7:38 
    Generalthe classes very good, but have some bugs Pinmemberuse_id27-Oct-03 3:10 
    GeneralRe: the classes very good, but have some bugs Pinmemberandytork4-Nov-04 16:51 
    GeneralSeaShell: Use and evolution PinmemberMoby19-May-03 1:50 
    General+ Sign at subfolders PinmemberRuben_Uniek12-Mar-03 21:16 
    GeneralI get an error message when compling PinmemberE312-Dec-02 16:12 
    GeneralRe: I get an error message when compling PinmemberNaoaki Okazaki18-Jan-03 3:37 
    AnswerRe: I get an error message when compling Pinmembermaxim_violin24-Nov-07 18:54 
    Generalmemory leak Pinmemberwlfjck31-Oct-02 22:03 
    GeneralUnicode version error! PinsussAnonymous31-Oct-02 21:37 
    QuestionHelp: F5 crash in explorer dialog, any idea? PinmemberGregoire8-Oct-02 15:25 
    AnswerRe: Help: F5 crash in explorer dialog, any idea? PinmemberGregoire8-Nov-02 6:55 
    GeneralMaking it Open up folders in Itself. PinmemberJawache9-Aug-02 3:06 
    GeneralOpen a folder programmatically PinmemberVinicius Pontes27-Jul-02 4:44 
    GeneralRe: Open a folder programmatically PinsussAnonymous6-Oct-02 20:48 
    GeneralRe: Open a folder programmatically Pinmembernanfang16-Jun-07 18:53 
    GeneralThumbnails PinmemberToni Salas27-Jun-02 22:08 
    GeneralRefresh fixed Pinmembermad7925-Apr-02 0:25 
    GeneralCan't build it in VS.Net. Need help. PinmemberTigerWings10-Apr-02 15:21 
    GeneralRe: Can't build it in VS.Net. Need help. PinmemberAbraxas2314-Dec-03 7:39 
    GeneralGetItemText always return text for first item in list PinmemberAnonymous28-Feb-02 3:50 
    GeneralRe: GetItemText always return text for first item in list PinmemberRex Lee5-Jun-03 20:58 
    GeneralRe: GetItemText always return text for first item in list Pinmembernanfang16-Jun-07 18:45 
    GeneralRe: GetItemText always return text for first item in list Pinmembernanfang16-Jun-07 18:48 
    GeneralBug Fix for CIEShellListCtrl::Populate(LPCTSTR pszPath, bool bCallBack) PinmemberDion Loy3-Dec-01 12:16 
    GeneralOpens New Window to display Sub folder instead of displaying it in the List View PinmemberMaria Jothi3-Oct-01 22:25 
    GeneralRe: Opens New Window to display Sub folder instead of displaying it in the List View PinsussLawes Lee31-Oct-02 15:56 
    GeneralOpening Window PinmemberMaria Jothi3-Oct-01 22:00 
    GeneralClicking any item on the List View creates a Window a display the sub folder PinmemberMaria Jothi12-Sep-01 1:26 
    Generalws_ftp pro folders PinmemberAnonymous9-Aug-01 15:31 
    GeneralFix to allow project to work on Win95/NT PinsussJames Martin4-Oct-00 11:32 
    GeneralCannot Unzip the file using WinZip 8.0 PinsussKrishna Prasad T18-Aug-00 0:04 
    GeneralGetLongPathName() not exported from Win95 Kernel32.dll PinsussBenjamin Ng16-Aug-00 1:14 
    GeneralRe: GetLongPathName() not exported from Win95 Kernel32.dll PinsussPhilip Oldaker16-Aug-00 5:34 

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

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

    | Advertise | Privacy | Mobile
    Web02 | 2.8.140721.1 | Last Updated 4 Oct 2000
    Article Copyright 2000 by Philip Oldaker
    Everything else Copyright © CodeProject, 1999-2014
    Terms of Service
    Layout: fixed | fluid