I just learned how to make message-boxes,
heres the code:
How do I do so the message-box comes up but not DOS?Code:#include <iostream.h> int main() { MessageBox(NULL, "Message", "Title", MB_OK); }
I just learned how to make message-boxes,
heres the code:
How do I do so the message-box comes up but not DOS?Code:#include <iostream.h> int main() { MessageBox(NULL, "Message", "Title", MB_OK); }
Well first you have to include <windows.h> and your main should look like this
Code:#include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MessageBox(NULL, "Message", "Title", MB_OK); return 0; }
Woop?
It didn't worked, DOS is still coming up
Code:#include <windows.h> #include <iostream.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MessageBox(NULL, "Message", "Title", MB_OK); return 0; }
Last edited by Noxir; 07-09-2004 at 02:54 PM.
change your linker options to not create an console window and you should be golden
Woop?
Ok thanks for help
what compiler are you using?
Woop?
I checked "länkare" (linker on swedish) and there it was "Don't open console window" thnx a lot
Your welcome
Woop?