#1 Other components » How LCL manage WinApi events? » 2017-08-11 06:26:19

AndrzejB
Replies: 1

I write because LVCL experts can know the answer.
I am starting develop Rust GUI widget toolkit for Winapi (maybe in future for GTK 2/3). I want to look at existing GUIs. The simplest is C++ fltk, but I think, not correct solved Canvas HDC Handle problem. Problem is:
"How is WinApi wrapped?
With each window HWND is associated window procedure (callback)?
This procedure can handle WM_PAINT messages; between BeginPaint-EndPaint controls can draw self.
But how user application have access to Canvas from any event? OnCreate, OnClick, OnMouseMove etc. How they can draw on Canvas?"
https://forum.lazarus.freepascal.org/in … 875.0.html
How it is done? WM_PAINT must be always before OnClick or others? Canvas.Handle is always last HDC od WM_PAINT?

Board footer

Powered by FluxBB