WindowProc Subclassing lazarus / 7-LCL ---------------------------------------------------------------------- schu-r · 2006-08-08 11:55 Hi I Used to Subclass WindowProc for some Controls in Delphi to Write my own WindowHandler (of course I called the Base Window Handler after it) just to react on some Windowmessages. But in Lazarus i cannot change the WindowProc Handler. Is there a different Way to get to the window Messages of an individual Control? ---------------------------------------------------------------------- Vincent Snijders · 2006-08-08 12:36 You still can subclass the window procedure, using Windows.SetWindowLong. ---------------------------------------------------------------------- felipemdc · 2006-08-08 19:21 You can just override the default WindowProc, like this, on your TForm window:   TMainWindow = class(TForm)      ......   public {$IFDEF Win32}     procedure WndProc(var Message : TMessage); override; {$ENDIF}   end; ---------------------------------------------------------------------- schu-r · 2006-08-09 12:25 I need to set them at Runtime. Because I look at the Controls of a Form and then I decide which Controls to subclass. The code Searches all the Controls and Subclasses them. This is a kind of LayoutManager similar to Java. It works so far in Delphi (can change the Look and Feel and even the behaviour of some Fields).