SplashWindow usando FreeImage

Projeto HwGui - Biblioteca visual para Harbour/xHarbour

Moderador: Moderadores

Avatar do usuário
asimoes
Colaborador
Colaborador
Mensagens: 4919
Registrado em: 26 Abr 2007 16:48
Localização: RIO DE JANEIRO-RJ

SplashWindow usando FreeImage

Mensagem 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

►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar do usuário
alaminojunior
Colaborador
Colaborador
Mensagens: 1717
Registrado em: 16 Dez 2005 21:26
Localização: Ubatuba - SP

SplashWindow usando FreeImage

Mensagem por alaminojunior »

Alguma possibilidade de converter isso para xHarbour com HwGUI 2.17 ?
Compilador xHarbour 1.2.3 + Embarcadero C++ 7.30
MySQL c/ SQLRDD
HwGui + GTWVG
Responder