Programming - cpueblo.com

Wait (API...)


글쓴이 : 유광희 날짜 : 2005-07-25 (월) 10:35 조회 : 11467
void Wait(int DelayTime) { LONG cnt = GetTickCount(); // 현재티커 while(1) { MSG msg; while(1) { if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } else break; } Sleep(1); if ((LONG)(GetTickCount() - cnt) > DelayTime) return; } }