Einzelnen Beitrag anzeigen

WS1976
(Gast)

n/a Beiträge
 
#1

Frage zu getfocus und ähnlichem

  Alt 25. Okt 2007, 08:04
Hallo,
ich habe folgendes Verständnisproblem:
t,s,a,b sind alle Typ HWND
t:=getfocus;
s:=GetForegroundWindow;
a:=application.Handle
b:=form1.Handle

Ich lasse ein selbst erstelltes Programm laufen, das alle 1000ms die oben genannten Informationen abruft!

s:=GetForegroundWindow; und b:=form1.Handle sind identisch (solange mein Prog(Fenster) den Fokus hat). Dies hatte ich auch so erwartet.

Zitat:
In der SDK steht:
The GetFocus function retrieves the handle of the window that has the keyboard focus, if the window is associated with the calling thread's message queue.
danach müsste getfocus eigentlich ebenfalls das handle des Fensters zurückgeben!
Versteh ich was falsch?

Hab ich auch probiert:
t:=getfocus; und a:=application.Handle sind unterschiedlich.

Grüsse
Rainer
  Mit Zitat antworten Zitat