My win32 GUI content changes every second but it doesn't show update unless the window is manually moved. I tried to pop up a messagebox every second to trigger the window to refresh and it worked. Hence it proves that my content really changes but the window doesnt update. I want the window to refresh without popping up a messagebox everytime, is there a windows function for this? Thanks
case WM_PAINT:
RECT fingerprintSection;
fingerprintSection.left=500;
fingerprintSection.top=300;
fingerprintSection.bottom=540;
fingerprintSection.right=660;
wmId = LOWORD(wParam);
hdc = BeginPaint(hWnd, &ps);
refresh=!refresh;
if((start==true)&&(refresh==true)&&(stop!=true))
{
windowName = MultiByteStringToWideString(name1, CP_ACP);
LoadAndBlitBitmap(windowName.c_str(), hdc,500,0);//loading a picture that doesnt change
fingerprint();
LoadAndBlitBitmap(TEXT("outresized.bmp"), hdc,500,300);//loading a picture that constantly change
refresh=!refresh;
//RedrawWindow(hWnd,&fingerprintSection,NULL,RDW_INTERNALPAINT|RDW_VALIDATE|RDW_UPDATENOW|RDW_NOCHILDREN);
InvalidateRect( hWnd, &fingerprintSection, TRUE );
}
EndPaint(hWnd, &ps);
break;