Menu HWGUI com aplicativo
Enviado: 12 Mar 2024 15:04
Olá!
Se deu ao trabalho de olhar os fontes ?
O que é isso ai em cima ?
Quem tá precisando de usar assim que vá fazer mais testes, eu não precisei. Pode ter BUGs sim claro!!! Isso tem mais de 1 ou dois anos pronto!!!!
Saudações,
Itaamr M. Lins Jr.
Vc não é doido!!!!Compilou um aplicativo "console".
Então... GTHWG é pra isso, mas só pra isso.
Se deu ao trabalho de olhar os fontes ?
Código: Selecionar todos
REQUEST HB_GT_HWGUI
REQUEST HB_GT_HWGUI_DEFAULT
FUNCTION Main( _par1 )
CreateWindow()
Código clipper compatível ta, ta, ta...
...
#include "hwgui.ch"
STATIC FUNCTION CreateWindow()
LOCAL oWnd := gthwg_CreateMainWindow( "GT HwGUI Test" )
MENU OF oWnd
MENU TITLE "&File"
MENUITEM "&New" ACTION hwg_MsgInfo( "New!" )
SEPARATOR
MENUITEM "&Exit" ACTION oWnd:Close()
ENDMENU
MENU TITLE "&Help"
MENUITEM "&About" ACTION hwg_MsgInfo( hwg_version()+Chr(13)+Chr(10)+"gt: " + hb_gtVersion(),"About" )
ENDMENU
ENDMENU
RETURN oWnd
FUNCTION gthwg_PaintCB( hDC, cFileName )
LOCAL aBmpSize
STATIC hImage, img_x1, img_y1, img_width, img_height
IF Empty( hDC )
IF Empty( cFileName )
gthwg_paint_SetCallback()
IF !Empty( hImage )
hwg_Deleteobject( hImage )
hImage := Nil
ENDIF
ELSE
hImage := hwg_OpenImage( cFileName )
IF !Empty( hImage )
img_x1 := Int( hb_gtinfo( HB_GTI_SCREENWIDTH ) / MaxCol() ) * 50
img_y1 := Int( hb_gtinfo( HB_GTI_SCREENHEIGHT ) / MaxRow() ) * 8
aBmpSize := hwg_Getbitmapsize( hImage )
img_width := aBmpSize[ 1 ]
img_height := aBmpSize[ 2 ]
gthwg_paint_SetCallback( "GTHWG_PAINTCB" )
hwg_Invalidaterect( hb_gtinfo(HB_GTI_WINHANDLE), 0 )
ENDIF
ENDIF
ELSEIF !Empty( hImage )
hwg_Drawbitmap( hDC, hImage,, img_x1, img_y1, img_width, img_height )
ENDIF
RETURN Nil
Quem tá precisando de usar assim que vá fazer mais testes, eu não precisei. Pode ter BUGs sim claro!!! Isso tem mais de 1 ou dois anos pronto!!!!
Saudações,
Itaamr M. Lins Jr.