hiding console window

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

Comments

  • : 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()


    GetConsoleWindow().
  • [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;

    int main()
    {
    HWND hWnd = GetConsoleWindow();
    ShowWindow( hWnd, SW_HIDE );

    return 0;
    }
    [/code]

  • wow thanks n' happy new year
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories