Page 2 of 2

Re: MIXED GUI-CONSOLE APPLICATION HELP

Posted: Thu Sep 12, 2013 12:10 pm
by danielmaximiliano
manoj_duamzn wrote:First of All thanks to all


call c:\hmg.3.0.22\build.bat /CI TEST.PRG COMPADD.PRG

I am attaching both prgs

Please Help
Hola Mano :
me llamo la antención que la linea de compilacion pertenece al viejo HMG, sucede que tenemos nuevas versiones que corrigen muchos errores de HMG y Harbour hasta este momento; ademas muchas nuevas caracteristicas para usar en su aplicacion
solo necesita =descargala e instalarla.

Translate Google

Hello Mano:
caught my attention being the compilation line belongs to the old HMG, it happens that we have new versions that fix many errors HMG and Harbour until now, plus many new features to use in your application
only need download it and install it.

HMG.3.1.5 Test http://hmgforum.com/viewtopic.php?f=43&t=3092

Re: MIXED GUI-CONSOLE APPLICATION HELP

Posted: Thu Sep 12, 2013 4:33 pm
by esgici
manoj_duamzn wrote:... in starting please help me for mixed application. Later target is fully GUI...
Hi Manoj

I don't know this method will help you :?
Screenshoot of Manoj mixed UI project Test 2
Screenshoot of Manoj mixed UI project Test 2
ManoTst2.jpg (66.86 KiB) Viewed 6694 times
ManoTst2.zip
Mixed UI project of Manoj; source files
(1.16 KiB) Downloaded 425 times
Please don't hesitate to ask anything, as always :arrow:

Happy HMG'ing :D

Re: MIXED GUI-CONSOLE APPLICATION HELP

Posted: Thu Sep 12, 2013 5:39 pm
by danielmaximiliano
Hola Mano :
como le sugiere el amigo Esgici puede crear una aplicacion GUI que ejecute sus modulos en consola. o como hice en un momento con una vieja aplicacion, ejecutar desde consola viejos modulos convertidos a GUI.

Translate google
Hello Mano:
as Esgici friend suggests you can create a GUI application modules running your console. or as I did in a moment with an old application, run from console converted GUI old modules.
console mixed.png
console mixed.png (231.49 KiB) Viewed 6687 times
EGURO00.PRG.png
EGURO00.PRG.png (27.54 KiB) Viewed 6687 times

Re: MIXED GUI-CONSOLE APPLICATION HELP

Posted: Fri Sep 13, 2013 3:20 pm
by klauskugel
Hi Manoj,

here is some explanation of the \hmg\build.bat
which is used for compilation.
The reason, why older HMG-Releases will compile Console-Mode
without altering BUILD.BAT

Build.bat ---- GUI Mode


rem *******************************************************************************
rem SET DEFAULT OPTIONS
rem *******************************************************************************

set gtdrivers=-gtgui -gtwin
set runafterbuild=.t.
set debug=

//----------------------------------------


Build.Bat ---- Mixed Mode


rem *******************************************************************************
rem SET DEFAULT OPTIONS
rem *******************************************************************************

set gtdrivers=-gtwin -gtstd
set runafterbuild=.t.
set debug=
//-----------------------------------------------

Build.Bat ---- suppose this is pure Console Mode startup routines for windows


rem *******************************************************************************
rem SET DEFAULT OPTIONS
rem *******************************************************************************

set gtdrivers=-gtstd
set runafterbuild=.t.
set debug=

//---------------------------



The driver libs are in hmg.3.1.x\harbour\lib\win\mingw\libgtwin.a
hmg.3.1.x\harbour\lib\win\mingw\libgtstd.a
....

all these libgt***.a have terminal capabillities
even libgtalleg.a as it opens a terminal for
special handling.
In former Harbour(!) versions there was gtdos.a (GCC) or gtdos.lib (Watcom) for the handling
of DOS-Based screen operations.

So simply keep in mind, that the newer HMG-Versions not explicitly
support Console-Mode in Windows.
But with -gtstd it is possible to use Windows-Console-Mode Operation, if -GTGUI is omitted.

So it is up to you, to use Harbour in Console-Mode or HMG in -GTSTD Mode
for your Clipper-Application to test.
As much as I have tested, the -GTGUI is preventing -GTSTD - Mode.
So you have to play somewhat until things fit your purpose.

:)
Happy HMG'ing

Greetings from Germany
klauskugel

Re: MIXED GUI-CONSOLE APPLICATION HELP

Posted: Fri Sep 13, 2013 3:33 pm
by Pablo César
good explanations klauskugel ! Thank you !

Re: MIXED GUI-CONSOLE APPLICATION HELP

Posted: Thu Sep 19, 2013 3:05 am
by manoj_duamzn
As per your guide line I am trying to write a new application in HMG. But Will you tell me problem of harbour compile application.
I have compile my clipper application in harbour with

hbmk2 -gtwvt -strip -shared <app.prg>

In this application I want to print on USB PORT. Now I am using DOS2USB Indian software for it.

For this I try in Harbour application

REQUEST HB_GT_WIN_DEFAULT
PROCEDURE MAIN
Local cPrinterName
cPrinterName=GetDefaultPrinter()
Win_PrintFileRaw(cPrinterName,"report.txt")
RETURN

but at compilation & linking time it gives
UNDEFINED REFERENCE TO HB_FUN_GETDEFAULTPRINTER()
UNDEFINED REFERENCE TO HB_FUN_WIN_PRINTFILERAW()

Kindly help me. How can I give print to USB PORT PRINTER

Beside this tell me how can I send email through Harbour Console Applciation

Re: MIXED GUI-CONSOLE APPLICATION HELP

Posted: Thu Sep 19, 2013 6:57 am
by serge_girard
manoj_duamzn,

I agree completely with Esgici!

I started in January this year and now rebuild two (very) large and complex applications from old-dos-clipper to HMG.
The fist in production April and the second last month. With no major problems. Testing took most of the time....

All of course with large support from this magnificant HMHForum!
We can help you.

Serge

MIXED GUI-CONSOLE APPLICATION HELP

Posted: Thu Sep 19, 2013 11:54 am
by Pablo César
manoj_duamzn wrote:I have compile my clipper application in harbour with

hbmk2 -gtwvt -strip -shared <app.prg>
Have you tried to compile thru the HMG/IDE ?? Let IDE to compile freely even been in console mode.
Kindly help me. How can I give print to USB PORT PRINTER
Which kind of printer is ? Which model, which mark ? Probably some new printers does not works in RAW mode...
Beside this tell me how can I send email through Harbour Console Applciation
You can do using 3rd app as you was doing for Clipper. Probably you can use the same libs and functions to send emails like GUI mode. By console, it is just a user interface. You can use same libs and youself make your screens for console. Go to button "Search" to find topics related send emails, there are so many...

MIXED GUI-CONSOLE APPLICATION HELP

Posted: Mon Feb 23, 2015 10:55 pm
by Pablo César
There is one enhanced sample at: viewtopic.php?f=45&t=4094&p=40041#p40041