Ver Mensaje Individual
  #7  
Antiguo 17-04-2007
natalinuyo natalinuyo is offline
Miembro
 
Registrado: ene 2007
Posts: 64
Reputación: 20
natalinuyo Va por buen camino
Este es el procedimiento
Código Delphi [-]
// Display fingerprint image on screen
procedure PrintBiometricDisplay(biometricDisplay: boolean; context: Integer);
var
  // handle to finger image
  handle: HBitmap;
  // screen HDC
  hdc: LongInt;
begin
  // free previous image

//  Fdetalle.limpia(handle);

  {If range checking is on - turn it off for now
   we will remember if range checking was on by defining
   a define called CKRANGE if range checking is on.
   We do this to access array members past the arrays
   defined index range without causing a range check
   error at runtime. To satisfy the compiler, we must
   also access the indexes with a variable. ie: if we
   have an array defined as a: array[0..0] of byte,
   and an integer i, we can now access a[3] by setting
   i := 3; and then accessing a[i] without error}
  {$IFOPT R+}
    {$DEFINE CKRANGE}
  {$R-}
  {$ENDIF}
   // get screen HDC
  hdc := GetDC(HWND(nil));

  if biometricDisplay then
    // get image with biometric info
    GrBiometricDisplay(template.tpt,raw.img, raw.width, raw.height,raw.Res, hdc,
                        handle, context)
  else
    // get raw image
    GrCapRawImageToHandle(raw.img, raw.width, raw.height, hdc, handle);

  // draw image on picture box
  if handle <> 0 then
  begin
    Fdetalle.image.Picture.Bitmap.Handle := handle;
//    Fdetalle.image.Picture.Bitmap.Handle := handle;
//    Fdetalle.image.Width := Fdetalle.Bevel1.Width;
  //  Fdetalle.image.Height := Fdetalle.Bevel1.Height;
    Fdetalle.image.Repaint();
  end;

  // release screen HDC
  ReleaseDC(HWND(nil), hdc);

  {Turn range checking back on if it was on when we started}
  {$IFDEF CKRANGE}
    {$UNDEF CKRANGE}
    {$R+}
  {$ENDIF}
end;

Última edición por natalinuyo fecha: 17-04-2007 a las 18:31:32.
Responder Con Cita