Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This function is designed mistaken for me.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00972864
Message ID:
00973152
Vues:
37
>On documentation:
>
>SYS(2325) - WCLIENTWINDOW from Visual FoxPro WHANDLE
>

>
>SYS(2325) returns the hWnd (Window Handle) for a client window (WCLIENTWINDOW) of a specified Visual FoxPro parent window.
>nWHANDLE is returned if nWHANDLE is valid but there is no WCLIENTWINDOW.
> 0 is returned if nWHANDLE is invalid.
>

>
>Therefore this function returns a Natural(31) that can mean two different things.
>Then the function return a ambiguous value.
>If it returns to me a positive integer, is it a nWHANDLE or a hWnd ?
>Example:
>
>returnValue=SYS(2325,SYS(2326, m.Thisform.Hwnd))
>DO CASE
>  CASE m.returnValue=0
>       * ERROR
>  CASE && i cannot write something here.
>* I must compare it with nWHANDLE ?
>* Is it sure that a nWHANDLE it cannot match with a HWnd? No, It does not have it are it.
>* CASE m.returnValue=SYS(2326, m.Thisform.Hwnd)
>     returnValue=m.Thisform.Hwnd
>*
>
>
>Expected definition:
>
>SYS(2325) returns the hWnd (Window Handle) for a client window (WCLIENTWINDOW) of a specified Visual FoxPro parent window.
>hWnd of nWHANDLE is returned if nWHANDLE is valid but there is no WCLIENTWINDOW.
> 0 is returned if nWHANDLE is invalid. ( I wish NULL, but 0 is not a drama )
>
>
>With this i'm sure that the value is a Hwnd, and i use it without ambiguity.
>
Fabio,

A whandle and an hWnd are two entirely different things. The whandle is a value that VFP assigns internally to its windows. An hWnd is a value that the OS assigns to a window. VFP uses the whandle value to internally manage its forms.

AFAIK, you have to use the Foxtools.fll library to get a whandle. It has functions such as _WMainWind() and _WFindTitl() that return the whandle.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform