-
Hiding prompt screen
when compiling this program and executing, it pops up a message box on yes/no choices. However, I do not want the prompt screen to appear on the screen.
I only want the message box to appear when the file is executed.
Can someone give me an advice on this?
Code:
#include <windows.h>
int main(void) {
int back;
back = MessageBox(NULL, "Is it sunny outside?", "Question", MB_YESNO | MB_ICONQUESTION);
return 0;
}
-
Don't use a console app? Is the easiest way.
Otherwise, hide the window as soon as it appears, search around MSDN for such things like FindWindow() Show() or whatnot.
-
Hello zacs7, been while. :)
what's a console application?
I'd like the prompt screen to not appear at all when the file is executed. And I quite don't know how and when I should be using FindWindow() nor Show().... ? :(
-
Well, what IDE / compiler are you using?
The best option is to use a Win32 Application (Or whatever), that way no window is created :)
-
Hmm! I've got it! Thank you, zacs7. :)