win32/console

This is a discussion on win32/console within the C++ Programming forums, part of the General Programming Boards category; Hi everyone I built my code using console application, one problem is that I would like to stop the black ...

  1. #1
    yes
    yes is offline
    Registered User
    Join Date
    Jan 2006
    Posts
    32

    Question win32/console

    Hi everyone

    I built my code using console application, one problem is that I would like to stop the black screen from appearing, when I run my .exe part how could I stop it.

    In win32 you can by using

    Code:
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
    but this can not be used with Console application.

    anyone have idea to help me.

  2. #2
    60% Braindead
    Join Date
    Dec 2005
    Posts
    379
    Black screen? You mean the MS-DOS prompt? You cant to my knowledge, you have to run a win32 app with no UI/window.
    Code:
    Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)

  3. #3
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,074
    Quote Originally Posted by yes
    Code:
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
    Think about this. There are options where you don't see the console.
    Last edited by SlyMaelstrom; 02-01-2006 at 03:24 AM.
    Sent from my iPadŽ

  4. #4
    60% Braindead
    Join Date
    Dec 2005
    Posts
    379
    Yes but using that you might as well compile a blank windows app :P. But yeah, that works to -,-.
    Code:
    Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)

  5. #5
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,074
    Ooops, I think he's asking how to run a console program without the window ever popping up.

    Check this out: http://www.codeproject.com/win32/runsilent.asp
    Last edited by SlyMaelstrom; 02-01-2006 at 04:18 AM.
    Sent from my iPadŽ

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21