I'm trying to have my program repaint in a loop, but it only waits until the loop is done to redraw. Here's my code:
Code:while( ftell( fIn ) < fileSize ) { ZeroMemory( pszBuffer, 512 ); fread( pszBuffer, 512, sizeof( char ), fIn ); //do stuff fwrite( pszBuffer, 512, sizeof( char ), fOut ); setProgress( progress + 512 ); RECT rect; GetWindowRect(hWnd, &rect); InvalidateRect(hWnd, &rect, true); }