00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_CTRLMEDIALIST_H__342211C4_F17F_451C_97C7_1BBE4BF2969F__INCLUDED_)
00023 #define AFX_CTRLMEDIALIST_H__342211C4_F17F_451C_97C7_1BBE4BF2969F__INCLUDED_
00024
00025 #pragma once
00026
00027 #include "CtrlLibraryTip.h"
00028
00029
00030 class CMediaListCtrl : public CListCtrl
00031 {
00032
00033 public:
00034 CMediaListCtrl();
00035 virtual ~CMediaListCtrl();
00036
00037 DECLARE_DYNAMIC(CMediaListCtrl)
00038
00039
00040 protected:
00041 CImageList* m_pDragImage;
00042 int m_nDragDrop;
00043 BOOL m_bCreateDragImage;
00044 protected:
00045 CLibraryTipCtrl m_wndTip;
00046
00047
00048 protected:
00049 int Add(LPCTSTR pszPath, int nItem = -1);
00050 void Remove(int nItem);
00051 public:
00052 BOOL Open(LPCTSTR pszFile);
00053 BOOL Enqueue(LPCTSTR pszFile, BOOL bStart = TRUE);
00054 int RecursiveEnqueue(LPCTSTR pszPath);
00055 void Remove(LPCTSTR pszFile);
00056 BOOL LoadTextList(LPCTSTR pszFile);
00057 int GetCount();
00058 void Clear();
00059 int GetCurrent();
00060 void SetCurrent(int nCurrent);
00061 int GetNext(BOOL bSet = TRUE);
00062 void Reset(BOOL bNext = TRUE);
00063 CString GetPath(int nItem);
00064
00065
00066 public:
00067
00068 public:
00069 virtual BOOL Create(CWnd* pParentWnd, UINT nID);
00070
00071
00072
00073 protected:
00074
00075 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00076 afx_msg void OnDoubleClick(NMHDR* pNMHDR, LRESULT* pResult);
00077 afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00078 afx_msg void OnMediaAdd();
00079 afx_msg void OnUpdateMediaRemove(CCmdUI* pCmdUI);
00080 afx_msg void OnMediaRemove();
00081 afx_msg void OnUpdateMediaClear(CCmdUI* pCmdUI);
00082 afx_msg void OnMediaClear();
00083 afx_msg void OnUpdateMediaSelect(CCmdUI* pCmdUI);
00084 afx_msg void OnMediaSelect();
00085 afx_msg void OnUpdateMediaSave(CCmdUI* pCmdUI);
00086 afx_msg void OnMediaSave();
00087 afx_msg void OnMediaOpen();
00088 afx_msg void OnUpdateMediaPrevious(CCmdUI* pCmdUI);
00089 afx_msg void OnMediaPrevious();
00090 afx_msg void OnUpdateMediaNext(CCmdUI* pCmdUI);
00091 afx_msg void OnMediaNext();
00092 afx_msg void OnKeyDown(NMHDR* pNMHDR, LRESULT* pResult);
00093 afx_msg void OnSize(UINT nType, int cx, int cy);
00094 afx_msg void OnBeginDrag(NMHDR* pNMHDR, LRESULT* pResult);
00095 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00096 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00097 afx_msg void OnUpdateMediaRepeat(CCmdUI* pCmdUI);
00098 afx_msg void OnMediaRepeat();
00099 afx_msg void OnUpdateMediaRandom(CCmdUI* pCmdUI);
00100 afx_msg void OnMediaRandom();
00101 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00102 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00103 afx_msg void OnMediaAddFolder();
00104
00105 afx_msg void OnCustomDraw(NMLVCUSTOMDRAW* pNotify, LRESULT* pResult);
00106
00107 DECLARE_MESSAGE_MAP()
00108 };
00109
00110
00111
00112 #define MLN_NEWCURRENT 101
00113
00114 #endif // !defined(AFX_CTRLMEDIALIST_H__342211C4_F17F_451C_97C7_1BBE4BF2969F__INCLUDED_)