borko1980 wrote:
SendMessage(hWnd, WM_PAINT, 0, 0);
Replace this with InvalidateRect(hWnd, NULL, FALSE);
You can't send WM_PAINT like this. It has to be generated by the system, when the system decides that the window needs to be redrawn.
Igor Tandetnik