TOpenGLCanvas maybe?
Not just support gl in my case.
I want a control of LCL that has Handle and can be painted completely by myself.
I know how TOpenGLCanvas works, maybe I can modify it to meet my reqirement, but I rather use LCL because LCL has an official team supporting.
I add a Boolean switch UseWinControlCustomPaint to TWinControl
Is this good ? Will I make a feature request with the patch to bugtracker?
in lazarus\lcl\interfaces\win32\win32callback.inc, SendPaintMessage,
if(ControlDC = 0)and(lWinControl.UseWinControlCustomPaint = True)then
begin
DC := Windows.BeginPaint(Window, @PS);
PaintMsg.Msg := LM_PAINT;
PaintMsg.PaintStruct := @PS;
PaintMsg.DC := DC;
DeliverMessage(lWinControl, PaintMsg);
Windows.EndPaint(Window, @PS);
Exit;
end;