Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetActiveWindow()
Message
 
À
16/12/1997 23:07:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00066419
Message ID:
00066436
Vues:
36
Not really, although I tried both GetFocus and GetCapture to no avail.
This is what I'm trying to do:
I have developed a virtual keyboard program to be used with (light)pens. This keyboard app needs to know what was the last window before the vkeyboard got activated so it can send keycodes through a DDE link. To acomplish that I've been using GetActiveWindow on a timer from the vKeyboard app, that made it aware of the last active window and its status.
The user might move the mousepointer over other windows before getting to the vKeyboard, that's why using the window under the mouse would not make it to complicated (first thought).
What did you have in mind, though?

>So far, I understand you need rather to find the window under mouse, don't you?
>
>Vlad
>
>>Thanks for the reply. I don't have win32api.hlp, but in the 16bit version there's nothing mentioned about the thread concept. I guess that must be different in 32bit, which alters the question to how would one be aware of other existing windows throughout the system?
>>
>>
>>>I never used this function. But the following is from Win32API.hlp:
>>>
>>>"The GetActiveWindow function retrieves the window handle of the active window associated with the thread that calls the function."
>>>
>>>Since the other apps are in different threads, I doubt it returned correctly even from VB.
>>>
>>>Vlad
>>>
>>>>I am trying to get window handles of other applications from my app, and I've been using succesfully GetActiveWindow in VB3.0 (16bit). I am trying to do the same thing from VFP with DECLARE Long GetActiveWindow IN user32 (which declares it, no problem), but when it comes to running it I cannot get the handle of any other applications' window (returns 0), though it returns the correct handle when the VFP app running the function is active.
>>>>What am I missing? BTW, the function behaves identically in VB 5.0, so my problem must be something inherent to the GetActiveWindow function IN user32.
>>>>TIA
>>>>Sorin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform