Forum > General
More Resize Questions on TBGRAGraphicCtrl
jamie:
There are two messages.
LM_WindowChangingPos and LM_WindowChangedPOS.
The first will report what is about to be changed but has not yet been changed, you can detour it there.
The second is when it has already happened. If You make changes there, things may repeat itself.
I use the first one where I maintain the aspect ration of an image while dragging the size of the window, it will adjust the opposite corner to keep the aspect, there is no flickering or redrawing done.
SandyG:
Jamie -
Ugg, just thought about this, is this a Windows specific message? Or does Lazarus LCL abstract that? If Windows only won't work.
Sandy
jamie:
It appears you may be using a Graphics control; this limits your choices.
If you haven't already, you can override the "DoSetBounds(x,y,xx,yy:integer)" so you can examine the values before it gets set
SandyG:
Jamie -
You hit it!!
This worked perfectly. I have the base class on up with the added DoSetBounds() override and it works like a champ. It gets called on ONLY when resized, unlike resize().
Tested in design and runtime, works like a charm.
Thanks again for all your help on this tricky issue. Onto the last bit of performance optimization which hopefully also reduces CPU and increases performance.
Sandy
jamie:
reduced bit count is always my goal.!
Now where's that 4 bit Cpu/...
:D
Navigation
[0] Message Index
[#] Next page
[*] Previous page