Board index » delphi » DirectDraw how to change TRECT to PRECT?

DirectDraw how to change TRECT to PRECT?

var
  hr: HResult;
  aa: TRECT;
begin
  aa.left:=0;
  aa.Right:=TempBitmap.Width;
  aa.Top:=0;
  aa.Bottom:=TempBitmap.Height;}

  back_surf.BltFast(0,0,surface1,@aa,DDBLTFAST_WAIT);
end;

PRect is a pointer to TRect and should be allocated with New(aa)
or pointed to an existing TRect. In my code I changed PRect to
TRect and used @aa in the BltFast which indicates the address of
the aa (same as pointer to TRect ou PRect).

[]s
Arthur

Admire123(Gary1st) <analy...@{*word*104}ec.com> escreveu nas notcias de mensagem:3AE0D41D.D8648...@{*word*104}ec.com...

Quote
> My code like this

> var
>   hr: HResult;
>   aa: PRECT;
> begin
>     aa.left:=0;
>     aa.Right:=TempBitmap.Width;
>     aa.Top:=0;
>     aa.Bottom:=TempBitmap.Height;}

>     back_surf.BltFast(0,0,surface1,aa,DDBLTFAST_WAIT);
> end;

> but it said "aa" not initialized and caused access violation,
> any ppl can help me to solve this,
> thx very much!!

 

Re:DirectDraw how to change TRECT to PRECT?


My code like this

var
  hr: HResult;
  aa: PRECT;
begin
    aa.left:=0;
    aa.Right:=TempBitmap.Width;
    aa.Top:=0;
    aa.Bottom:=TempBitmap.Height;}

    back_surf.BltFast(0,0,surface1,aa,DDBLTFAST_WAIT);
end;

but it said "aa" not initialized and caused access violation,
any ppl can help me to solve this,
thx very much!!

Other Threads