hi,
I wrote a very simple program in c using windows.h and when I compile it and run it I get a DOS window and them my windows message box
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
MessageBox(NULL, "Good Morning", "BOO!!!", MB_OK);
return 0;
}
this is the code though I think it's irelevant, and I tryed compiling the code in Visual c++ and I don't get the DOS window there.
Can anyone pls tell me how to get rid of that?
ty
Hi !
Did you chose the right project template (Win32 GUI project) to build your exe?
Dje
The debug-version uses afaik a dos-window.
Quote from: jens on June 29, 2008, 10:15:52 AM
The debug-version uses afaik a dos-window.
ty ;) I modified my project to be for relese only and I got rid of that DOS window ;)
Quote from: serverul on June 29, 2008, 09:41:05 AM
...
Can anyone pls tell me how to get rid of that?
Add
-mwindows to linker options.
Two Ways:
1. you can change the "built target" into "release"
2. In the project->properties->build targets , the "Type" choose "GUI application"
They are mostly the same