SetTimer().. WM_TIMER window flickers
How do i avoid this?
Code:
case WM_CREATE:
{
/* Create timer to refresh screen */
SetTimer(hwnd, IDT_REFRESH, (UINT)0.005,(TIMERPROC) NULL);
............
............
case WM_TIMER:
{
// Refresh screen
InvalidateRect (hwnd, NULL, TRUE);
UpdateWindow(hwnd);
}
break;
My whole window is flickering and when selecting menu, sometimes menu is black (wont see text on menu) until i move mouse over menu then text clears out.. Lets just say the window operations would not function properly if i use timer as shown... I just wanna refresh screen every milliseconds