Thread: recognizing that the programming is closing

  1. #1
    swordfish
    Guest

    Red face recognizing that the programming is closing

    I want to add a function that does something when the x on the top right hand side of the window is pressed. Is there a function that recognizes when the program is exiting?

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    46
    When the X button is pushed, a WM_CLOSE msg is sent to the winow. Just handle that msg and put your function in there.

  3. #3
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    Look in your code for WM_CLOSE
    you will be see the exit code
    PostQuitMessage

    anything you want to do before it closes must go before here
    Monday - what a way to spend a seventh of your life

  4. #4
    Registered User ski6ski's Avatar
    Join Date
    Aug 2001
    Posts
    133

    Off the subject....

    I looked at case, but didnt try it because I dont know what it does. Maybe a little explination before anyone tries it would be nice. Send me the link when you get some information on it......
    C++ Is Powerful
    I use C++
    There fore I am Powerful

  5. #5
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    Case is a computer acronym search engine that searches over 700 computer and related acronyms. the description is available if you click on 'about case'. However i see your point and have added a line to the page explaning what it is. The next update (at some point tonight will add a furher 2-300 acronyms to the database)
    Thanks for the input and i hope you all find case to be a useful tool.
    iain
    ([email protected])
    Last edited by iain; 09-08-2001 at 02:03 PM.
    Monday - what a way to spend a seventh of your life

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. socket programming question, closing sockets...
    By ursula in forum Networking/Device Communication
    Replies: 2
    Last Post: 05-31-2009, 05:17 PM
  2. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 05:59 PM
  3. Closing a binary file before it ends
    By cedrik23 in forum C Programming
    Replies: 8
    Last Post: 12-11-2007, 01:26 PM
  4. closing microsoft internet explorer
    By canine in forum Windows Programming
    Replies: 11
    Last Post: 03-19-2002, 09:12 AM
  5. Bloodshed not recognizing "string"!?
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 02-20-2002, 12:09 PM