Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: The questions we get these days! Pin
bpfh10-Apr-12 23:54
bpfh10-Apr-12 23:54 
AnswerRe: The questions we get these days! Pin
scramjetter14-Apr-12 15:47
scramjetter14-Apr-12 15:47 
AnswerRe: The questions we get these days! Pin
Chuck O'Toole14-Apr-12 18:08
Chuck O'Toole14-Apr-12 18:08 
GeneralRe: The questions we get these days! Pin
scramjetter14-Apr-12 18:26
scramjetter14-Apr-12 18:26 
AnswerRe: The questions we get these days! Pin
DarthDana27-Apr-12 9:21
professionalDarthDana27-Apr-12 9:21 
QuestionHow to add Message for dynamically created control(CListCtrl) Pin
shanmugarajaa9-Apr-12 2:13
shanmugarajaa9-Apr-12 2:13 
AnswerRe: How to add Message for dynamically created control(CListCtrl) Pin
_Flaviu9-Apr-12 5:10
_Flaviu9-Apr-12 5:10 
GeneralRe: How to add Message for dynamically created control(CListCtrl) Pin
_Flaviu9-Apr-12 21:56
_Flaviu9-Apr-12 21:56 
Ok, let's do some code sample :
C++
// MyClass.h
#define IDC_LIST                        1001

CListCtrl m_List;

protected:
	//{{AFX_MSG(CMyClass)
	afx_msg void OnClickList(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()


C++
// MyClass.cpp

BEGIN_MESSAGE_MAP(CMyClass, CView)
	//{{AFX_MSG_MAP(CMyClass)
	ON_NOTIFY(NM_CLICK, IDC_LIST, OnClickList)
	//}}AFX_MSG_MAP

int CMyClass::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if(CView::OnCreate(lpCreateStruct) == -1)return -1;
	// TODO: Add your specialized creation code here
	DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | CS_DBLCLKS | LVS_REPORT;
	BOOL bResult = m_List.Create(dwStyle,CRect(0,0,0,0),this,IDC_LIST);
	return bResult ? 0 : -1;
//	return 0;
}

void CMyClass::OnClickList(NMHDR* pNMHDR, LRESULT* pResult) 
{
	// TODO: Add your control notification handler code here
	*pResult = 0;
}

GeneralRe: How to add Message for dynamically created control(CListCtrl) Pin
shanmugarajaa9-Apr-12 23:04
shanmugarajaa9-Apr-12 23:04 
GeneralRe: How to add Message for dynamically created control(CListCtrl) Pin
_Flaviu10-Apr-12 4:28
_Flaviu10-Apr-12 4:28 
GeneralRe: How to add Message for dynamically created control(CListCtrl) Pin
Parthi_Appu12-Apr-12 0:25
Parthi_Appu12-Apr-12 0:25 
Questionhelp needed with my calculator code Pin
Member 87942428-Apr-12 22:48
Member 87942428-Apr-12 22:48 
AnswerRe: help needed with my calculator code Pin
Richard MacCutchan8-Apr-12 22:55
mveRichard MacCutchan8-Apr-12 22:55 
GeneralRe: help needed with my calculator code Pin
Member 87942428-Apr-12 23:15
Member 87942428-Apr-12 23:15 
GeneralRe: help needed with my calculator code Pin
Richard MacCutchan9-Apr-12 0:09
mveRichard MacCutchan9-Apr-12 0:09 
Generaljava Pin
anurag9558-Apr-12 13:54
anurag9558-Apr-12 13:54 
GeneralRe: java Pin
Wes Aday8-Apr-12 14:28
professionalWes Aday8-Apr-12 14:28 
GeneralRe: java Pin
Mohibur Rashid8-Apr-12 17:49
professionalMohibur Rashid8-Apr-12 17:49 
AnswerRe: java Pin
Malli_S8-Apr-12 19:51
Malli_S8-Apr-12 19:51 
AnswerRe: java Pin
Chuck O'Toole9-Apr-12 8:06
Chuck O'Toole9-Apr-12 8:06 
QuestionLinked List Pin
djgmad8-Apr-12 3:37
djgmad8-Apr-12 3:37 
AnswerRe: Linked List Pin
Randor 8-Apr-12 4:32
professional Randor 8-Apr-12 4:32 
GeneralRe: Linked List Pin
djgmad8-Apr-12 5:43
djgmad8-Apr-12 5:43 
GeneralRe: Linked List Pin
Randor 8-Apr-12 6:52
professional Randor 8-Apr-12 6:52 
GeneralRe: Linked List Pin
enhzflep8-Apr-12 7:24
enhzflep8-Apr-12 7:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.