Exit with error in winmain
I want to exit and pop up an error at the start of winmain.
There is no window created yet.
Can I do it somehow?
# 1 Re: Exit with error in winmain
You can use MessageBox to popup a message, and then you can exit the application (not the other way around).
- petter
# 3 Re: Exit with error in winmain
Like So:
#include <windows.h>
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpArgs, INT iShow)
{
MessageBox(NULL, "Way Too Simple Of A Program", "My Box", MB_OK);
return 0;
}