I am still struggling to figure out how to attach a message handler to a TForm. The TControl has an FWindowProc that should probably point to the function, but how do I get a unique window proc for each component? I was thinking of defining a TWindowObject and making the WindowProc a method, then creating a new TWindowObject for each control when I recieve the LM_Create message, but I don't think I can assign a method to FWindowProc in TControl, can I? Delphi's TWinControl has the WindowProc and default message handler built into the object already, but the LCL does not. So Delphi automatically gets a seperate window procedure and message handler for each component created. If I try to do the same for lazarus, and add these to the TControl and TWinControl objects, then I have put Win32 stuff into the main LCL, which is against the idea of splitting everything out. But it appears I can't create new, unique handlers for each component without them being part of the object to begin with. Unless I am missing something totally obvious, it is a catch 22.
It is almost as if the API independence needs to be done by having a different Dispatch function for each toolkit, but this would be reinventing the wheel for everone.
I hope I am not being stupid, but it is driving me up the wall!
Jeff.
