Closing a win app

This is a discussion on Closing a win app within the C++ Programming forums, part of the General Programming Boards category; hi, all i need to know for now is how to close a windows application, like do the reverse of: ...

  1. #1
    Arias_One
    Guest

    Closing a win app

    hi, all i need to know for now is how to close a windows application, like do the reverse of:
    system("sol.exe");
    so that instead of opening solitair it closes it

    thanks in advance

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Use FindWindow() and SendMessage() to send a WM_CLOSE message to solitaires message queue.Look at msdn.microsoft.com for more information on these api functions.
    Also search these boards.We have done this before recently.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786
    Also, I think Ken did a prog example of this on the windows board.... do a search on his name over there...you might find something helpful

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MFC App Closing
    By UnclePunker in forum Windows Programming
    Replies: 2
    Last Post: 01-05-2006, 09:19 AM
  2. help with this
    By tyrantil in forum C Programming
    Replies: 18
    Last Post: 01-30-2005, 03:53 PM
  3. slight problem on win app tut
    By JustPlay4Fun in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2005, 10:42 AM
  4. Win app, newb question
    By Blender in forum Windows Programming
    Replies: 9
    Last Post: 02-04-2003, 11:17 AM
  5. Copy app to win dir
    By Unregistered in forum C Programming
    Replies: 7
    Last Post: 03-05-2002, 12:02 PM

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