Página 1 de 1

SplashWindow usando FreeImage

Enviado: 03 Out 2013 17:20
por asimoes
Alternativa a SPLASH da hwgui.

Pode usar estes tipos de imagens: .jpg .png .psd e .tif

A dll freeimage.dll tem que estar presente na pasta onde o executável esta.

Código: Selecionar todos

FUNCTION SplashWindow(cImagem, nTime)
LOCAL   oDlg, nHandle, nWidth, nHeight

   HB_Default(@nTime,2000)
   
   IF !hwg_Fi_init()
      RETURN Nil
   ENDIF
   
   nHandle:=hwg_Fi_load( cImagem )
   
   nWidth:=hwg_Fi_getwidth( nHandle )
   
   nHeight:=hwg_Fi_getheight( nHandle )
   
   INIT DIALOG oDlg                 ;
        TITLE ""                    ;
        AT     0,0                  ;
        SIZE   nWidth,nHeight       ;
        CLIPPER                     ;
        STYLE WS_POPUP + DS_CENTER + WS_VISIBLE + WS_DLGFRAME;
        ON INIT { || CountSeconds( nTime, oDlg ) }
   
   @ 0,0 IMAGE oSayMain SHOW cImagem SIZE nWidth, nHeight         

   oDlg:center()
   
   hwg_UpdateWindow( oDlg:handle )

   oDlg:Activate()

RETURN Nil

STATIC FUNCTION CountSeconds( nTime, oDlg )

   SET TIMER oTimer OF oDlg VALUE nTime  ACTION { || hwg_EndDialog( hwg_GetModalHandle() ) }

RETURN Nil


SplashWindow usando FreeImage

Enviado: 27 Ago 2015 14:05
por alaminojunior
Alguma possibilidade de converter isso para xHarbour com HwGUI 2.17 ?