Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Menubar 'ON BAR' triggered via keyboard or mouse click?
Message
De
05/04/2006 01:13:17
 
 
À
04/04/2006 15:13:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01110101
Message ID:
01110506
Vues:
23
>
>That sounds like exciting news! Congratulations and good luck.
>

Yes I am excited! Thanks

>My application is based on a top level form with modal and non-modal child windows. Do I need to have each form bindevent() to WM_SYSCHAR and WM_KEYUP or can I just bindevent() to these messages in my top level form's Init() code?
>

I think you just need to bind only once (HWND = 0 / NULL). It will receive messages from all windows that created by VFP. I think it's better if you create a class for this. And create a "Form Name" property. Fill this property on the activation of the form, so the class will know which one is the active form. Otherwise you have to check which one is the active form from the "hWnd" parameters

The only thing here is you don't get the message from windows which the classname was not created by VFP, such as menu/popup. So you can't bind to WM_LBUTTONUP. If you want you can create a low level hook (WH_MOUSE_LL) simply monitor WM_LBUTTONUP that will be send to your apps, all is done!

>Or ... perhaps an easier technique ... do you know if there's a Windows API equivalent to lastkey() that I can check even after the keystroke event has passed?
>

Maybe you can use timer and call GetAsyncKeyState() / GetKeyState(), but I won't rely on this

>Thanks - its great to be back! :)

Best luck!
Warm regards
Herman
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform