If you use main() as your entry point when building a program on MS Windows then there will be a black console window associated with your application. If you want your application to not have this console window then you need to build using the WinMain() entry point as shown below and also set your compiler to produce a "Windows" project instead of a "Console" project. In visual studio this can
| 159 | // Linker->System->SubSystem and selecting Windows instead of Console. |
| 160 | // |
| 161 | int WINAPI WinMain (HINSTANCE, HINSTANCE, PSTR cmds, int) |
| 162 | { |
| 163 | main(); |
| 164 | return 0; |
| 165 | } |
| 166 | #endif |
| 167 | |
| 168 | // ---------------------------------------------------------------------------------------- |