Submitted by Anonymous on Wed, 04/23/2003 - 11:42.
Sir,
Can XmNdestroyCallback, resource be used when i want to use the CLOSE option on the window frame to close the window?? i get to understand that the event WM_DELETE_WINDOW is triggered whenever i use the CLOSE option. Does that mean i need to listen to the event and cannot use any callback resource?? please help
Wed, 04/23/2003 - 22:46#1
ICS_support
Using "CLOSE" option
There is a two-part mechanism. When the user hits "Close" on the window manager`s menu, your application, if it so chooses, can receive the WM_DELETE_WINDOW message. Motif provides a structure for receiving this message through the Shells. In that message callback, you are expected to do the appropriate thing for your application -- typically destroying the widgets associated with this tree (which may be the main window, in which case you can destroy everything). It is then that Xt gives you the XmNdestroyCallback, which you can use to clean up other resources before exiting.