OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Fred Tomke on April 27, 2009, 12:52:21 AM

Title: SetBackColor and Performance in PictureBoxes
Post by: Fred Tomke on April 27, 2009, 12:52:21 AM
Hello,

before adding a bug report I want to ask if somebody can reproduce my experiences. I attached a small project a I've changed a bit so you won't need the whole appliaction.

Load the LISP and add the odcl-file to a support path. Command: house

Using ODCL 5.0.2.4:
The form will be shown very quick and when I move the mouse over the images the backcolor of the underlaying picture will be changed.

Using ODCL 5.1.0.3:
The form will be shown much slowlier picture by picture and when I move the mouse over the images the backcolor of the underlaying picture will not be changed.

Fred
Title: Re: SetBackColor and Performance in PictureBoxes
Post by: Fred Tomke on April 27, 2009, 01:08:51 AM
Ok, got it in Rev. 201, PictureBox.cpp, Line 279: What does CopyDC(); do?

After moving this line back from Refresh-Method to SetPicture it works well again. But I know that's not the solution. What was the idea to move this line to Refresh?

Fred
Title: Re: SetBackColor and Performance in PictureBoxes
Post by: owenwengerd on April 27, 2009, 06:10:27 AM
CopyDC updates the cached graphics by taking a new snapshot of what is displayed. The change fixed a bug reported in the bug tracker.