Originally Posted by
Quantum1024
Since you are using the dialog as your main window then you could just use a modal dialog and avoid create a message loop with the DialogBox macro.
Blah, its been a long day. Thank you Quantum, of course I could do that. Revised code would look something like this for future reference:
Code:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
return DialogBox(hInstance, MAKEINTRESOURCE(IDD_CALC), NULL, CalcProc);
}
I think... I didn't look up the API but I think the CreateDialog and DialogBox functions have the same parameters. But what they do is quite different