Closing Programs?

This is a discussion on Closing Programs? within the C++ Programming forums, part of the General Programming Boards category; How do I close a program through C++?...

  1. #1
    BubbleMan
    Guest

    Question Closing Programs?

    How do I close a program through C++?

  2. #2
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Arrow wel...

    That depends wut you mean... Close a window or remove a proccess?

    SPH

  3. #3
    BubbleMan
    Guest

    Post Ok..I meant

    I meant if something like Internet Explorer was open, how would I close it using C++?

  4. #4
    Registered User canine's Avatar
    Join Date
    Sep 2001
    Posts
    125
    I had the same question so if anyone would reply it would be very helpful.....

  5. #5
    Registered User johnnie2's Avatar
    Join Date
    Aug 2001
    Posts
    186
    If you wanted to close an Internet Explorer window, you could use EnumWindows() to loop through all windows one at a time, calling GetWindowText() in your proc to get the title. If "Internet Explorer" is found in the title, send the window a WM_CLOSE message, and you're done.
    "Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 06:59 PM
  2. Recommend upgrade path for C programs
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-22-2007, 07:32 AM
  3. Closing other programs. (C++)
    By Mithoric in forum Windows Programming
    Replies: 19
    Last Post: 09-02-2005, 08:35 PM
  4. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 05:42 AM
  5. Programs opening programs
    By LinuxPLC in forum C Programming
    Replies: 1
    Last Post: 11-21-2002, 12:50 PM

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