Original Post
Hi,
I have a section of code,SearchDevices() that needs to run repeatedly after 10 seconds.Somesort like a loop.
sprintf(strMsg, "%s | %s", strRemoteBDAddr, strRemoteName);
m_device_list.InsertString(0, strMsg);
Sleep(10000);
SearchDevices();
If I remove the sleep(10000) and SearchDevices, then my strMsg will appear in the m_device_list but if i placed it there, the strMsg just could not appear in the m_device_list.I though i placed the Sleep(10000) and SearchDevices() after the m_device_list... codes then it should appear the strMsg before it wait for 10 seconds then go to SearchDevices() but how come the strMsg just could not appear in the listbox? Thank you.