Thread: Closing a win app

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