Autor Beitrag
thepaine91
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 763
Erhaltene Danke: 27

Win XP, Windows 7, (Linux)
D6, D2010, C#, PHP, Java(Android), HTML/Js
BeitragVerfasst: Fr 15.01.10 12:28 
Hi,

ich versuche atm vergeblich folgendes:
ausblenden Delphi-Quelltext
1:
2:
3:
function EnumWindowsProc(wHandle: HWND; apphandle: Cardinal): Bool; stdcallexport;

EnumWindows(@EnumWindowsProc, Application.Handle); // Fehler: Variable erforderlich

stehe gerade total auf dem Schlauch kann mir vielleicht jemand Helfen? ;)
Ps: wäre super :P

Edit: Also wenn ich EnumWindowsProc auslagern würde in eine Dll klappt es das weis ich aber ist mir eigetnlich zu umständlich bzw. unpraktisch wegen einer funktion eine Dll zu laden etc...
Horschdware
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 744
Erhaltene Danke: 54

Win XP Pro, Win 7 Pro x64
Delphi 7, Delphi XE, C++ Builder 5, SAP R/3
BeitragVerfasst: Fr 15.01.10 14:25 
www.delphi-forum.de/...se+methode+ermitteln

Wenn ich das aus dem alten Thread richtig deute, dann sollte das hier gehen:

ausblenden Delphi-Quelltext
1:
EnumWindows(@TForm1.EnumWindowsProc, Application.Handle);					

_________________
Delphi: XE - OS: Windows 7 Professional x64
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 15.01.10 14:49 
EnumWindows will einen Funktionszeiger und keinen Methodenzeiger. Da musst du von der Klasse losgelöst wohl die Funktion deklarieren ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
thepaine91 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 763
Erhaltene Danke: 27

Win XP, Windows 7, (Linux)
D6, D2010, C#, PHP, Java(Android), HTML/Js
BeitragVerfasst: Fr 15.01.10 14:55 
BENBE zuverlässig wie immer das Stichwort hat mir gereicht Vielen Dank an alle.

EDIT: Wusste doch ich überseh was und es ist eigentlich total simple. -.-