Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Messagebox API
Message
 
À
14/02/2001 13:11:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00475884
Message ID:
00475895
Vues:
38
>Hi
>
>I am trying to use the API function MessageBoxEx so that I can have a 'help' button on messageboxes.
>
>According to the SDK, when the help button is clicked MessageBoxEx sends a WM_HELP message to it's owner, whose HWND is the first parameter to MessageBoxEx. From the SDK on WM_HELP "Indicates that the user pressed the F1 key". Seems like the behaviour desired.
>
>Whatever I do, VFP does nothing, the way it does nothing if I press F1 with a standard messagebox active.
>
>I have tried sending _vfp.hwnd, _screen.hwnd (I was surprised when they were different.., and yes I am using VFP7 but it still holds for VFP6) and sending 0 to indicate no owner window.

>Does anyone know - can VFP respond to this message? Is there a way of testing that it is being sent to the right place? Does anyone have a better idea???
>
>Cheers,
>
Stuart,

I doubt if it can respond to this. I'm assuming that the main VFP window is the owner. You could probably check using Spy++ that comes with Visual Studio. You could also (even though it won't make a difference) use it to confirm that the WM_HELP message was sent. This is being handled by the WndProc() function of the owner window and has to be sent to properly handle it. My SWAG, that because VFP isn't generating the window from its own internal call, it may not recognize that the F1 key was meant for it.
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