Click here to Skip to main content
15,911,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Thank you very much!!
I got how to do it now. It is to check the status of pNMListView->uNewState
and pNMListView->uOldState before operation as follow:


void CTable::OnItemchangedtable(NMHDR* pNMHDR, LRESULT* pResult)
{

NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;

UINT u = pNMListView->uNewState;
UINT n = pNMListView->uOldState;

if( u != 0 && n == 0 )
{
POSITION pos = m_table.GetFirstSelectedItemPosition();

int i = m_table.GetNextSelectedItem( pos );

CString cs = m_table.GetItemText(i, 0);
AfxMessageBox( cs);
}
*pResult = 0;

}

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 
GeneralRe: Grid Pin
l a u r e n6-Mar-01 23:09
l a u r e n6-Mar-01 23:09 
GeneralDoubt in ADO Pin
6-Mar-01 19:19
suss6-Mar-01 19:19 
GeneralRe: Doubt in ADO Pin
l a u r e n6-Mar-01 20:43
l a u r e n6-Mar-01 20:43 
GeneralError message...... Pin
Richard Cheng6-Mar-01 14:15
Richard Cheng6-Mar-01 14:15 

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.