Messages ? lazarus / 15-macOS - Mac OS X ---------------------------------------------------------------------- taratata · 2009-01-26 07:18 I'm trying to install a delphi component I coded a few years ago. It works well except that I had to remove the code related to the wm_move and wm_moving messages. These are not recognized by lazarus/fpc. Are those messages only for the Windows version ? Is there a way to intercept those messages on the Mac OS ? Thanks ---------------------------------------------------------------------- Phil · 2009-01-26 14:37 You can use LM_MOVE from the LMessages unit. I'm not familiar with WM_MOVING. Thanks. -Phil ---------------------------------------------------------------------- taratata · 2009-01-26 19:38 Thank you very much. I was able to intercept the LM_Move message. Now I have some problems with the LM_NCHITTEST message. It just doesn't seem to work. What I want is to intercept the LM_NCHITTEST so the hit is always considered as HTCaption.This way my component can be moved by the user in runtime mode. It works well in Delphi. I made a quick test with a form In the procedure section of tform1 procedure NCHITTEST(var msg:tlmessage);message LM_NCHITTEST; procedure Tform1.NCHITTEST(var msg:tlmessage); begin inherited; caption:='z'; end; Caption never changes. Am I missing something ? ---------------------------------------------------------------------- Phil · 2009-01-26 20:13 Although LM_NCHITTEST is defined in LCL, it only appears to be implemented for the win32 widgetset. I really don't know much about it. Maybe you could log a bug report for this and get some feedback. Although you're not using msg in your handler, its type should probably be TLMNCHITTEST instead of TLMessage. A couple of the Orpheus controls I ported handle this message - not sure what effect this has since it apparently doesn't work on non-win right now. Thanks. -Phil ---------------------------------------------------------------------- taratata · 2009-01-26 20:20 That's what I figured . I guess I will have to find another way to let the user move the component at runtime. If you have a solution let me know Anyway thanks for your help, it's appreciated.