Hi working in dev-c++ lastest version. Wondering if theres anyway of hiding a consol window so that the program im working on can be a properly working in the background. Please any ideas, or ways around this. Thanks richard
: Hi working in dev-c++ lastest version. Wondering if theres anyway of hiding a consol window so that the program im working on can be a properly working in the background. Please any ideas, or ways around this. Thanks richard :
well if you can get a handle to the console window just call ShowWindow( hWnd, SW_HIDE );
i blieve there is a function to get the handle to the console window, but im not sure, you might want to check around on msdn.
if not, then you can just use FindWindow() warning: if you use findwindow() then if there is a another window with the same name as your console then you run the risk of hiding it instead of yours.
: i blieve there is a function to get the handle to the console window, but im not sure, you might want to check around on msdn. : : if not, then you can just use FindWindow()
[b][red]This message was edited by RichardC at 2004-12-31 10:44:35[/red][/b][hr] Could anyone give me an example of how to use GetConsoleWindow(); and ShowWindow( hWnd, SW_HIDE );. having trouble. When i mean use i mean togther
: [b][red]This message was edited by RichardC at 2004-12-31 10:44:35[/red][/b][hr] : Could anyone give me an example of how to use GetConsoleWindow(); and ShowWindow( hWnd, SW_HIDE );. having trouble. When i mean use i mean togther : : : [code] #define _WIN32_WINNT 0x0500 #include #include using namespace std;
Comments
:
well if you can get a handle to the console window just call
ShowWindow( hWnd, SW_HIDE );
i blieve there is a function to get the handle to the console window, but im not sure, you might want to check around on msdn.
if not, then you can just use FindWindow()
warning: if you use findwindow() then if there is a another window with the same name as your console then you run the risk of hiding it instead of yours.
:
: if not, then you can just use FindWindow()
GetConsoleWindow().
Could anyone give me an example of how to use GetConsoleWindow(); and ShowWindow( hWnd, SW_HIDE );. having trouble. When i mean use i mean togther
: Could anyone give me an example of how to use GetConsoleWindow(); and ShowWindow( hWnd, SW_HIDE );. having trouble. When i mean use i mean togther
:
:
:
[code]
#define _WIN32_WINNT 0x0500
#include
#include
using namespace std;
int main()
{
HWND hWnd = GetConsoleWindow();
ShowWindow( hWnd, SW_HIDE );
return 0;
}
[/code]