Using GUI and CUI together

Using GUI and CUI together

Postby Antonio Linares » Tue Oct 18, 2011 12:25 pm

Thanks to Rafa Carmona, with some changes from my side, here you have an example of how to mix FWH GUI with CUI (character-based user interface):

You have to link the corresponding GT lib:
...
echo %hdirl%\%GT%.lib + >> b32.bc
echo %hdirl%\gtwvt.lib + >> b32.bc
...

guicui.prg
Code: Select all  Expand view
#include "FiveWin.ch"
#include "hbgtinfo.ch"
#include "std.ch"

REQUEST HB_GT_WVT

function Main()

   local oWnd

   DEFINE WINDOW oWnd TITLE "Main FWH Window"

   ACTIVATE WINDOW oWnd ;
      ON INIT Child( oWnd ) ;
      ON CLICK Child( oWnd )

return nil

function Child( oWnd )

   local cFirst := Space( 10 ), cLast := Space( 10 ), GetList := {}
   local pGT := hb_gtCreate( 'WVT' )

   hb_gtSelect( pGT )
   HB_GtInfo( HB_GTI_CODEPAGE, "ES850C" )
   Hb_GtInfo( HB_GTI_FONTNAME, 'Lucida Console')
   hb_gtInfo( HB_GTI_WINTITLE, "opciones CONSOLA en Windows" )
   HB_GtInfo( HB_GTI_CLOSABLE, .T. )
   
   SetMode( 25, 80 )
   SET COLOR TO "W+/B"
   CLS

   @ 1, 2 SAY "First:" GET cFirst
   @ 3, 3 SAY "Last:"  GET cLast // VALID ( ReadExit(), .T. )

   READ
   
   HB_GTEXIT()

return nil  

#pragma BEGINDUMP

#include <hbapigt.h>

HB_FUNC( HB_GTEXIT )
{
   hb_gtExit();
}  

#pragma ENDDUMP


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42084
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Using GUI and CUI together

Postby servulo » Tue Oct 18, 2011 4:31 pm

Hello Antonio, I care but when trying to compile this example with FWH 11.09 including the line:

hdirl echo%% \ gtwvt.lib +>> b32.bc

in buildx.bat

it does not recognize the functions of HG_GT

sorry my bad english...
Luiz Servulo
servulo
 
Posts: 9
Joined: Tue Dec 16, 2008 12:42 pm
Location: São Paulo

Re: Using GUI and CUI together

Postby Antonio Linares » Tue Oct 18, 2011 5:17 pm

We have tested it with Harbour only, including in buildh.bat:

echo %hdirl%\%GT%.lib + >> b32.bc
echo %hdirl%\gtwvt.lib + >> b32.bc <<--- this one
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42084
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Using GUI and CUI together

Postby servulo » Tue Oct 18, 2011 7:11 pm

Antonio, I tried compiling with FiveWin 11.09 and harbor 2.1 worked perfectly

Thank you for your attention ...
Luiz Servulo
servulo
 
Posts: 9
Joined: Tue Dec 16, 2008 12:42 pm
Location: São Paulo


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 104 guests