Click here to Skip to main content
15,881,745 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPlease help regarding the following error Pin
hits0719-Sep-07 18:57
hits0719-Sep-07 18:57 
AnswerRe: Please help regarding the following error Pin
nbugalia19-Sep-07 19:27
nbugalia19-Sep-07 19:27 
GeneralRe: Please help regarding the following error Pin
hits0719-Sep-07 19:41
hits0719-Sep-07 19:41 
GeneralRe: Please help regarding the following error Pin
nbugalia19-Sep-07 20:06
nbugalia19-Sep-07 20:06 
GeneralRe: Please help regarding the following error Pin
David Crow20-Sep-07 2:49
David Crow20-Sep-07 2:49 
Questionadd files and foldder selection box on button click Pin
Dhiraj kumar Saini19-Sep-07 18:44
Dhiraj kumar Saini19-Sep-07 18:44 
AnswerRe: add files and foldder selection box on button click Pin
nbugalia19-Sep-07 19:23
nbugalia19-Sep-07 19:23 
QuestionHow to avoid flickering in CListCtrl Pin
shir_k19-Sep-07 18:11
shir_k19-Sep-07 18:11 
Hi,

I have list control whose property is set to
"List1",IDC_CmdResp,"SysListView32",LVS_REPORT |
WS_BORDER | WS_TABSTOP,293,37,146,214,
WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_RIGHT |
WS_EX_STATICEDGE

Am displaying the data read from the serial port in the list control but there is lot of filckering.Below is the code to display the data in list control.Is there any thing am missing in the code.Why there is flickering?More flickering starts when i start deleting the data.If i don't delete i get assert error that maybe due to memory overflow of the list control.Plz help me out.


void CNgpptDialog::ReadSerialData(CString sIn)
{

CString pressure_data;

ptrCmdResp->SetRedraw(false);
pressure_data=sIn;
int counter = ptrCmdResp->GetItemCount();
ptrCmdResp->InsertItem(counter, "");// to insert a row
ptrCmdResp->SetItemText(counter, 0, pressure_data);// column0
ptrCmdResp->EnsureVisible(counter, FALSE); // Scrolls downwords.

if(counter > 150)// I start deleting first data when the number of items in the list control is > 150
{
ptrCmdResp->DeleteItem(0);
}

ptrCmdResp->SetRedraw(true);
int nIndex = ptrCmdResp->GetItemCount();
ptrCmdResp->RedrawItems(nIndex,nIndex);
}

}


Thanks in advance
AnswerRe: How to avoid flickering in CListCtrl Pin
Nelek19-Sep-07 20:08
protectorNelek19-Sep-07 20:08 
GeneralRe: How to avoid flickering in CListCtrl Pin
shir_k20-Sep-07 20:36
shir_k20-Sep-07 20:36 
GeneralRe: How to avoid flickering in CListCtrl Pin
Nelek21-Sep-07 1:44
protectorNelek21-Sep-07 1:44 
AnswerRe: How to avoid flickering in CListCtrl Pin
David Crow20-Sep-07 2:45
David Crow20-Sep-07 2:45 
GeneralRe: How to avoid flickering in CListCtrl Pin
shir_k20-Sep-07 20:24
shir_k20-Sep-07 20:24 
QuestionRe: How to avoid flickering in CListCtrl Pin
David Crow21-Sep-07 2:40
David Crow21-Sep-07 2:40 
QuestionHelp me convert Pin
monsieur_jj19-Sep-07 16:15
monsieur_jj19-Sep-07 16:15 
AnswerRe: Help me convert Pin
monsieur_jj19-Sep-07 17:07
monsieur_jj19-Sep-07 17:07 
QuestionMemory Corruption [modified] Pin
devvvy19-Sep-07 15:59
devvvy19-Sep-07 15:59 
AnswerRe: Memory Corruption Pin
Roger Broomfield19-Sep-07 18:07
Roger Broomfield19-Sep-07 18:07 
GeneralRe: Memory Corruption Pin
devvvy19-Sep-07 18:10
devvvy19-Sep-07 18:10 
QuestionHow to Monitor an application which required kill and regenerate if hang Pin
littlecheer19-Sep-07 15:18
littlecheer19-Sep-07 15:18 
AnswerRe: Monitor an application - kill and regenerate if hang Pin
Nathan Holt at EMOM19-Sep-07 15:42
Nathan Holt at EMOM19-Sep-07 15:42 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
littlecheer19-Sep-07 15:55
littlecheer19-Sep-07 15:55 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
devvvy19-Sep-07 18:49
devvvy19-Sep-07 18:49 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
ThatsAlok19-Sep-07 20:35
ThatsAlok19-Sep-07 20:35 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
devvvy19-Sep-07 20:43
devvvy19-Sep-07 20:43 

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.