DownInfoType.h
上传用户:qhonly
上传日期:2013-06-10
资源大小:487k
文件大小:1k
- #pragma once
- //类型定义
- //允许编辑
- #define TYPE_EDIT 1
- //允许删除
- #define TYPE_DELETE 2
- //文件下载中
- #define TYPE_FILEDOWNING 4
- //站点下载
- #define TYPE_WEBDOWN 8
- //站点管理
- #define TYPE_WEBMGR 16
- //已下载文件
- #define TYPE_FILEDOWNED 32
- //允许移动
- #define TYPE_RECYCLED 64
- //允许增加
- #define TYPE_ADD 128
- typedef struct _DownTypeInfo
- {
- //type.ini 文件所在目录
- char TypePath[MAX_PATH];
- //属于些分类的任务下载文件保存路径
- char SavePath[MAX_PATH];
- //分类设置
- UINT Type;
- //属于些分类的文件类型
- char FileFilter[MAX_PATH];
- //层数,无意义
- int Layer;
- }DownTypeInfo;
- class CDownInfoType
- {
- public:
- CDownInfoType(void);
- ~CDownInfoType(void);
- //加载分类信息到treectrl
- static void LoadTreeTypeInfo(CTreeCtrl& TreeCtrl, HTREEITEM hParent,UINT Type = TYPE_FILEDOWNED);
- //读取分类文件
- static void LoadTypeInfo(LPCTSTR lpTypePath,DownTypeInfo* pDTI);
- //返回TREEITEM的分类文件所在路径
- static BOOL GetTreeTypePath(CTreeCtrl& TreeCtrl,HTREEITEM hItem, char lpBuf[]);
- static BOOL MoveTreeTypeInfoTo(CTreeCtrl& TreeCtrl, HTREEITEM hSrcItem, HTREEITEM hDestItem,UINT Type = 0);
- static BOOL DeleteTreeTypeInfo(CTreeCtrl& TreeCtrl, HTREEITEM hDeleteItem);
- static void ClearTreeTypeInfoData(CTreeCtrl& TreeCtrl, HTREEITEM hItem = NULL);
- static BOOL SaveTypeInfo(LPCTSTR lpTypePath,DownTypeInfo* pDTI);
- static BOOL SaveTypeInfo(CTreeCtrl& TreeCtrl,HTREEITEM hItem);
- static UINT GetDownInfoType(CTreeCtrl& TreeCtrl, HTREEITEM hItem);
- };