Index: src/ch/DirTreeCtrl.h =================================================================== diff -u -rd5c3edd0d167db9b5d47d04248820fda49499a5e -r541304f4e098b4c7617b718287ab40646d5deb92 --- src/ch/DirTreeCtrl.h (.../DirTreeCtrl.h) (revision d5c3edd0d167db9b5d47d04248820fda49499a5e) +++ src/ch/DirTreeCtrl.h (.../DirTreeCtrl.h) (revision 541304f4e098b4c7617b718287ab40646d5deb92) @@ -64,11 +64,8 @@ #ifndef __DIRTREECTRL_H__ #define __DIRTREECTRL_H__ -#include "shlobj.h" - // Functions that deal with PIDLs LPITEMIDLIST ConcatPidls(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); -LPITEMIDLIST GetFullyQualPidl(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi); LPITEMIDLIST CopyITEMID(LPMALLOC lpMalloc, LPITEMIDLIST lpi); BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPTSTR lpFriendlyName); LPITEMIDLIST CreatePidl(UINT cbSize); @@ -89,8 +86,8 @@ LPSHELLFOLDER lpsf; // this shell folder (always exists) LPITEMIDLIST lpiidl; // this item id list relative to desktop (always exists) - LPSHELLFOLDER lpsfParent; // parent shell folder (may be NULL) - LPITEMIDLIST lpiidlRelative; // this item id list relative to the parent's lpsf (may be NULL) + LPSHELLFOLDER lpsfParent; // parent shell folder (may be nullptr) + LPITEMIDLIST lpiidlRelative; // this item id list relative to the parent's lpsf (may be nullptr) }; class CDirTreeCtrl : public CTreeCtrl @@ -109,8 +106,8 @@ // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CDirTreeCtrl) protected: - virtual void PreSubclassWindow(); - virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); + void PreSubclassWindow() override; + LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam) override; //}}AFX_VIRTUAL // Implementation @@ -125,12 +122,14 @@ bool GetItemInfoTip(HTREEITEM hItem, CString* pTip); bool GetItemShellData(HTREEITEM hItem, int nFormat, PVOID pBuffer, int iSize); bool GetItemStruct(HTREEITEM hItem, PSHELLITEMDATA *ppsid); - bool IsEditing() const { return m_iEditType != 0; }; + bool IsEditing() const { return m_iEditType != 0; } virtual ~CDirTreeCtrl(); +private: + static int GetSysIconIndex(LPITEMIDLIST item, bool bOpenIcon); + // Generated message map functions protected: - bool RegisterWindowClass(); friend int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM/* lParamSort*/); //{{AFX_MSG(CDirTreeCtrl) @@ -151,17 +150,16 @@ protected: void InitControl(); HTREEITEM RegularSelect(HTREEITEM hStart, LPCTSTR lpszPath); -// HTREEITEM TraverseNetNode(HTREEITEM hItem, LPCTSTR lpszPath, LPTSTR lpszBuffer); bool ComparePaths(LPCTSTR lpszFull, LPCTSTR lpszPartial); -// bool SetRemotePath(LPCTSTR lpszPath); bool SetLocalPath(LPCTSTR lpszPath); HRESULT FillNode(HTREEITEM hParent, LPSHELLFOLDER lpsf, LPITEMIDLIST lpidl, bool bSilent=false); - bool m_bIgnoreShellDialogs; // ignore dialogs of type 'insert floppy disk' - HIMAGELIST m_hImageList; // system img list - HTREEITEM m_hDrives, m_hNetwork; // my computer's and net neighbourhood's handles - bool m_bIgnore; // ignore the nearest adding of items in OnItemexpanding - int m_iEditType; // type of item editing (0-doesn't exist (nothing for edit), 1-new folder) + bool m_bIgnoreShellDialogs = true; // ignore dialogs of type 'insert floppy disk' + HIMAGELIST m_hImageList = nullptr; // system img list + HTREEITEM m_hDrives = nullptr; + HTREEITEM m_hNetwork = nullptr; // my computer's and net neighbourhood's handles + bool m_bIgnore = false; // ignore the nearest adding of items in OnItemexpanding + int m_iEditType = 0; // type of item editing (0-doesn't exist (nothing for edit), 1-new folder) }; /////////////////////////////////////////////////////////////////////////////