IDirList Interface

Manages the appearance and actions of a displayed directory list.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

[GuidAttribute("07F86395-273C-11D7-8BF6-00B0D03DAA06")]
public interface IDirList

The IDirList type exposes the following members.

  NameDescription
Public methodAddAdds a string to a directory list.
Public methodget_CountGets the number of items in the directory list.
Public methodget_DescriptionReturns the description of the directory list.
Public methodget_HWNDReturns the HWND of the directory list.
Public methodget_TitleGet the title of the directory list.
Public methodindexRetrieves an item, by position, from the directory list.
Public methodput_DescriptionChanges the description of the directory list.
Public methodput_ShowCheckShow or hide the checkbox next to each item in the list.
Public methodput_ShowTitleShow or hide the title of the directory list.
Public methodput_TitleChange the title of the directory list.
Public methodResetGo back to the default values for the directory list.
Top

In order to get an instance of this interface, you must create a CAxWindow and then call QueryControl, as with the code below. (You can find the definition of CAxWindow in atlwin.h.)

CComPtr<IUnknown> pUnk;

m_pServiceProvider->QueryService(SID_SDirList, IID_IUnknown, (void **)&pUnk);
CAxWindow wndDirList;
RECT rectChild = { 0, 26, 263, 151 };

wndDirList.Create(
    m_hWnd, 
    rectChild, 
    CComBSTR(__uuidof(DirList)),
    WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
    0, 
    IDC_DIRCONTROL);    //this can be any number that is unique among the controls of the parent window

CComPtr<IDirList> srpList;
wndDirList.QueryControl(&srpList);

CComQIPtr<IDirListSite> srpListSite = srpList;

if (srpListSite)
srpListSite->SetSite(m_pServiceProvider);
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft