#if !defined(AFX_IMGLISTVIEW_H__C0DD00C1_EEA9_4E84_BB03_8DE83B2DEDEA__INCLUDED_)
|
#define AFX_IMGLISTVIEW_H__C0DD00C1_EEA9_4E84_BB03_8DE83B2DEDEA__INCLUDED_
|
|
#if _MSC_VER > 1000
|
#pragma once
|
#endif // _MSC_VER > 1000
|
// ImgListView.h : header file
|
//
|
|
/////////////////////////////////////////////////////////////////////////////
|
// CImgListView view
|
#include <map>
|
using std::map;
|
|
|
#define LEFT_MARJIN 15
|
#define TOP_MARJIN 15
|
#define ITEM_WIDTH 190 // 380 // 蔼捞 官差绢具 窍骨肺 define捞唱 const绰 绢匡府瘤 臼绰促.
|
#define ITEM_HEIGHT 160 // 320 //
|
#define ITEM_TEXT 22 // 酒捞袍俊 措茄 臂磊 臭捞
|
#define ITEM_ROW_MARJIN 15 // 酒捞袍苞 酒捞袍狼 啊肺荤捞
|
#define ITEM_COL_MARJIN 20 // 酒捞袍苞 酒捞袍狼 技肺荤捞
|
|
class CPotoItem
|
{
|
public:
|
CPotoItem();
|
CPotoItem(CString strFilePath);
|
CPotoItem(CString strFilePath,CString strFileName,CString strImgInfo =_T(""));
|
virtual ~CPotoItem();
|
public:
|
void GetItemRect(int nItem);
|
void DrawRect(CDC *pDC, COLORREF color,CRect rc);
|
void DrawText(CDC* pDC, COLORREF color );
|
void Draw(CDC* pDC, CRect rcClient, CRect rcChange );
|
|
CImage m_Img;
|
CRect m_rcImg;
|
BOOL m_bSelect; // 急琶 登菌绰啊
|
BOOL m_bValid; // 按眉狼 粮犁己
|
BOOL m_bProcesing; // 贸府吝牢啊
|
TCHAR m_Path[MAX_PATH];
|
|
CRect GetRect() { return m_rcImg; }
|
void SetSelect( bool bState ) { m_bSelect = bState; }
|
void ToggleSelected() { m_bSelect = !m_bSelect;}
|
};
|
|
|
typedef map<CString,CPotoItem*> IMG_MAP;
|
|
#define KEY_DOWN(VK_CODE) ((GetAsyncKeyState(VK_CODE) & 0x8000) ? 1 : 0)
|
|
#define UM_CLK_ITEM_UPDATE WM_USER + 102
|
class CImgListView : public CScrollView
|
{
|
protected:
|
CImgListView(); // protected constructor used by dynamic creation
|
DECLARE_DYNCREATE(CImgListView)
|
|
// Attributes
|
public:
|
|
// Operations
|
public:
|
|
// Overrides
|
// ClassWizard generated virtual function overrides
|
//{{AFX_VIRTUAL(CImgListView)
|
protected:
|
virtual void OnDraw(CDC* pDC); // overridden to draw this view
|
virtual void OnInitialUpdate(); // first time after construct
|
//}}AFX_VIRTUAL
|
|
// Implementation
|
protected:
|
virtual ~CImgListView();
|
#ifdef _DEBUG
|
virtual void AssertValid() const;
|
virtual void Dump(CDumpContext& dc) const;
|
#endif
|
|
// Generated message map functions
|
//{{AFX_MSG(CImgListView)
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
afx_msg void OnPaint();
|
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
|
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
|
//}}AFX_MSG
|
DECLARE_MESSAGE_MAP()
|
|
public:
|
IMG_MAP m_ImgMap;
|
int m_nHItem; // 技肺肺 割俺啊 免仿捞 瞪巴牢啊?
|
int m_nHItemOld;
|
int m_nAddItem; // 佬绢甸牢 酒捞袍狼 醚肮荐
|
CBrush m_BgBrush; // 硅版Brush
|
CImage* m_pSelImg;
|
CPotoItem *m_pSelectItem;
|
public:
|
CImage* GetSelImg() const {return m_pSelImg;};
|
void DeleteItemAll();
|
BYTE* GetImagePoint();
|
TCHAR* GetSelectImgPath();
|
|
BOOL SelectItemChk(CPoint point);
|
BOOL LoadImageFolder(CString strPath, CString strGlassID, CString strOp = _T(""));
|
BOOL LoadImage(CString strFilePath);
|
|
void SetPageSize();
|
void UpdateItem();
|
CRect GetItemRect(int nItem);
|
|
void UpdateView();
|
public:
|
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
|
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
|
afx_msg void OnDestroy();
|
};
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//{{AFX_INSERT_LOCATION}}
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
#endif // !defined(AFX_IMGLISTVIEW_H__C0DD00C1_EEA9_4E84_BB03_8DE83B2DEDEA__INCLUDED_)
|