Konsole schließen



  • Moin,

    lese hier dauernd, wie ich verhindern kann, dass die Konsole geschlossen wird. Ich will gerade das!

    [code]
    #include <windows.h> // ShellExecute()

    main()
    {
    // initialize all the parameters to pass to the API
    HWND hwnd = NULL;
    LPCTSTR lpVerb = "open";
    LPCTSTR lpFile = "http://www.web.de";
    LPCTSTR lpParameters = NULL;
    LPCTSTR lpDirectory = ".";
    INT nShowCmd = SW_SHOWNORMAL;

    // Open this file in the associated viewer
    ShellExecute(hwnd, lpVerb, lpFile, lpParameters, lpDirectory, nShowCmd);

    return 0;

    }
    [/code}



  • hi

    in dem konsolenfaq steht eine lösung für win32 konsole.

    ansonsten geht auch über eine win32 applikation sowas:

    #include <windows.h> 
    int WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int ) 
    { 
      MessageBox( NULL, "test", "test", MB_OK ); //hier dann deins
      return 0; 
    }
    

Anmelden zum Antworten