DrawButtonFace lazarus / 13-General ---------------------------------------------------------------------- Phil Hess · 2005-07-06 22:08 What is the LCL equivalent to DrawButtonFace in Delphi's Buttons unit? I have some Delphi components I'm looking to port but they use this function and I don't see it in the LCL anywhere. Thanks. -Phil ---------------------------------------------------------------------- Marc · 2005-07-08 11:45 I don't think it is implemented. You can implement it yourself and send a patch ? ---------------------------------------------------------------------- Phil Hess · 2005-07-08 18:55 Quote from: "Marc"I don't think it is implemented. You can implement it yourself and send a patch ? Maybe I will. In the meantime I'm coming up with quite a list of things that are missing in LCL. Also, this point of confusion: Lazarus includes both Messages and LMessages units and both Windows and LclIntf units. Should I avoid using Messages and Windows? For example, the function PtInRect is defined twice in Windows (func.inc) and also in LclIntf (winapi.inc). I think this is confusing the compiler, which won't compile code that uses PtInRect. I'm also having trouble finding documentation on just what LCL is trying to accomplish: high level of VCL compatibility, medium level of compatibility, whatever works? Is there a white paper or overall discussion of just what the LCL philosophy is? A lot of the documentation seems out of date. Thanks. -Phil ---------------------------------------------------------------------- Marc · 2005-07-11 09:14 The LCL tries to be compatible with the VCL (=class structure).  The lower windows specific functions found in the Windows or Messages units are implemented as needed. The Lazarus project provides replacements for them in LMessages and IdeIntf. Those units are widgetset independent. FPC (and not Lazarus) comes with Messages and Windows units. These units are for win32 only and you should avoid them when working with the LCL. ---------------------------------------------------------------------- Phil Hess · 2005-07-12 21:15 Quote from: "Marc"The LCL tries to be compatible with the VCL (=class structure).  The lower windows specific functions found in the Windows or Messages units are implemented as needed. The Lazarus project provides replacements for them in LMessages and IdeIntf. Those units are widgetset independent. FPC (and not Lazarus) comes with Messages and Windows units. These units are for win32 only and you should avoid them when working with the LCL. Marc, Thanks for the tip. However, omitting the Messages and Windows units reveals a lot missing in LCL, even under Win32: - InvokeHelp in application.inc not complete. - No equivalent of ShellExecute, etc. - No IsCharAlpha function. - No TMessage type. - Etc. Thanks. -Phil ---------------------------------------------------------------------- Marc · 2005-07-13 15:40 That is true. Lazarus is still not finished, so there still might be some pieces left to implement Pure win32 API calls are a bordercase. We thry to have a compatible LCL and since API calls are not part of the VCL I don't think that they get implemented all (we're not Wine). Besides most of those functions are to win32 specific. The are not crossplatform. Recently there is a helpsystem added to the IDE and lazarus has its own helpfunctions. As with Delphi, you write either win32 code or you use the RTL/VCL. But don't try to mix it (if you want clean code) You can use a TProcess for most external processes. ShellExecute is a win32 specific function which is hard to implement on other platforms. I wonder if IsCharAlpha isn't implemented. However it's implementation is Language dependent, so I don't know. If it is I think it should be part of FPC. There is a TMessage type. ---------------------------------------------------------------------- Phil Hess · 2005-07-13 17:56 Quote from: "Marc"That is true. Lazarus is still not finished, so there still might be some pieces left to implement Pure win32 API calls are a bordercase. We thry to have a compatible LCL and since API calls are not part of the VCL I don't think that they get implemented all (we're not Wine). Besides most of those functions are to win32 specific. The are not crossplatform. Recently there is a helpsystem added to the IDE and lazarus has its own helpfunctions. As with Delphi, you write either win32 code or you use the RTL/VCL. But don't try to mix it (if you want clean code) You can use a TProcess for most external processes. ShellExecute is a win32 specific function which is hard to implement on other platforms. I wonder if IsCharAlpha isn't implemented. However it's implementation is Language dependent, so I don't know. If it is I think it should be part of FPC. There is a TMessage type. Marc, Thanks for the info. I see an IsCharAlphaNumeric, but not IsCharAlpha. It would be trivial to implement - looks like somebody just forgot to add this. I am using RTL/VCL for the help, but the Application.HelpCommand doesn't do anything. I believe this is because most of the code in HelpInvoke is commented out - and HelpCommand calls HelpInvoke. I find TMessage defined as Windows.TMessage in Messages.inc, but not in LMessages.pp. If I don't use the Win32-dependent Messages unit, the compiler complains when it hits any use of TMessage. Also, here's a new question: It seems as though LCL ignores the font size setting for buttons and list boxes in my forms. Labels are the correct size, but the buttons and list boxes appear to be using 9 point regardless of the setting in the .lfm file. Do you have any idea of what' s going on here? Thanks. -Phil ---------------------------------------------------------------------- Marc · 2005-07-15 09:02 Yes changing font is not supported yet. It was one day, but it got disabled since we got some troubes with it icw themes. Now the font look and feel depends on your theme ---------------------------------------------------------------------- Phil H. · 2005-07-15 15:18 Quote from: "Marc"Yes changing font is not supported yet. It was one day, but it got disabled since we got some troubes with it icw themes. Now the font look and feel depends on your theme Can you expand on that a bit or point me to some documentation or overview of this? I have no idea what you mean by a "theme". Also, what about my other points - should I report these as bugs? Thanks. -Phil