How to use void HideConsole() ??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cosmos22
    New Member
    • Feb 2008
    • 9

    How to use void HideConsole() ??

    The following code for me doesn't work, I want to hide the console window in the easiest possible way:

    void HideConsole();
    {
    ShowWindow(GetC onsoleHwnd(),SW _HIDE);
    }


    I used this ref.



    It states GetConsoleHwnd( is undeclared, any ideas?
    void HideConsole(); on its own doesn't work at all...


    Thanks all!
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    It means GetConsoleHwnd( ) is not a Win32 function.

    You may have to use FindWindow() instead.

    Comment

    • Studlyami
      Recognized Expert Contributor
      • Sep 2007
      • 464

      #3
      Heres a reference on how to get the console hwnd using find window. Hopes this helps.

      Comment

      Working...