// ProjectIconsDlg.h : header file
//
#if !defined(_PROJECTICONSDLG_H_)
#define _PROJECTICONSDLG_H_

#include "cmString.h"
////////////////////////////////////////////////////////////////////////////
// CProjectIconsDlg dialog

class CXmlProject;

class CProjectIconsDlg : public CDialog
{
// Construction
public:
	CProjectIconsDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CProjectIconsDlg)
	enum { IDD = IDD_PROJECT_ICONS };
	CButton	cmdRemove_;
	CButton	cmdOk_;
	CListCtrl	lvwIcons_;
	//}}AFX_DATA

	// properties
	//
public:
	void SetProject(CXmlProject* project);
	CXmlProject* GetProject() const;

	cmString GetSelectedIcon() const;
	void SetSelectedIcon(const cmString& iconFileName);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CProjectIconsDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CProjectIconsDlg)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnCmdAdd();
	afx_msg void OnCmdRemove();
	virtual void OnOK();
	virtual BOOL OnInitDialog();
	afx_msg void OnClickIcons(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDropFiles(HDROP hDropInfo);
	afx_msg void OnDblclkIcons(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP();

	void UpdateWindowSize();
	void AddImage(const cmString& iconFileName);
	void AddImage(HICON hIcon, const cmString& iconFileName);

	CXmlProject* project_;

	cmString lastIconDir_;
	CImageList imageList_;
	cmString selectedIcon_;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(_PROJECTICONSDLG_H_)
