Tema: GetUpdateRec
Ver Mensaje Individual
  #7  
Antiguo 21-09-2005
jorodgar jorodgar is offline
Miembro
 
Registrado: abr 2005
Posts: 76
Reputación: 20
jorodgar Va por buen camino
Funciona bien pero para la ventana del formulario y lo que deseo es que me dijera si es posible el trozo de pantalla que ha cambiado.
Lo he intentado capturando el handle de la pantalla pero no funciona.
Sigo investigando. Os pongo el código :

Código Delphi [-]
 procedure TForm1.WMPAINT(Var Msg: TWMPaint);
 var
   R: TRect;
   p1,p2:TPoint;
   c: TCanvas;
   dc:HDC;
 begin
   {get the screen dc}
   dc := GetDc(0);
   if (dc = 0) then exit;
   if GetUpdateRect(dc, R, True) then
   begin
     if IsRectEmpty(R) then exit;
     p1:=R.TopLeft;
     p2:=R.BottomRight;
     Edit5.text:=IntTostr(p1.x);
     Edit6.text:=IntTostr(p1.y);
     Edit8.text:=IntTostr(p2.x);
     Edit9.text:=IntTostr(p2.y);
   end;
 end;

Última edición por dec fecha: 22-09-2005 a las 01:59:27. Razón: ¡¡Encerrad el código fuente entre las etiquetas [DELPHI] ... [/DELPHI]!!
Responder Con Cita