Home > Software engineering >  Need a MFC line shows more control, not repeat, do not blink?
Need a MFC line shows more control, not repeat, do not blink?

Time:09-24

MFC interface shows only some of the data, I now use the listbox control, data brush up and down it line by line, will repeat display, if every time before the show I emptied listbox, it will flash, novice brain broadly pain, my display function code is the following:


 CListBox m_LISTINF2; 




Void CMFCApplication1Dlg: : ShowInfo (cstrings STR)
{
//m_LISTINF1 ResetContent ();//to empty comment out
M_LISTINF2. InsertString (m_LISTINF2. GetCount (), STR);
M_LISTINF2. SetCurSel (m_LISTINF2. GetCount () - 1);

}


Oh, I will send data only one data source, so it can be all empty only look at the current state of data,

CodePudding user response:

http://www.codeproject.com/Articles/29064/CGridListCtrlEx-Grid-Control-Based-on-CListCtrl

CodePudding user response:

You can judge whether a has been added before adding, without adding to add, not solved?
If it is to update the data to check where it is, change it.

MFC controls fall into this habit, updated quickly, will shine. Like the static control. In the end, I think it should be caused by MFC drawing mechanism, he put the background map and prospect of draw apart into two times to complete

CodePudding user response:

You don't need to use CListBox controls, this control in your application and what role?
With the CDC directly

CodePudding user response:

CRichEditCtrl: : ReplaceSel method does not shine

CodePudding user response:

Insert until the refresh,
Try to refresh the controls after insertion.

CWnd: : SetRedraw

CodePudding user response:

Since the draw a, but can't edit, how?
  • Related