Click here to Skip to main content
15,921,636 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralADsUser - Addresses Pin
derhackler7-Mar-01 7:43
derhackler7-Mar-01 7:43 
GeneralRe: ADsUser - Addresses Pin
Erik Thompson7-Mar-01 8:19
sitebuilderErik Thompson7-Mar-01 8:19 
GeneralRe: ADsUser - Addresses Pin
derhackler7-Mar-01 8:31
derhackler7-Mar-01 8:31 
QuestionHow to Catch Windows Events?? Pin
TomK7-Mar-01 6:56
TomK7-Mar-01 6:56 
AnswerRe: How to Catch Windows Events?? Pin
Masaaki Onishi7-Mar-01 15:43
Masaaki Onishi7-Mar-01 15:43 
GeneralHelp with CRecordSet and Memo Pin
7-Mar-01 6:25
suss7-Mar-01 6:25 
GeneralHelp with CRecordSet and Memo Pin
7-Mar-01 6:24
suss7-Mar-01 6:24 
QuestionCListCtrl OnItemchanged, loops 3 times?? Pin
Vickie7-Mar-01 4:54
Vickie7-Mar-01 4:54 
Dear all,

I am encountering a problem in calling this CListCtrl function, OnItemchanged.
Whenever there is a change in selection, this functions will run 3 times!!!
And, for the first time, the string got is " ", but at the second time, it shows the right string, then it is " " again for the third time. Can I know how does it happen for running 3 times?

This is just a testing code. Actually I want to call another function whenever a selection is moved to another one, how can I do this if this function cannot work?

void CTable::OnItemchangedtable(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;

POSITION pos = m_table.GetFirstSelectedItemPosition();
int i = m_table.GetNextSelectedItem( pos );
CString cs = m_table.GetItemText(i, 0);
AfxMessageBox( cs);

*pResult = 0;
}

Thank you very much !!!

Regards,
Vickie
AnswerRe: CListCtrl OnItemchanged, loops 3 times?? Pin
l a u r e n7-Mar-01 6:32
l a u r e n7-Mar-01 6:32 
GeneralRe: CListCtrl OnItemchanged, loops 3 times?? Pin
Vickie7-Mar-01 6:38
Vickie7-Mar-01 6:38 
AnswerRe: CListCtrl OnItemchanged, loops 3 times?? Pin
Chris Meech7-Mar-01 7:43
Chris Meech7-Mar-01 7:43 
GeneralRe: CListCtrl OnItemchanged, loops 3 times?? Pin
Vickie7-Mar-01 7:56
Vickie7-Mar-01 7:56 
GeneralVersion Info Retrieval Pin
7-Mar-01 1:57
suss7-Mar-01 1:57 
GeneralEventLogging Doubt Pin
7-Mar-01 1:46
suss7-Mar-01 1:46 
GeneralEventLogging Doubt Pin
7-Mar-01 1:43
suss7-Mar-01 1:43 
GeneralCalling another executable Pin
Gerry6-Mar-01 23:43
Gerry6-Mar-01 23:43 
GeneralRe: Calling another executable Pin
Prasanth Ekkoratha7-Mar-01 0:22
Prasanth Ekkoratha7-Mar-01 0:22 
GeneralRe: Calling another executable Pin
MickAB7-Mar-01 0:34
MickAB7-Mar-01 0:34 
GeneralRe: Calling another executable Pin
MickAB7-Mar-01 0:38
MickAB7-Mar-01 0:38 
GeneralRe: Calling another executable Pin
Gerry7-Mar-01 2:44
Gerry7-Mar-01 2:44 
GeneralRe: Calling another executable Pin
MickAB7-Mar-01 2:58
MickAB7-Mar-01 2:58 
GeneralRe: Calling another executable Pin
Gerry7-Mar-01 4:16
Gerry7-Mar-01 4:16 
GeneralRe: Calling another executable Pin
MickAB7-Mar-01 5:25
MickAB7-Mar-01 5:25 
GeneralRe: Calling another executable Pin
Gerry7-Mar-01 21:35
Gerry7-Mar-01 21:35 
GeneralGrid Pin
Vickie6-Mar-01 22:55
Vickie6-Mar-01 22:55 

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.