I have been researching ways to make a DOS window disappear when starting a program. I have solved this, by using getconsolewindow() and setwindow(). The thing is, I still get a blip where the DOS appears for a couple miliseconds. Is there a way to fix that?

Clip of code:

#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <iostream>
int main()
HWND hWnd1 = GetConsoleWindow();
ShowWindow( hWnd1, SW_HIDE );

return 0;

Recommended Answers

All 2 Replies

Create a WINAPI/Win32 Application.. Remove all the callbacks and stuff.. Use WinMain instead and it will have no console.

Thanks that worked great!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.