If you're using multiple windows for your application and only one is supposed to close the application when you hit the close button(X), is it possible to program the other windows to do something specific when you hit the close button(x)?
Yes, it is possible and reasonably straightforward. There should be plenty of resources and tutorials available for googling online to get you started if you don't have a suitable book.
Give it a try, and get back to us if you run into problems.