Using GUI and CUI together

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Using GUI and CUI together

Post by Antonio Linares »

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

#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
servulo
Posts: 9
Joined: Tue Dec 16, 2008 12:42 pm
Location: São Paulo

Re: Using GUI and CUI together

Post by servulo »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Using GUI and CUI together

Post by Antonio Linares »

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
servulo
Posts: 9
Joined: Tue Dec 16, 2008 12:42 pm
Location: São Paulo

Re: Using GUI and CUI together

Post by servulo »

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

Thank you for your attention ...
Luiz Servulo
Post Reply