Feddozz
Mechanical
- Dec 15, 2005
- 16
Hello everybody,
I'm developing a small dialog application. it's got the cancel button, when you press it it closes the application, and that's fine.
I want the application to be closed when I type in Alt+F4 or I click on the red cross button, the button you usually use to close every window.
My code at the moment appears like this:
What should I add to make it appen?
Thanks
I'm developing a small dialog application. it's got the cancel button, when you press it it closes the application, and that's fine.
I want the application to be closed when I type in Alt+F4 or I click on the red cross button, the button you usually use to close every window.
My code at the moment appears like this:
Code:
SUBROUTINE WinATDSub( dlg, id, callbacktype )
!DEC$ ATTRIBUTES DEFAULT :: WinATDSub
use user32
use dflogm
implicit none
include 'resource.fd'
type (dialog) dlg
integer id, callbacktype
if (callbacktype == dlg_destroy) then
call PostQuitMessage(0)
endif
END SUBROUTINE WinATDSub
Thanks