minimizing of console

hi,

I wrote a small C++-console program, which runs in the background and controls a Visual C#-application. It works fine, but the big black console disturbs me. I would like to start this c++ program with a console minimized to a symbol. Is that possible?

I would be grateful for any help...
Does it need to be a console program?

Maybe you can just make a WinAPI program and just not create a window.
yes you can make just WinAPI APP for it
I have the perfect solution, i used this in an earlier project. I was making a cute little keylogger for my pc.

This is only for windows**

1
2
3
4
5
6
7
8
9
10
11
void setConsoleVisibility(bool isVisible)
{
	HWND hConsole;
	AllocConsole();
	hConsole = FindWindowA("ConsoleWindowClass", NULL);

	if(isVisible)
		ShowWindow(hConsole, 1);
	else
		ShowWindow(hConsole, 0);
}


EDIT:
You have to include <windows.h>
Last edited on
The solution proposed by Thumper proved really perfect in my case, thank you!
Topic archived. No new replies allowed.