Einzelnen Beitrag anzeigen

Benutzerbild von haentschman
haentschman

Registriert seit: 24. Okt 2006
Ort: Seifhennersdorf / Sachsen
5.289 Beiträge
 
Delphi 12 Athens
 
#33

AW: DevExpress + AlphaControls: Fehler #1 - Element '' hat kein übergeordnetes Fenste

  Alt 25. Okt 2018, 06:28
Hallöle...

Genervte Grüße.
Inzwischen habe ich die Alpha Controls entfernt. Das Problem ist geblieben, kommt aber an anderer Stelle.

einer der vielen Callstacks (5-10 Mal am Tag):
Code:
exception class   : EInvalidOperation
exception message : Element '' hat kein übergeordnetes Fenster.

main thread ($cac):
006e9f94 +0b4 SEAM.exe Vcl.Controls            TWinControl.CreateWnd
0096b1aa +022 SEAM.exe cxControls    8288   +3 TcxControl.CreateWnd
00a2aa97 +087 SEAM.exe cxContainer   3911  +12 TcxContainer.CreateHandle
00ab020e +00a SEAM.exe cxEdit        7745   +1 TcxCustomEdit.CreateHandle
00afd057 +013 SEAM.exe cxDropDownEdit 2617   +3 TcxCustomDropDownEdit.CreateHandle
0282a96b +00f SEAM.exe Form.MainMenu  361   +2 TfoMenuMain.pnlLeftClick
02d94c91 +d59 SEAM.exe SEAM           328 +216 initialization
Code Form.MainMenu (Auszug):
Delphi-Quellcode:
procedure TfoMenuMain.pnlLeftClick(Sender: TObject);
begin
  inherited;
  Self.Close; // <- 361
end;
! Auf dieser Form sind KEINE cxControls.

Der Fehler kommt aus Vcl.Controls:
Delphi-Quellcode:
  with Params do
  begin
    if (WndParent = 0) and (Style and WS_CHILD <> 0) then
      if (Owner <> nil) and (csReading in Owner.ComponentState) and
        (Owner is TWinControl) then
        WndParent := TWinControl(Owner).Handle
      else
        raise EInvalidOperation.CreateFmt(SParentRequired, [Name]); // <- hier, Name ist ""
...
Wenn ich aber ein beherztes Assign(Owner) vor das letzte inherited mache, werden die Controls nicht mehr gezeichnet!

Geändert von haentschman (25. Okt 2018 um 06:32 Uhr)
  Mit Zitat antworten Zitat