I have a Window created on an embeddeed system. In the Window is a progressbar that is moving. After a while, the screen turns black and only the progress bar is visible. I think it has to do with the environment somehow. I want my WIndow to be visible and have an idea that it could be done with a timer. However, I haven't programmed C in WIndows so much so I'm slightly green.

What do I need to do to get my Window refreshed over and over again, lets say every 15th second?

Do I need to do something with the callback procedure, or can I get another one for the timer? My program looks something like this:

Code:
HWND hCurPage = NULL;


LRESULT CALLBACK WndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
  switch( uMsg )
  {

  case WM_INITDIALOG:
	return TRUE;

  case WM_DESTROY:
    PostQuitMessage( 0 );
    break;
  default:
    return( DefWindowProc( hwnd, uMsg, wParam, lParam ) );
  }
  return 0;
}



int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
	LPSTR lpCmdLine, int nCmdShow)
{


hCurPage = CreateDialog (hInst, MAKEINTRESOURCE(IDD_DIALOG_WINDOW), NULL, (DLGPROC) WndProc);

return 0;

}