Message Mapping for a template class



Hi,
My problem is about Message Map and template classes. Since I'm not that
professional with MFC I can't find my way out.
I have a class that has inherited from CListCtrl and I want it to be
template class. This class must be able to handle some of the Windows
Messages too.
So I wrote the following macro as follow:


BEGIN_MESSAGE_MAP(CMyListCtrl, CListCtrl)
//{{AFX_MSG_MAP(CMyListCtrl)
ON_NOTIFY_REFLECT(LVN_BEGINDRAG, OnBeginDrag)
ON_WM_LBUTTONUP()
ON_WM_CHAR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()


But complier didn't accept it, so I changed it to:


BEGIN_MESSAGE_MAP(CMyListCtrl<Item>, CListCtrl)
//{{AFX_MSG_MAP(CMyListCtrl)
ON_NOTIFY_REFLECT(LVN_BEGINDRAG, OnBeginDrag)
ON_WM_LBUTTONUP()
ON_WM_CHAR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()


Which 'Item' is my template variable but no progress. I even tested this
one:


BEGIN_MESSAGE_MAP(template<class Item> CMyListCtrl<Item>, CListCtrl)
//{{AFX_MSG_MAP(CMyListCtrl)
ON_NOTIFY_REFLECT(LVN_BEGINDRAG, OnBeginDrag)
ON_WM_LBUTTONUP()
ON_WM_CHAR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()


Still not working!!!
Does anyone know how to map messages for a template class?

Regards,
Mehran Ziadloo


.