00001 /* 00002 Free Download Manager Copyright (c) 2003-2007 FreeDownloadManager.ORG 00003 Open Download Manager Copyright (c) 2008-2010 OpenDownloadManager.ORG 00004 */ 00005 00006 #if !defined(AFX_DOWNLOADS_HISTORY_H__DED743BB_CC73_479A_937C_C8D60FCFEF03__INCLUDED_) 00007 #define AFX_DOWNLOADS_HISTORY_H__DED743BB_CC73_479A_937C_C8D60FCFEF03__INCLUDED_ 00008 00009 #if _MSC_VER > 1000 00010 #pragma once 00011 #endif 00012 00013 #include "ListCtrlEx.h" 00014 #include "fsMutex.h" 00015 #include "fsODMenu.h" 00016 00017 class CDownloads_History : public CListCtrlEx 00018 { 00019 public: 00020 fsDLHistoryRecord* get_SelectedRecord(); 00021 00022 void SelectRecord (fsDLHistoryRecord* rec); 00023 00024 static int GetRecordImage (fsDLHistoryRecord* rec); 00025 00026 void ApplyFilter(class fsDldHistRecFilter*); 00027 00028 void DeleteAllRecords(); 00029 00030 void DeleteRecord (fsDLHistoryRecord* rec); 00031 00032 void AddRecord (fsDLHistoryRecord* rec); 00033 00034 void ApplyLanguage(); 00035 BOOL Create(CWnd *pParent); 00036 CDownloads_History(); 00037 virtual ~CDownloads_History(); 00038 00039 protected: 00040 void OnKeyDown (WORD wVK); 00041 static int CALLBACK _sortFunc(LPARAM item1, LPARAM item2, LPARAM lp); 00042 void Sort(); 00043 void OnSortModeChanged(); 00044 fsODMenu m_odmenu; 00045 void ApplyLanguageToMenu (CMenu* menu); 00046 void OnRClick(); 00047 00048 static DWORD WINAPI _threadApplyFilter (LPVOID lp); 00049 void ApplyFilter_imp (fsDldHistRecFilter* f, int *piProgress = NULL); 00050 fsDownloadsHistoryMgr* m_mgr; 00051 fsMutex m_mxAddDel; 00052 void OnForceUpdate(); 00053 int FindRecord (fsDLHistoryRecord* rec); 00054 00055 void UpdateRecord (int iItem); 00056 CImageList m_images, m_selimages; 00057 00058 //{{AFX_MSG(CDownloads_History) 00059 afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct); 00060 afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct); 00061 afx_msg void OnUrltoclipboard(); 00062 afx_msg void OnLaunch(); 00063 afx_msg void OnOpenfolder(); 00064 afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); 00065 afx_msg void OnHstitemDelete(); 00066 //}}AFX_MSG 00067 DECLARE_MESSAGE_MAP() 00068 }; 00069 00070 #endif
1.5.6