Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_SCREEN.hWnd, FindWindow() and MAINHWND()
Message
De
31/07/2001 14:38:23
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00537608
Message ID:
00537927
Vues:
44
>Have you looked at my code in SpyFoxFox? While it retrieves all the existing windows from the Windows Desktop down, it wouldn't take too much to modify to fit your needs.

OK, thanks. Here's what I came up with:
   THISFORM.Get_Next( GetWindow( MAINHWND(), GW_CHILD ) )

*---------------------------------------------------------
PROCEDURE Get_Next
*---------------------------------------------------------
   LPARAMETER TN_Next

   LOCAL LN_Next

   m.LN_Next = m.TN_Next

   DO WHILE m.LN_Next <> 0
      m.LN_Next = GetWindow( m.LN_Next, GW_HWNDNEXT )

      THISFORM.Get_Next( GetWindow( m.LN_Next, GW_CHILD ) )
   ENDDO
>Using AddProperty() for the _SCREEN or _VFP might break existing code. In playing around with the beta, I noted that forms designed in 6.0 with a custom hwnd property didn't cause any problems when opened in 7.0. The only problem that I ran into was code that assigned the property (via _WhTohWnd() and _WFindTitl() in Foxtools) generated an error since the property in 7.0 is read-only. Fairly simple to workaroud with a compiler directive, however.

Directives would work. However, I try to avoid stepping on VFP's naming standards to start with; I had a custom "hwnd" property and called it "H_Window". All my custom properties employ an underscore somewhere in order to avoid collisions with VFP.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform