Click here to Skip to main content
15,894,250 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How/Can I create an array of controls? Pin
Peter Molnar23-Nov-02 7:02
Peter Molnar23-Nov-02 7:02 
Generalms word automation Pin
pnpfriend23-Nov-02 3:28
pnpfriend23-Nov-02 3:28 
QuestionHow to control a threads CPU utilization? Pin
mediamaster4023-Nov-02 3:16
mediamaster4023-Nov-02 3:16 
AnswerRe: How to control a threads CPU utilization? Pin
mediamaster4025-Nov-02 3:11
mediamaster4025-Nov-02 3:11 
GeneralCListCtrl - Selection Problem Pin
#realJSOP23-Nov-02 0:54
mve#realJSOP23-Nov-02 0:54 
GeneralRe: CListCtrl - Selection Problem Pin
Gary R. Wheeler23-Nov-02 1:50
Gary R. Wheeler23-Nov-02 1:50 
GeneralRe: CListCtrl - Selection Problem Pin
#realJSOP23-Nov-02 3:22
mve#realJSOP23-Nov-02 3:22 
GeneralRe: CListCtrl - Selection Problem Pin
Jean-Marc Molina3-Oct-03 1:12
Jean-Marc Molina3-Oct-03 1:12 
Hello,

Thanks for the info but can't we achieve this using a OnItemchangingMyList function ? :

void CSQLiteAddressBookDlg::OnItemchangingListContacts(NMHDR* pNMHDR, LRESULT* pResult) <br />
{<br />
	NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;<br />
<br />
	// return FALSE (or 0) to allow change, TRUE to prevent<br />
	// http://www.celticwolf.com/FAQs/CListCtrl_FAQ.html<br />
<br />
	*pResult = 0;<br />
}


As specified in the Celtic Wolf FAQ, I should affect FALSE or 0 to pResult in order to cancel the selection change. But it doesn't work.

I even tried to use OnNotify but can't find a way to make it work. It seems events LVN_ITEMCHANGED or LVN_ITEMCHANGING never occur.

<br />
BOOL CSQLiteAddressBookDlg::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) <br />
{<br />
	switch (wParam)<br />
	{<br />
		case IDC_LIST_CONTACTS:<br />
		{<br />
			LPNMLISTVIEW pnmv = (LPNMLISTVIEW) lParam;<br />
<br />
			switch (pnmv->lParam)<br />
			{<br />
				case LVN_ITEMCHANGED:<br />
				{<br />
					TRACE0 ("LVN_ITEMCHANGING\n");<br />
<br />
					break;<br />
				}<br />
<br />
				case LVN_ITEMCHANGING:<br />
				{<br />
					...<br />
					break;<br />
				}<br />
			}<br />
<br />
			break;<br />
		}<br />
	}<br />
<br />
	return CDialog::OnNotify(wParam, lParam, pResult);<br />
}<br />


I checked codeproject tutorials and can't find anything about using OnNotify with List controls.

Thanks,
JM

Earth > Europe > France > Lyon
GeneralDialogues en MFC Pin
bumper23-Nov-02 0:54
bumper23-Nov-02 0:54 
GeneralRe: Dialogues en MFC Pin
Gary R. Wheeler23-Nov-02 2:00
Gary R. Wheeler23-Nov-02 2:00 
GeneralRe: Dialogues en MFC Pin
bumper23-Nov-02 2:40
bumper23-Nov-02 2:40 
GeneralRe: Dialogues en MFC Pin
Maximilien24-Nov-02 16:19
Maximilien24-Nov-02 16:19 
GeneralRe: Dialogues en MFC Pin
bumper25-Nov-02 11:08
bumper25-Nov-02 11:08 
GeneralPreserving clipboard content Pin
mariuszpopiolek22-Nov-02 23:49
mariuszpopiolek22-Nov-02 23:49 
GeneralRe: Preserving clipboard content Pin
Gary R. Wheeler23-Nov-02 2:11
Gary R. Wheeler23-Nov-02 2:11 
GeneralRe: Preserving clipboard content Pin
mariuszpopiolek23-Nov-02 2:22
mariuszpopiolek23-Nov-02 2:22 
GeneralRe: Preserving clipboard content Pin
Paul M Watt23-Nov-02 6:57
mentorPaul M Watt23-Nov-02 6:57 
GeneralRe: Preserving clipboard content Pin
mariuszpopiolek23-Nov-02 13:22
mariuszpopiolek23-Nov-02 13:22 
GeneralConstants in cmath Pin
Anonymous22-Nov-02 23:22
Anonymous22-Nov-02 23:22 
GeneralConstants in <cmath> Pin
Anonymous22-Nov-02 23:21
Anonymous22-Nov-02 23:21 
QuestionHow to detect network connection? Pin
Wenrich22-Nov-02 23:06
Wenrich22-Nov-02 23:06 
AnswerRe: How to detect network connection? Pin
Gary R. Wheeler23-Nov-02 2:25
Gary R. Wheeler23-Nov-02 2:25 
AnswerRe: How to detect network connection? Pin
Michael Dunn23-Nov-02 5:11
sitebuilderMichael Dunn23-Nov-02 5:11 
GeneralMaximizing Pin
S O S22-Nov-02 23:00
S O S22-Nov-02 23:00 
GeneralRe: Maximizing Pin
Gary R. Wheeler23-Nov-02 2:35
Gary R. Wheeler23-Nov-02 2:35 

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.