Hi, I encountered a problem I don't know how to solve. Some background. Any OS does a great job avoiding unnecessary drawing even if the program tries to draw everything in the window. But there are exceptions. - There are some functions, for example region-related in windows that nevertheless process full job even if the area the developer is drawing is not included in the window update region - There are internal off-screen manipulation so the developer himself have to do the job of avoiding extra processing so needs to know what the update region is .
In Delphi I used the following trick. In the WM_Paint before inheried call I got update region with successive calls to GetUpdateRect (to determine if it exists) and GetUpdateRgn afterwards. This allowed to get the correct region before BeginPaint is called (it validates the region so getting it after BeginPaint makes no sense). But in Lazarus WM_Paint handler already contains DC and also GetUpdateRect call is failed. As I understand, this is because the WindowProc from win32callback.inc already did BeginPaint and provided the dc for the following call to the control WM_Paint. So the questions are: - is there a chance to intervene into lazarus drawing chain to get the update region before lazarus root windowproc call. - if the first is not possible (or too complex) is it possible for lazarus to save the update region somewhere before BeginPaint or maybe do this optionally based on the special property value sure set to false by default Thanks Max Vlasov
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
