Thread: know where the form it was closed from

  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
    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, 08:55 AM
  5. Making an MFC form to suit
    By TJJ in forum Windows Programming
    Replies: 1
    Last Post: 04-17-2004, 11:20 AM