Index: lcl/include/intfbasewinapi.inc
===================================================================
--- lcl/include/intfbasewinapi.inc	(revision 10679)
+++ lcl/include/intfbasewinapi.inc	(working copy)
@@ -27,6 +27,11 @@
 }
 //##apiwiz##sps##   // Do not remove
 
+function TWidgetSet.AllocateHWnd(Method: TLCLWndProc): HWND;
+begin
+  Result := 0;
+end;
+
 function TWidgetSet.Arc(DC: HDC;
   Left, Top, Right, Bottom, angle1, angle2: Integer): Boolean;
 var
@@ -182,6 +187,11 @@
   Result := 0;
 end;
 
+procedure TWidgetSet.DeallocateHWnd(Wnd: HWND);
+begin
+
+end;
+
 procedure TWidgetSet.DeleteCriticalSection(var CritSection: TCriticalSection);
 begin
   DebugLn('TWidgetSet.DeleteCriticalSection Not implemented yet');
Index: lcl/include/winapi.inc
===================================================================
--- lcl/include/winapi.inc	(revision 10679)
+++ lcl/include/winapi.inc	(working copy)
@@ -33,6 +33,11 @@
  ******************************************************************************}
 //##apiwiz##sps##   // Do not remove
 
+function AllocateHWnd(Method: TLCLWndProc): HWND;
+begin
+  Result := WidgetSet.AllocateHWnd(Method);
+end;
+
 function Arc(DC: HDC; Left, Top, Right, Bottom, angle1, angle2: Integer): Boolean;
 begin
   Result := WidgetSet.Arc(DC, Left, Top, Right, Bottom, angle1, angle2);
@@ -151,6 +156,11 @@
   Result := WidgetSet.CreateRectRgn(X1,Y1,X2,Y2);
 end;
 
+procedure DeallocateHWnd(Wnd: HWND);
+begin
+  WidgetSet.DeallocateHWnd(Wnd);
+end;
+
 Procedure DeleteCriticalSection(var CritSection: TCriticalSection);
 begin
   WidgetSet.DeleteCriticalSection(CritSection);
Index: lcl/include/winapih.inc
===================================================================
--- lcl/include/winapih.inc	(revision 10679)
+++ lcl/include/winapih.inc	(working copy)
@@ -38,6 +38,7 @@
  ******************************************************************************}
 //##apiwiz##sps##   // Do not remove
 
+function AllocateHWnd(Method: TLCLWndProc): HWND; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
 function Arc(DC: HDC; Left,Top,Right,Bottom,angle1,angle2 : Integer): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
 function AngleChord(DC: HDC; x1,y1,x2,y2,angle1,angle2 : Integer): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
 
@@ -72,6 +73,7 @@
 function CreateRectRgn(X1,Y1,X2,Y2 : Integer): HRGN; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
 //function CreateRectRgnIndirect --> independent
 
+procedure DeallocateHWnd(Wnd: HWND); {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
 procedure DeleteCriticalSection(var CritSection: TCriticalSection); {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
 function DeleteDC(hDC: HDC): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
 function DeleteObject(GDIObject: HGDIOBJ): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
Index: lcl/interfacebase.pp
===================================================================
--- lcl/interfacebase.pp	(revision 10679)
+++ lcl/interfacebase.pp	(working copy)
@@ -50,6 +50,11 @@
   TChildExitEvent = procedure(AData: PtrInt; AReason: TChildExitReason; AInfo: dword) of object;
   TPipeEvent = procedure(AData: PtrInt; AReasons: TPipeReasons) of object;
 
+  //------------------------------------------------------------------------------
+  // prototype for AllocateHWnd. Exists here because TWndProc is declared on controls
+  // and using it on lclintf causes circular unit reference
+  TLCLWndProc = procedure (var Message: TLMessage) of object;
+
   { TWidgetSet }
 
   TWidgetSet = class(TObject)
Index: lcl/lclintf.pas
===================================================================
--- lcl/lclintf.pas	(revision 10679)
+++ lcl/lclintf.pas	(working copy)
@@ -43,13 +43,19 @@
 
 uses
   Types, Math, Classes, SysUtils, LCLType, LCLProc, GraphType, InterfaceBase,
-  LResources;
+  LResources, LMessages;
 
 {$ifdef Trace}
   {$ASSERTIONS ON}
 {$endif}
 {$DEFINE ClientRectBugFix}
 
+//------------------------------------------------------------------------------
+// prototype for AllocateHWnd. Exists here because TWndProc is declared on controls
+// and using it on lclintf causes circular unit reference
+type
+  TLCLWndProc = procedure (var Message: TLMessage) of object;
+
 // All winapi related stuff (Delphi compatible)
 {$I winapih.inc}
 // All interface communication (Our additions)
