WM_NCPAINT / LM_NCPAINT support lazarus / 31-LCL ---------------------------------------------------------------------- Max V. Terentiev · 2018-09-08 10:45 Hi, I'm porting visual component from Delphi to Lazaurs and want to make it cross-platform (at least support win32/64 and linux64). It's looks like WM_NCPAINT (LM_NCPAINT) message never triggered in LCL/Lazaurs ! I found this topic from year 2007: http://forum.lazarus-ide.org/index.php?topic=4328.0 They said: QuoteYes. LM_NCPAINT is never fired in LCL/Lazarus. You have to remap the code inside LM_PAINT. Maybe something changes since 2007 ? Or it's not supported because it's not available in GTK/Linux ? Maybe somebody know andy workaround for it ? )) Thanks for help ! ---------------------------------------------------------------------- jamie · 2018-09-08 15:26 Yes its not a supported message, the Tform message handler procedure rejects it.  I really don't understand why? I too also  use such messages for mouse tracking over the border and title bar.  For window support you can install a windows hook for the message procedure in the Tform and handle the message yourself.  I had to do this for a DSP application I ported over to capture the sound device messages etc.  All messages below 1024 are filtered...  So when implementing messages within the form you must start with LM_USER+?, classes otherwise pass anything.