Guest User

Untitled

a guest
Aug 4th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.88 KB | None | 0 0
  1. try this :
  2. type
  3.   TEnumProc = function EnumChildProc(inwm:hwnd;wparam:integer):boolean of object cdecl;
  4.   TwinFind = class(TObject)
  5.    ...
  6.   private
  7.     EnumChildProc : TEnumProc;
  8.    ...
  9.  
  10. procedure TwinFind.getWindowData(windowName:string;Sender:TObject);
  11. begin
  12.   //
  13. main_win:=FindWindow(nil,lpctstr(windowName));
  14. if main_win = 0 then Exit;
  15.  
  16. temp_win:=0;
  17. while EnumChildWindows(main_win,EnumChildProc,0)<>false do
  18. begin
  19.   //
  20. end;
  21.  
  22. or this :
  23.  
  24. try this :
  25. type
  26.   TEnumProc = function EnumChildProc(inwm:hwnd;wparam:integer):boolean; cdecl;
  27.   TwinFind = class(TObject)
  28.    ...
  29.   private
  30.     EnumChildProc : TEnumProc;
  31.    ...
  32.  
  33. procedure TwinFind.getWindowData(windowName:string;Sender:TObject);
  34. begin
  35.   //
  36. main_win:=FindWindow(nil,lpctstr(windowName));
  37. if main_win = 0 then Exit;
  38.  
  39. temp_win:=0;
  40. while EnumChildWindows(main_win,EnumChildProc,0)<>false do
  41. begin
  42.   //
  43. end;
Add Comment
Please, Sign In to add comment