Results 1 to 6 of 6

Thread: Hiding the console

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    Minnesota
    Posts
    15

    Hiding the console

    I am trying to make it so my consol app runs in the backround like a server, but the dos window pops up and I want it to be hidden. Any ideas on how to do this?

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Maybe you could use FreeConsole(). Note that this destroys the console rather than just hiding it, and I'm not sure if it works with the predefined console. Otherwise, there may be a function that retrieves the window handle of the console (You could use FindWindow) so you can hide the wondow using ShowWindow(SW_HIDE).
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    If you don't want a console, why not make a normal Win32 program? IE: one that begins at WinMain.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Maybe he doesn't want to write the window code?
    Alcohol & calculus don't mix.
    Never drink & derive.

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    Minnesota
    Posts
    15
    or know how :P

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You don't need to. If you don't want anything to pop up then you can just run your program normally.

    Or...you can change your project settings

    Under "Link", add the following into the textbox at the bottom with all the options:

    /subsystem:windows /entry:mainCRTStartup
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width