G'Day,

I have the following components:

  TDigimix = class(TCustomPanel)
  private
  public
    InsidePanel : TDigiPreview;
  end;
 
  TDigiPreview = class(TCustomPanel)
  private
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    procedure Paint; override;
  public
    pDC: HDC;
    procedure UpdateDC;
    procedure Refresh;
  end;


procedure TDigiPreview.Paint;
var
  PDigimix                    : TDigimix;
begin
  PDigimix := TDigimix(Self.Parent);

  if csDesigning in Pdigimix.ComponentState then begin
    Canvas.Brush.Color := $00000040;
    Canvas.FillRect(ClientRect);
  end
  else begin
    if not PDigimix.IsInitialised then begin
      Canvas.Brush.Color := clGreen;
      Canvas.FillRect(ClientRect);
    end
    else begin
      if PDigimix.SlotIsUsed(0) then begin
        Refresh;
      end
      else begin
        Canvas.Brush.Color := clBlack;
        Canvas.FillRect(ClientRect);
      end;
    end;
  end;
end;

The behaviour I am seeing is sporadic. By that I mean it occurs on _some_ machines _some_ of the time. Furthermore the machines that it does occur on do not fail everytime the application is run. All machines are Win2K SP2

What I am finding is the following. If I open up notepad and make it as small as possible so that it is just the title bar and I place it in the middle of the preview panel so that notepad is not touching any of the edges. If I then drag notepad so that it obscures the edges of the panel then an access violation occurs in NTDLL.DLL. Dragging over the edges is significant as there is _never_ a failure if i move notepad around within the panel itself. It appears that things come unstuck in the TCustomPanel.Paint method. However because it is when we are over the edge of the panel it seems likely that it is in the TBevel.Paint event. I have however been unsuccessful in tracking this down more narrowly than that.

So does anyone have any pointers, suggestions etc. on why I am getting this AV in NTDLL.DLL?

TIA

-- Donovan
----------------------------------------------------------------------
Donovan J. Edye [
www.edye.wattle.id.au]
Namadgi Systems [
www.namsys.com.au]
Voice: +61 2 6285-3460
Fax: +61 2 6285-3459
TVisualBasic = Class(None);
Heard just before the 'Big Bang': "...Uh Oh...."
----------------------------------------------------------------------
GXExplorer [
http://www.gxexplorer.org] Freeware Windows Explorer
replacement. Also includes freeware delphi windows explorer components.
----------------------------------------------------------------------

Reply via email to