Ver Mensaje Individual
  #13  
Antiguo 20-01-2023
Avatar de pgranados
pgranados pgranados is offline
Miembro
 
Registrado: sep 2022
Ubicación: México
Posts: 264
Reputación: 2
pgranados Va por buen camino
Hola escafandra, con tu Unit pude lograr mi objetivo, pero tengo un problema a veces y no logo identificar a que se deba, pero a veces al cerrar mi aplicación salta un error en la función
Código Delphi [-]
function ThGif(GV: TGifViewer): DWORD; stdcall;
específicamente en

Código Delphi [-]
if Pi._type = sizeof(DWORD) then
    repeat
      if GV.Center then
      begin
        GetClientRect(GV.Wnd, CR);
        Left:= (CR.right  - GV.Width) div 2;
        Top:= (CR.bottom - GV.Height) div 2;
      end;
      DC:= GetDC(GV.Wnd);
      GdipCreateFromHDC(DC, hGdipGraphics);
      GdipImageSelectActiveFrame(GV.hGdipImage, @FrameDimensionTime, Index);
      GdipDrawImageRectI(hGdipGraphics, GV.hGdipImage, Left, Top, GV.Width, GV.Height);
      GdipDeleteGraphics(hGdipGraphics);
      ReleaseDC(GV.Wnd, DC);
      Sleep(Wait[Index] * 10);
      Index:= (Index + 1) mod Frames;
    until (GV.Wnd = 0) or (GV.hGdipImage = 0);

el stop se queda en
Código Delphi [-]
 until (GV.Wnd = 0) or (GV.hGdipImage = 0);

¿Sabrás que pueda ser? por lo que observe,
Código Delphi [-]
GV.Wnd
&
Código Delphi [-]
GV.hGdipImage

tienen valores inaccesibles, saludos.

pd: estoy usando Delphi 10.4.2

Última edición por Casimiro Notevi fecha: 20-01-2023 a las 19:05:33.
Responder Con Cita