#pragma once

class CMTListCtrl : public CListCtrl
{
public:
	CMTListCtrl();
	~CMTListCtrl(void);

	BOOL Initialize(CEdit* pMsgBody);

	// Interfaces for the UI to communicate to the SMS engine 
	ULONG GetSelection();
	void ClearAll();
	void Clear(ULONG Handle);
	void AddMessage(
			ULONG hMsgHdl, 
			ULONG *uStorageType, 
			ULONG *uMsgFormat, 
			ULONG *uMsgTag, 
			TCHAR *szFrom, 
			TCHAR *szTime, 
			TCHAR *szMsgBody); 
	void UpdateMessage(
			ULONG hMsgHdl, 
			ULONG *uStorageType, 
			ULONG *uMsgFormat, 
			ULONG *uMsgTag, 
			TCHAR *szFrom, 
			TCHAR *szTime, 
			TCHAR *szMsgBody);

	void OnUserClick();

protected:
	CEdit* m_pMsgBody;

	// Returns index of selected message based on message handle
	INT FindMsg(ULONG hMsgHdl);
};
