I have a windows program:
After the CreateDialog call, the window comes up, but it doesn't seem to refresh itself. I have one meter, some text and a bitmap-picture on it. How do I refresh it? Can I use the SHowWindow callagain? Could I set a timer to call it over and over again?
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
hCurPage = CreateDialog (hInst, MAKEINTRESOURCE(IDD_DIALOG_WINDOW), NULL, (DLGPROC) WndProc);
hwnd being the window you want to force to update.
InvalideRect with the parameters shown above will force a full redrawing of the window. UpdateWindow forces it to happen right then.
If you call CreateDialog() to show your dialog, then you need still need to have a message loop somewhere where you call IsDialogMessage(). Is it your intention to create a modeless dialog, or are you just trying to create a dialog application?
If you are just trying to create a dialog application, then use the function DialogBoxParam() instead of CreateDialog().