Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can RUN window appear inside a VFP window?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01137462
Message ID:
01139015
Vues:
17
Thanks for the response, Anatoliy.

The caption of my DOS window was entirely different and I have a hunch that it will be different in other machines. Is there an WinAPI to get a list of all windows that you could call before and after the RUN in order to determine which window belongs to the RUN?

Alex

>Hi Alex,
>
>Here's what happens:
>
>- VFP application issues RUN command
>
>- OS creates a window with class "ConsoleWindowClass" and with -- most likely -- "FoxPro Run Command" caption
>
>- OS starts a process inside the console window
>
>At this point VFP application should call FindWindow API function
>
>DECLARE INTEGER FindWindow IN user32;
>	STRING lpClassName,;
>	STRING lpWindowName
>
>passing either "ConsoleWindowClass" class name or "FoxPro Run Command" caption, or both as input parameter(s). The handle returned can be used for following SetParent call. The RUN shold be NOWAIT, otherwise the VFP application may halt until the issued RUN returns.
>
>BTW, there's no guarantee that SetParent would work with console windows. On other occasions I found them to be very special animals :)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform