分类: C/C++
2009-01-03 14:18:59
yfwill2009-01-04 11:28:07
//能响应消息的Sleep inline void Rest(DWORD dwMilliseconds, DWORD dwSlice) { MSG message; for (int i = 0; i < dwMilliseconds; i += dwSlice){ if(::PeekMessage(&message, NULL, 0, 0, PM_REMOVE)){ ::TranslateMessage(&message); ::DispatchMessage(&message); } Sleep(dwSlice); } }