freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resizable ft2demos


From: Dmitry Timoshkov
Subject: Re: resizable ft2demos
Date: Sat, 23 May 2020 18:01:17 +0800

Alexei Podtelezhnikov <address@hidden> wrote:

> Dmitry,
> > It probably needs adding CS_HREDRAW | CS_VREDRAW to ourClass.style.
> 
> That was not enough.

Alexei,

In addition to CS_HREDRAW | CS_VREDRAW the WM_SIZE handler should call
DefWindowProc() so that default message processing forces a window update.
After that the window gets repainted while being resized.

However that leads to the limitation of the demo that can't update its
bitmap contents until the mouse button is released and modal message loop
passes control back to the application code. As the result WM_SIZE calls
gr_win32_surface_resize() however the source bitmap the demo paints to
still has old size and contents, and WM_PAINT gets broken.

While Anuj's approach works I'd personally refrain from using it since
it basically replaces low level user32 code with custom window resizer.
I'd suggest to change the demo design, so that it provides a callback
to the graphics subsystem for a forced bitmap resize.

-- 
Dmitry.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]