FileList.h
资源名称:DXGuide.zip [点击查看]
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:3k
源码类别:
DirextX编程
开发平台:
Visual C++
- #if !defined(AFX_FILELIST_H__F6646700_C4B7_11D2_BF7C_0080C8E05391__INCLUDED_)
- #define AFX_FILELIST_H__F6646700_C4B7_11D2_BF7C_0080C8E05391__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // FileList.h : header file
- //
- #include "FileListHead.h"
- #include "FastFileManager.h"
- #include "FastFile.h"
- /////////////////////////////////////////////////////////////////////////////
- // CFileList window
- class CFileList : public CListCtrl
- {
- // Construction
- public:
- CFileList(BOOL bLeft = TRUE);
- // Attributes
- public:
- enum FileType {
- ftNormal = 0x0000,
- ftDirectory = 0x0001,
- ftFastFile = 0x0002,
- ftCompressedFile = 0x0004,
- ftExcutableFile = 0x0008
- };
- BOOL SetBkImage(UINT nIDResource);
- BOOL SetBkImage(LPCTSTR lpszResourceName);
- VOID SetSortOrder(int nSortCol, BOOL bSortAscend){
- //m_headerctrl.SetSortImage(nSortCol, bSortAscend);
- if (m_bLeftPan)
- {
- gOptions.m_nSortColLeft = nSortCol;
- gOptions.m_nSortOrderLeft = bSortAscend;
- }
- else
- {
- gOptions.m_nSortColRight = nSortCol;
- gOptions.m_nSortOrderRight = bSortAscend;
- }
- };
- CFastFileManager* GetFastFileManager()
- { return m_pFfm; };
- protected:
- BOOL m_bLeftPan;
- // CString m_strCurrentPath;
- CFastFileManager* m_pFfm;
- // int m_nSortedCol;
- // BOOL m_bSortAscending;
- CFileListHead m_headerctrl;
- CBitmap m_bitmap;
- int m_cxBitmap, m_cyBitmap;
- CPalette m_pal;
- // Operations
- public:
- VOID Unload();
- BOOL LoadItem(int nItem);
- BOOL LoadDirectory(LPCTSTR lpszPath);
- BOOL LoadFastfile(LPCTSTR lpszPath);
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CFileList)
- //}}AFX_VIRTUAL
- protected:
- static int CALLBACK Compare(LPARAM lParam1, LPARAM lParam2, LPARAM
- lParamSort);
- virtual void DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct );
- // Implementation
- public:
- BOOL Create(CWnd* pParentWnd, UINT nID );
- virtual ~CFileList();
- // Generated message map functions
- protected:
- //{{AFX_MSG(CFileList)
- afx_msg BOOL OnQueryNewPalette();
- afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnBegindrag(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnSetFocus(CWnd* pOldWnd);
- //}}AFX_MSG
- afx_msg void OnHeaderClicked(NMHDR* pNMHDR, LRESULT* pResult);
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_FILELIST_H__F6646700_C4B7_11D2_BF7C_0080C8E05391__INCLUDED_)