Thread: Dos box woes

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    4
    Rep Power
    0

    Dos box woes


    Hi does anyone know a way or even have some code lying around (C++/C) that would allow me to set up a dos box that cannot be terminated?
    im working with windows 2000 and was asked to figure out how to make this happen and the long and short of it is i cant.

    Please help all replies will be appreciated.

    Thank you.
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    Any process that is running on a windows machine can be shutdown, be this through the task manager or through right clicking on the application title bar, or even sometimes just by clicking the close button (X) on the dos box.
    The only other thing you could really do is have another application (service maybe) running that is watching for this application and if it doesn't see it, then it starts it back.
  4. #3
  5. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,145
    Rep Power
    2222
    I'm guessing that there should be something in the Console API, but I couldn't find it. Kind of like how you can set a window's properties to enable or disable the exit button.

    There's a lot of Win32 Visual C++-specific brainpower over in CodeGuru's fora, so you might try there as well: http://www.codeguru.com/forum/

    BTW, you might want to be a bit more specific about what you are trying to do. At first, I misinterpreted your question as the perennial one from those who launch their DOS program directly from the VC++ IDE but cannot read the output because the DOS window (AKA "console") close immediately after their program terminates.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    4
    Rep Power
    0
    i understand that clarification should have been initialy made. i felt that my initial post was highly vague so ill tell you what i am supposed to be acheiving.

    i need a dos box to stay open because its going to display a list of policies on internet usage, its for a voluntry organisation that has a small network of computers for young people to use to find information on various youth related issues. the need for a policies box had been brought up through misuse of the internet. we use filters but as you must all be aware these are less than perfect and do absolutely nothing tow\ards peer to peer filesharing etc.

    so i just need a list of policies to be displayed at all times to act as a general warning and code of conduct. so as you can see this cant be killed, im not woried at this point on anythiing fancy just a working model would be fine but i dont understand the windows api all that well therefore dont know how to acheive it, i nievely figured there would be some kind of magic solution consisting of a few lines of code that would allow this to take place and even better allow it to be killed through a combination of key presses say ctrl+ whatever i could even set up a simple password system.

    the only real problem im facing is keeping the box open constantly.

    hope this clarifies my issue in a little more depth.

    thanks for your time...........
  8. #5
  9. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,145
    Rep Power
    2222
    OK, I assume that this will be on a Windows system and that you normally write Windows applications. Also, I assume that this is not part of another program, but rather is to be a separate application.

    Why not write a dialog-based app? You can define the border properties so that it does not have the corner buttons (or else will disable them) and you can make sure that you don't put any OK or Cancel buttons on it. If it needs to be visible at all times, including on top of the current application, then you should be able to set the Z-axis property to always keep it on top. The same thing can be done within an application by using a modeless dialog.

    The policy statement can be placed on the dialog as label controls or else, if the list is too long, then a scrollable listbox could be placed on the dialog and the policy statement inserted into it.

    Does that sound like what you need?
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    4
    Rep Power
    0
    that sounds spot on, exactly what i need eccept for the always on top which means i dont even need to go there, its a win2k environment the organisation uses so would there be a way to utilise alpha blending into it to make it semi transparent?
  12. #7
  13. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,145
    Rep Power
    2222
    You just went beyond my experience with alpha-blending. I would imagine that it should work. And even if you can't get a dialog app to work, there might be a way to display an alpha-blended graphic that contains the policy.

    You should probably post this in a new thread as a new question. It might also be a good idea to post it in CodeGuru as well, since this sounds a bit more specialized -- see my previous post for the link.
  14. #8
  15. Bad Andy
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    OH
    Posts
    275
    Rep Power
    12
    Something past dwise's knowledge? What is the world coming to?
  16. #9
  17. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,145
    Rep Power
    2222
    Originally posted by AGibel
    Something past dwise's knowledge? What is the world coming to?
    Oh, there's lots that I'm ignorant of. For instance, My C++ training and most of my C++ experience predate the new language standard (1998, I think that was finalized) and there's lots about the changes that I haven't learned yet.

    I've been learning a lot from the questions posted on this forum. I've even been able to answer an number of those questions simply by looking it up. My UNIX instructor tried to teach the class what I'd already learned, how to find the answers when questions arise. It's usually just that my general knowledge and experience suggest what kind of solution is needed and where to start looking for it. It's kind of like how I used to irritate my wife by coming up with the right question while watching Jeopardy, then commenting truthfully, "I didn't know that." I didn't, but the answer and the category would lead me to the question, more often than not.
  18. #10
  19. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    pretty much just general logic ;)

IMN logo majestic logo threadwatch logo seochat tools logo