Recent

Author Topic: WM_NCPAINT / LM_NCPAINT support  (Read 2692 times)

Max V. Terentiev

  • New Member
  • *
  • Posts: 30
WM_NCPAINT / LM_NCPAINT support
« on: September 08, 2018, 12:45:56 pm »
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:

Quote
Yes. 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

  • Hero Member
  • *****
  • Posts: 6130
Re: WM_NCPAINT / LM_NCPAINT support
« Reply #1 on: September 08, 2018, 05:26:10 pm »
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.

The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018