mwebster
asked on
How to stop a CListCtrl from blinking
How can i stop a CListCtrl from excessively blinking when i call the DeleteAllItems() function
thanks in adVance
thanks in adVance
ASKER
can you send me some example code this CListCtrl is on a TabCtrl which is on a DialogBox(so you see my delima)
here's what i do to get a handle to the CListCtrl
int index = m_Mytab.GetCurSel();
TC_ITEM item;
item.mask = TCIF_PARAM;
m_Mytab.GetItem(index,&ite m);
ASSERT(item.lParam);
CListCtrl* MyCtrl = (CListCtrl*)item.lParam;
MyCtrl->DeleteAllItems();
here's what i do to get a handle to the CListCtrl
int index = m_Mytab.GetCurSel();
TC_ITEM item;
item.mask = TCIF_PARAM;
m_Mytab.GetItem(index,&ite
ASSERT(item.lParam);
CListCtrl* MyCtrl = (CListCtrl*)item.lParam;
MyCtrl->DeleteAllItems();
Actually use the SetRedraw method (thats the method equivalent I mentioned) od CListCtrl
eg:
MyCtrl->SetRedraw(FALSE);
MyCtrl->DeleteAllItems();
MyCtrl->SetRedraw(TRUE);
Cheers,
Raymond
eg:
MyCtrl->SetRedraw(FALSE);
MyCtrl->DeleteAllItems();
MyCtrl->SetRedraw(TRUE);
Cheers,
Raymond
ASKER
Still didn't work i Still get the blicking when i switch from tab to tab cuz as i switch to each tab the data for the specific CListCtrl must be updated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The control mave have BeginUpdate and EndUpdate (or something similar) methods which encapsulate this.
Cheers,
Raymond.