Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Artur Shingirei
|
Nov 29, 2004 - 9:28 AM
|
Hello.
I created a ListCtrl at resource editor on the dialog form. After I did add it to the container CExtTabPageContainerFlatWnd as
VERIFY( m_wndTabPageContainerFlat.PageInsert( &m_ListCtrlEdit, _T("ListCtr") ) );
but I meets with problem: I did add an Event Handler for CListCtrl:
Message Map: .... ON_NOTIFY(NM_DBLCLK, IDC_LIST, OnDblClick) ...
void CMyDialog::OnDblClick(NMHDR *pNMHDR, LRESULT *pResult) { } But when I do double click on Item at ListCtrl. I do not get in OnDblClick(...). What I should to do for resolve this problem?I do not want to create my CListCtrl dynamicly.
|
|
Technical Support
|
Nov 30, 2004 - 9:53 AM
|
What about using a class derived from CListCtrl in way like this?class CMyListCtrl : public CListCtrl
{
public:
CMyListCtrl();
virtual ~CMyListCtrl();
// Generated message map functions
protected:
//{{AFX_MSG(CMyListCtrl)
afx_msg void OnDblclk(NMHDR* pNMHDR,
LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CMyListCtrl::CMyListCtrl()
{
}
CMyListCtrl::~CMyListCtrl()
{
}
BEGIN_MESSAGE_MAP(CMyListCtrl, CListCtrl)
//{{AFX_MSG_MAP(CMyListCtrl)
ON_NOTIFY_REFLECT(NM_DBLCLK, OnDblclk)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
// CMyListCtrl message handlers
void CMyListCtrl::OnDblclk(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
*pResult = 0;
}
|
|