• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 623
  • Last Modified:

How do I add a "confirm close dialog box" to a FoxPro application that should appear when user clicks close (X) button?

I would like a confirmation dialog box ("There are unsaved changes. Are you sure you want to exit?") to appear when a user clicks on the close (X) button on a form in a FoxPro application. If user selects No the existing form should continue to be displayed.

Thank you.
0
Vijai
Asked:
Vijai
1 Solution
 
SteHCommented:
I think you need to handle the WM_CLOSE message. Open the dialog in this handler and only call the terminating function if yes was selected. Else do nothing.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now