AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi Overflow Error bei EnumChildWindows
Thema durchsuchen
Ansicht
Themen-Optionen

Overflow Error bei EnumChildWindows

Ein Thema von Neutral General · begonnen am 2. Jan 2005 · letzter Beitrag vom 7. Jan 2005
Antwort Antwort
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#1

Overflow Error bei EnumChildWindows

  Alt 2. Jan 2005, 18:49
ich baue eine Komponente die alle ChildWindows eines Fensters anzeigt.

Dazu hab ich eine Function aus der Schweiz (etwas abgeändert,aber nur bei LinesAdd...) :

Delphi-Quellcode:
function EnumProc(wnd: HWND; Lines: TStrings): BOOL; stdcall;
var
  buf, Caption: array[0..255] of char;
  classname : PChar;
begin
  Result := True;
  GetClassName(wnd, buf, SizeOf(buf) - 1);
  SendMessage(wnd, WM_GETTEXT, 256, Integer(@Caption));
  GetClassName(wnd,classname,10);
  Lines.Add(Format(' %s : %d , Caption: %s ',
           [buf, wnd, Caption]));
end;
Die funktioniert auch prima aber meine Komponente hat einen eingebauten Timer in dem etwa das steht :

Delphi-Quellcode:
procedure TMeinControl.Timen(Sender : TObject);
begin
// FControl : TComboBox;
FControl.Clear;
EnumChildWindows(Parent.Handle, @EnumProc, Integer(FControl.Items)); //Parent.Handle nur zur Probe
// Unwichtiges ausgelassen
end;
aber wenn ich diese Komponente auf mein Formular mache bekomme ich nach kurzer ZEit einen OverflowError
Weis jemand woher der kommen kann ?
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#2

Re: Overflow Error bei EnumChildWindows

  Alt 7. Jan 2005, 14:54
*Auf Antworten warte*
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Antwort Antwort


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 11:37 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz