Помогите, пожалуйста, устранить мигание при выводе текста в окно. Вот глючащий кусок кода(всё на WinAPI):
void Thread(void*pParams)
{
RECT rect;
MSG message;
GetClientRect(hMainWnd, &rect);
HDC hDC = GetDC(hMainWnd);
while(true)
{
if (PeekMessage(&message, hMainWnd, 0, 0, PM_REMOVE)) {
TranslateMessage(&message);
DispatchMessage(&message); }
Sleep(1000);
system_time=time(NULL);
InvalidateRect(hMainWnd,&rect, false);
}
ReleaseDC(hMainWnd,hDC);
}
ответ опубликован:
Рейтинг: 5
голосов: 2
- 5
- 1
- 2
- 3
- 4
- 5

