General question about lazarus component creation lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- AllRound · 2005-01-14 12:02 Hey, I just found out about lazarus and I really really like this. I would really like to help out with this project and contribute to this. What I don't really understand is the exact reason why (visual) delphi components don't work with lazarus. There are some really great open source ones like VCL and Turbopower components. My question is, what is the reason that they don't work with lazarus? What needs to be changed in these components to make them work with lazarus? Because I don't know where to start... ---------------------------------------------------------------------- Lightning · 2005-01-16 10:33 Well Lazarus is natively crosplatform unlike Delphi wich uses some strange stuff in the CLX and Kylix to achieve this, Lazarus doesn't support win32 resources, you should use Lazarus resources, the extensions are different, the classes are not identical, mainly look at the files included, Delphian stuff, check the Lazarus-CCR website, etc. ---------------------------------------------------------------------- AllRound · 2005-01-16 13:56 So it's not really easy to make lazarus versions out of delphi components? ---------------------------------------------------------------------- Lightning · 2005-01-17 09:57 For some components it's easy, even easier if you only want them on windows. I managed to port my own components, the source editor (Synedit) was ported by the Lazarus team, etc. You should try and see how hard it is for you... ---------------------------------------------------------------------- Marc · 2005-01-18 17:45 Quote from: "AllRound"So it's not really easy to make lazarus versions out of delphi components? It depends on how many win32 specific calls the component relies. For porting SynEdit we have added a lot of WinApi functions to mimic win32 behaviour, but in some cases this is not possible. ---------------------------------------------------------------------- Anonymous · 2005-01-25 04:27 It sure was reassuring to see a lot of Windows messages ported to Lazarus. It'd however be much more appreciated if you could provide more thorough coverage of Windows messages .... Warm regards ---------------------------------------------------------------------- Vincent Snijders · 2005-01-26 09:59 I don't think much more windows message are to be ported to lazarus. Only messages needed for the standard components or synedit were ported. ---------------------------------------------------------------------- Lightning · 2005-01-26 11:08 If you need some message, you can port it yourself, i did that, maybe use some "ugly" IFDEFS. ---------------------------------------------------------------------- Anonymous · 2005-01-27 10:26 Well, if we have more messages ported , it will make it lot easier for other developers to extend the Lazarus component base. (Especially those coming form Windows background). While it will be ok for some developers to define Windows messages themselves, it will not be standardized, as they will be working on their own implementations. Therefore a more thorough set of Windows Messages unit by Lazarus team will be lot more appreciated. Warm regards ---------------------------------------------------------------------- Lightning · 2005-01-27 17:37 Well i didn't have any problems using the ones already defined for win, just some structures were missing and i made those myself, since windows is different from other OSes/DMs you can't usually make crossplatform messages easy, it's much easier to use messages/signals and pass them to a proc/func in a platform independent way instead of porting the winapi to X based OSes. I would recommend using platform independent messages or functions. You can implement as many as you need but you must make them work crossplatform. Then send patches to the mailing list using one of the commands bellow to make them small. Code: [Select]cvs -z3 diff -u | gzip > diff.txt cvs -z3 diff -u > diff.txt ---------------------------------------------------------------------- Vincent Snijders · 2005-01-28 06:59 Quote from: "Anonymous"Well, if we have more messages ported , it will make it lot easier for other developers to extend the Lazarus component base. (Especially those coming form Windows background). Windows message are difficult to port to other widget sets.  Therefore a design decision has been made to minimize the amount of messages to be ported. QuoteWhile it will be ok for some developers to define Windows messages themselves, it will not be standardized, as they will be working on their own implementations. Therefore a more thorough set of Windows Messages unit by Lazarus team will be lot more appreciated. I doubt it will be apreciated, if it only works for the win32 widgetset and not for the gtk, gtk2 or any other (future) widgetset suppourted by the LCL. ---------------------------------------------------------------------- Marc · 2005-02-01 16:01 You can allways ask to implement a certain message or function. On a per case basis we will decide if it makes sence to add it or not. We are not reimplementing wine. ---------------------------------------------------------------------- Anonymous · 2005-04-21 21:12 offtopic: Do lazarus components have a CreateWindow virtual method, or initialization has to be done in the constructor  (e.g. Create)? ---------------------------------------------------------------------- Marc · 2005-04-22 08:32 The similar mechanism as in Delphi is used. So there is a CreateWnd somewhere in the end of widget creation. The TWinControl.CreateWnd calls the WidgetSet specific CreateHandle, which creates the "real" widget for that widgetset.