know where the form it was closed from

This is a discussion on know where the form it was closed from within the Windows Programming forums, part of the Platform Specific Boards category; hi, can i know how can i know from where the form was closed from i am useing C++ Builder ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    21

    know where the form it was closed from

    hi,

    can i know how can i know from where the form was closed from

    i am useing C++ Builder and i whant to know was the form
    closed from the X button OR from may Close BUTTON that i
    created in the form, the butten that i have created has
    this function insied
    {
    Close();
    }


    thank you ,,,


    bye,,,

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Snippet from your message handler:
    Code:
    switch(msg)
    {
       case WM_CLOSE:
          //Do something when pressing the X
          break;
    
       case WM_COMMAND:
          switch(LOWORD(wParam))
          {
             case ButtonClose:
                //Do something else when pressing the close button
                break;
          }
          break;
    }
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    21
    thank you
    it is working ...



    talal.

  4. #4
    Banned Cgawd's Avatar
    Join Date
    Oct 2002
    Posts
    405
    man, i didnt even understand what he was asking because of his grammar lol

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reopening a form ?
    By Aga^^ in forum C# Programming
    Replies: 1
    Last Post: 02-11-2009, 09:28 AM
  2. Calling datas from another form?
    By Aga^^ in forum C# Programming
    Replies: 2
    Last Post: 02-06-2009, 02:17 AM
  3. Accessing main form from functions in other classes
    By pj_martins in forum C++ Programming
    Replies: 1
    Last Post: 11-05-2004, 09:27 AM
  4. My UserControls dissapear off my form
    By zMan in forum C# Programming
    Replies: 2
    Last Post: 09-15-2004, 09:55 AM
  5. Making an MFC form to suit
    By TJJ in forum Windows Programming
    Replies: 1
    Last Post: 04-17-2004, 12:20 PM

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