Need to send info???
-
How can I send text out to a List control in a loop? for(int i=0; i<10; i++) { Sleep(1000); m_list.AddString("Hello"); } Now when im in the loop I dont see the text updateing but when the loop is finish then all the text is shown. How can I make so I can see the test updateing at ones?
-
How can I send text out to a List control in a loop? for(int i=0; i<10; i++) { Sleep(1000); m_list.AddString("Hello"); } Now when im in the loop I dont see the text updateing but when the loop is finish then all the text is shown. How can I make so I can see the test updateing at ones?
A call to
Sleep()
isn't required, unless you want to convey the illusion of "progress". Try this:for (int i=0; (i < 10); i++) {
Sleep (1000);
int nIndex = m_listCtrl.InsertItem (i, "Hello");
m_listCtrl.EnsureVisible (nIndex, TRUE);
m_listCtrl.UpdateWindow();
}/ravi
This is your brain on Celcius Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com
-
A call to
Sleep()
isn't required, unless you want to convey the illusion of "progress". Try this:for (int i=0; (i < 10); i++) {
Sleep (1000);
int nIndex = m_listCtrl.InsertItem (i, "Hello");
m_listCtrl.EnsureVisible (nIndex, TRUE);
m_listCtrl.UpdateWindow();
}/ravi
This is your brain on Celcius Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com
-
A call to
Sleep()
isn't required, unless you want to convey the illusion of "progress". Try this:for (int i=0; (i < 10); i++) {
Sleep (1000);
int nIndex = m_listCtrl.InsertItem (i, "Hello");
m_listCtrl.EnsureVisible (nIndex, TRUE);
m_listCtrl.UpdateWindow();
}/ravi
This is your brain on Celcius Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com
-