Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DestroyWindow
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00420813
Message ID:
00420887
Vues:
32
>>Hi Geoege,
>>
>>What I've done is the following:
>>
>>* This is a call to a function that will check if the program is running on the users system
>>nexe_running = is_run32(node_cursor.exe_title)
>>* If the program is running
>>IF nexe_running > 0
>> * Close down the program
>> close_window(nexe_running)
>>ENDIF
>>
>>I've used your function to get the handle
>>
>>I've change the procedure to:
>>
>>PROCEDURE close_window
>> LPARAMETER hhndl
>> * This procedure will close all active
>> * programs that were called from this program.
>> #DEFINE WM_CLOSE 0x0010
>> DECLARE INTEGER SendMessage IN Win32API;
>> INTEGER hwnd, INTEGER uMsg, INTEGER wParam, INTEGER lParam
>> * hhndl is the Window handle to close
>> * Close and allow prompt to save changes
>> = SendMessage(hhndl, WM_CLOSE, 0, 0)
>>
>>Based on what Larry said & the FAQ you pointed out. This works fine now. But like I asked Larry, Will this execute the sqldisconnect() that is in the code of the .exe I am shutting down? That is my concern at the moment.
>>
>>TIA
>
>Mike,
>
>It might, depending on where the code to call SQLDISCONNECT() is. I'd make a SWAG saying that if it's in the QueryUnload or maybe Destroy method it might. The only way to know for certain would be to test it.

This is true. I tested this using an object (could be your global application object). The Destroy event does fire when the application is shut down using the WM_CLOSE message.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform