Thread: win32/console

  1. #1
    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,079
    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 04: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,079
    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 05:18 AM.
    Sent from my iPadŽ

Popular pages Recent additions subscribe to a feed