Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Replace the text in CListCtrl

$
0
0

Hi...In my code initially i set the text of status as "Evaluating"

m_List.SetItemText(nitem,9,"Evaluating");

Now when i click the evaluate method i want to change this text based on the calculation i do:

This is my code-

void CReporterDlg::OnBnClickedbtnevaluate()
{
	GetMarketData();
	int iTSize,i,iMSize,j;
	int iEntryFailCnt=0,iTargetMetCnt=0,iClosedCnt=0,iExitFailCnt=0,iTargetFailCnt=0;
	unsigned long lMrktTime,lTechCallTime,lExitTime;
	iTSize=techCallArray.GetSize();
	iMSize=mainOrderArray.GetSize();

	for(i=0;i<iTSize;i++)
	{
		CTechCall objCall=techCallArray[i];

		if(CheckIfMainOrderExists(objCall))
		{

		}else{
			m_List.SetItemText(nitem,9,"Entry Fail");
			iEntryFailCnt++;
		}
	}
}

I tried putting AfxMessageBox to check if the control comes to else part, it does, but it doesn't change the text to Entry Fail. Can u tell what the problem is?


Viewing all articles
Browse latest Browse all 15302

Trending Articles