Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detect when mouse clicks on "x" (close option)

Status
Not open for further replies.

nbgoku

Programmer
May 25, 2004
108
US
hi, iwant to detect when the mouse clicks on the "x" option to close/exit the program, the reason is i want to have a message popup after they click on the "x", any ideas?
 
i am shure there is an eventhandeler for close. if your using .net, i would try OnExit, or OnClose or somthing along those lines. im sorry i cant look into it further becuse i dont have any compiler handy right now...
 
You need to intercept the WM_CLOSE message. If you are using MFC in a document/view architecture, this is done in the CMainFrame class.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top