InvalidateRgn on TsgDrawingNavigator

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
avimms
Posts: 13
Joined: 06 Dec 2005, 09:57
Location: India

InvalidateRgn on TsgDrawingNavigator

Post by avimms » 25 Jun 2007, 15:52

Is it possible to refresh only a part of DXF image shown on the TsgDrawingNavigator component. I am drawing externally onto the TsgDrawingNavigator canvas. So if I need to clear my drawings I am required to call TsgDrawingNavigator.Refresh, which causing a considerablt flicker. I would like to avoid this flicker. So I am trying to call InvalidateRgn by passing TsgDrawingNavigator.canvas's handle. But I still I can see that there is flicker.

Please let me if it is possible to use InvalidateRgn onto the canvas. I am using DXF Import VCL v6.1, Delphi 7 Enterprise edition.

Regards,
Avinash

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 27 Jun 2007, 15:59

Hello Avinash,

We recommwnd to use the following code:

Code: Select all

...
<b>var</b>
  vRect: TRect;
<b>begin</b>
...
  Windows.InvalidateRect(sgPaintBox.Handle, @vRect, True);
...
<b>end</b>;
Sergey.

Please post questions to the forum or write to support@cadsofttools.com

Post Reply