mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 11:59:18 +02:00
added more Delphi win32 compatibility functions
git-svn-id: trunk@2131 -
This commit is contained in:
parent
4b6e7a6a92
commit
c9fcd3bc12
@ -2205,10 +2205,8 @@ begin
|
|||||||
|
|
||||||
CreateParams(Params);
|
CreateParams(Params);
|
||||||
with Params do begin
|
with Params do begin
|
||||||
if (WndParent = 0) and (Style and WS_CHILD <> 0) then begin
|
if (WndParent = 0) and (Style and WS_CHILD <> 0) then
|
||||||
// raise EInvalidOperation.CreateFmt('Control ''%s'' has no parent', [Name]);
|
RaiseGDBException('TWinControl.CreateWnd: no parent');
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
Assert((parent <> nil) or (WndParent = 0), 'TODO: find parent if parent=nil and WndParent <> 0');
|
Assert((parent <> nil) or (WndParent = 0), 'TODO: find parent if parent=nil and WndParent <> 0');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2232,6 +2230,26 @@ begin
|
|||||||
//WriteClientRect('D');
|
//WriteClientRect('D');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{------------------------------------------------------------------------------
|
||||||
|
TWinControl Create Component
|
||||||
|
------------------------------------------------------------------------------}
|
||||||
|
procedure TWinControl.CreateComponent(AOwner : TComponent);
|
||||||
|
begin
|
||||||
|
if HandleAllocated then
|
||||||
|
RaiseGDBException('TWinControl.CreateComponent: Handle already created');
|
||||||
|
CNSendMessage(LM_CREATE, Self, nil);
|
||||||
|
if not HandleAllocated then
|
||||||
|
RaiseGDBException('TWinControl.CreateComponent: Handle creation failed');
|
||||||
|
end;
|
||||||
|
|
||||||
|
{------------------------------------------------------------------------------
|
||||||
|
TWinControl Destroy Component
|
||||||
|
------------------------------------------------------------------------------}
|
||||||
|
procedure TWinControl.DestroyComponent;
|
||||||
|
begin
|
||||||
|
CNSendMessage(LM_DESTROY, Self, nil);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TWinControl.InitializeWnd
|
Method: TWinControl.InitializeWnd
|
||||||
Params: none
|
Params: none
|
||||||
@ -2300,8 +2318,7 @@ begin
|
|||||||
if (Parent <> nil) then
|
if (Parent <> nil) then
|
||||||
Parent.HandleNeeded;
|
Parent.HandleNeeded;
|
||||||
end;
|
end;
|
||||||
if not HandleAllocated then
|
CreateHandle;
|
||||||
CreateHandle;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2525,6 +2542,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.108 2002/12/27 17:12:38 mattias
|
||||||
|
added more Delphi win32 compatibility functions
|
||||||
|
|
||||||
Revision 1.107 2002/02/09 01:48:23 mattias
|
Revision 1.107 2002/02/09 01:48:23 mattias
|
||||||
renamed TinterfaceObject.Init to AppInit and TWinControls can now contain childs in gtk
|
renamed TinterfaceObject.Init to AppInit and TWinControls can now contain childs in gtk
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user