C++ Not Close problem

Discussion in 'Programming' started by Lucky_romania, Dec 11, 2010.

  1. #1
    I need a code to make the ms-dos program don`t close even if i press the "x" button.

    Any idea please?


    Thanks
     
    Lucky_romania, Dec 11, 2010 IP
  2. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #2
    That wouldn't work. Your program does not have permissions to do so on Windows.

    You have two options:

    1) Create your own console and set it as a handler instead of the built in console, or somehow alter the built in console.
    2) Make the application have it's own console (more like a front end application).

    This is from a windows point of view, not sure if its possible through Linux/Mac
     
    ThePHPMaster, Dec 13, 2010 IP
  3. Lucky_romania

    Lucky_romania Active Member

    Messages:
    710
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    50
    #3
    I found a simple way, but not like i told..I made a program that make MS-DOS full screen automaticly, user can`t press any button, only way to close is CTRL+ALT+DELETE, ALT+TAB, ALT+ENTER(exit fullscreen shourcut)
     
    Lucky_romania, Dec 14, 2010 IP