Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetMessage API Hook in Form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00888527
Message ID:
00890080
Vues:
22
David -
Sorry I was not able to reply until now.

What is happening is that I run a main program--not a form--that launches the FoxPro desktop and replaces the FoxPro system menu with my own custom menu (made with the FoxPro menu designer). The user then makes a menu selection which launches a form. That form has a title bar. And, of course, on the left side of the title bar is the Windows OS System Menu represented by the FoxPro fox icon. The options on that menu are "Move" and "Close Ctrl+F4". On the right side of the title bar is the Windows OS close button. When the user clicks the Windows OS close button, or double clicks the fox icon, or selects the "Close Ctrl+F4" menu option, no events fire in the form, including the QueryUnload event. Hence, the form does not close. What I want to have happen is for the form to close, and the user be returned to the custom menu where the user may make other menu choices. In other words, I don't want FoxPro to close--just the form.

To get around this problem, I could remove the tile bar, or I could emulate a title bar. However, these approaches are a little tacky to me. There should be a way to capture the Windows operating system messages (i.e., the WM_SYSCOMMAND messages) that are generated and retrieved with the Windows API GetMessage when the user selects a title bar close option.

Do you know of a way I can retrieve those messages when no form events fire when the user tries to close the form using a title bar close option?

Again, thank you very much for your help!!!
Brent Hackett
Deseret Trust Company
801.433.1513
hackettbl@deserettrust.com
Brent L. Hackett
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform