#ifndef __EASYSMSWNDBASE_h__
#define __EASYSMSWNDBASE_h__

//#define		UI_TEST

#include "../CommonLib/FunctionLib/CommonTypes.h"


class CEasySmsWndBase;

/////////////////CEasySmsListBase/////////////////////////////////////////////////////////
class CEasySmsListBase	:	public	UiListEx
{
public:
	
	friend	CEasySmsWndBase;
	
	CEasySmsListBase();

	virtual ~CEasySmsListBase();

public:
	// 当某一项即将被删除之前，delete 其自定义项数据
//	virtual void OnRemoveItem( int nIndex );

	virtual int OnLButtonUp( UINT fwKeys, int xPos, int yPos );

protected:
	void	setEasySmsWndBase( CEasySmsWndBase *pCEasySmsWndBase );

private:

	ImageContainer		m_imgContainer_base;

	CEasySmsWndBase		*m_pCEasySmsWndBase;
};


///////////////////////CEasySmsWndBase///////////////////////////////////////////////////
class CEasySmsWndBase : public CMzWndEx
{
	
	MZ_DECLARE_DYNAMIC( CEasySmsWndBase );

	public:

		friend	CEasySmsListBase;

		CEasySmsWndBase(void);

		virtual ~CEasySmsWndBase(void);

	public:

		virtual	BOOL OnInitDialog();

		virtual LRESULT MzDefWndProc(UINT message, WPARAM wParam, LPARAM lParam);

		void	SetListItem( ListItemEx* pItem );

	protected:

		virtual	int		DoModalBase( CMzWndEx *pCMzWndEx );

		virtual	void	DoSthForItemRemove( ListItemEx* pItem );

		virtual void	DoSthForItemBtnUpSelect( ListItemEx* pItem );

		virtual void	DoSthForItemSelect( ListItemEx* pItem );

		virtual void	DoSthForTooBarHoldPress( int	nIndex );

		virtual void	ReturnToMainWnd();

		virtual HRESULT	RemoveSmsInDb( ListItemEx* pItem );

		wchar_t	* GetNameOrTel( ListItemEx* pItem );

		wchar_t	* GetMsgInfoFromIterm( ListItemEx* pItem );

	private:
		

	protected:

		CEasySmsListBase	m_list_base;

		UiToolbar_Text		m_toolBar_base;

		ImageContainer		m_imgContainer_base;

		ListItemEx*			m_pItem;
		CoreItemData_t*		m_pCoreItemData;
	private:

};

#endif
