AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

FindWindowEx Logik

Ein Thema von toms · begonnen am 12. Nov 2004 · letzter Beitrag vom 13. Nov 2004
 
Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#5

Re: FindWindowEx Logik

  Alt 13. Nov 2004, 13:38
Habe diese Antwort in der Delphi Newsgroup erhalten:

Zitat:
<quote
source="ms-help://MS.MSDNQTR.2004JAN.1033/winui/winui/windowsuserinterface/wind
owing/windows/windowreference/windowfunctions/findwindowex.htm">
If the lpszWindow parameter is not NULL, FindWindowEx calls the GetWindowText
function to retrieve the window name for comparison. For a description of a
potential problem that can arise, see the Remarks section of GetWindowText.
</quote>

The remarks section for GetWindowText is, however, somewhat misleading. The
naked truth is that GetWindowText cannot retrieve the caption of a window in
another process reliably because it is *not* using WM_GETTEXT in that case. And
that is what would have to be done to match on the caption in your FindWindowEx
call.
Fazit: Bei der FindWindowEx() Funktion lpszWindow nil übergeben, wenn sie
Childfenster in einem anderen Prozess sucht.

Grund: FindWindowEx vergleicht bei Angabge von lpszWindow die Übereinstimmung des FensterNamens (lpszWindow) mittels GetWindowText, welche aber nicht zuverlässig ChildFenster Text in einem anderen Prozess ermitteln kann.


Delphi-Quellcode:
HWND FindWindowEx(

    HWND hwndParent,   // handle to parent window
    HWND hwndChildAfter,   // handle to a child window
    LPCTSTR lpszClass,   // pointer to class name
    LPCTSTR lpszWindow   // pointer to window name
   );
Thomas
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:52 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz