16,472
社区成员
发帖
与我相关
我的任务
分享
try
{
GetLocalTime(&st);
str.Format(_T("%2d:%2d:%2d"),st.wMinute,st.wSecond,st.wMilliseconds);
strTime = str;
for (i=0; (i<5000)&&m_bThreadWork; i++)
{
str = _T("");
str.Format(_T("%08d"), i);
UpdateUserInterfaces(str);
}
GetLocalTime(&st);
str.Format(_T(" -- %2d:%2d:%2d"),st.wMinute,st.wSecond,st.wMilliseconds);
strTime += str;
AfxMessageBox(strTime);
}
catch(...)
{
}
我试了下这段代码,发消息用了811毫秒,传句柄用了804