home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Shareware / Programare / magiccd / mcdbc111t.exe / %MAINDIR% / MFC / FileDropListCtrl.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-03-08  |  1.5 KB  |  56 lines

  1. #if !defined(AFX_FileDropListCtrl_H__55F59001_AD5F_11D3_9DA4_0008C711C6B6__INCLUDED_)
  2. #define AFX_FileDropListCtrl_H__55F59001_AD5F_11D3_9DA4_0008C711C6B6__INCLUDED_
  3.  
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif // _MSC_VER > 1000
  7.  
  8. class CFileDropListCtrl : public CListCtrl
  9. {
  10. public:
  11.     CFileDropListCtrl();
  12.     virtual ~CFileDropListCtrl();
  13.  
  14.     enum DLDropFlags
  15.     {
  16.         DL_ACCEPT_FILES =       0x01,
  17.         DL_ACCEPT_FOLDERS =        0x02,
  18.         DL_ALLOW_DUPLICATES =    0x04,
  19.         DL_FOLDER_TYPE =        0x10,
  20.         DL_FILE_TYPE =            0x20
  21.     };
  22.  
  23.     BOOL SetDropMode(const CFileDropListCtrl::UINT& iMask);
  24.     UINT GetDropMode() const
  25.     {
  26.         return m_dropMode;
  27.     };
  28.  
  29. protected:
  30.     //{{AFX_MSG(CFileDropListCtrl)
  31.     afx_msg void OnDropFiles(HDROP dropInfo);
  32.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  33.     //}}AFX_MSG
  34.     DECLARE_MESSAGE_MAP()
  35.  
  36.     virtual int InsertPathname(const CString& csFilename);
  37.  
  38. private:
  39.     UINT iMask;
  40.     UINT m_dropMode;
  41.     BOOL m_bMustUninitOLE;
  42.  
  43.     CString ExpandShortcut(CString& csFilename) const;
  44.     BOOL ValidatePathname(const CString& csPathname, UINT& iPathType) const;
  45.  
  46.     CFileDropListCtrl& operator=(const CFileDropListCtrl& x);
  47.     CFileDropListCtrl(const CFileDropListCtrl& x);
  48. };
  49.  
  50. /////////////////////////////////////////////////////////////////////////////
  51.  
  52. //{{AFX_INSERT_LOCATION}}
  53. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  54.  
  55. #endif // !defined(AFX_FileDropListCtrl_H__55F59001_AD5F_11D3_9DA4_0008C711C6B6__INCLUDED_)
  56.