MIXED GUI-CONSOLE APPLICATION HELP

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: MIXED GUI-CONSOLE APPLICATION HELP

Post 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
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: MIXED GUI-CONSOLE APPLICATION HELP

Post 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 5770 times
ManoTst2.zip
Mixed UI project of Manoj; source files
(1.16 KiB) Downloaded 381 times
Please don't hesitate to ask anything, as always :arrow:

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: MIXED GUI-CONSOLE APPLICATION HELP

Post 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 5763 times
EGURO00.PRG.png
EGURO00.PRG.png (27.54 KiB) Viewed 5763 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
klauskugel
Posts: 90
Joined: Tue Oct 09, 2012 2:28 pm

Re: MIXED GUI-CONSOLE APPLICATION HELP

Post 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
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: MIXED GUI-CONSOLE APPLICATION HELP

Post by Pablo César »

good explanations klauskugel ! Thank you !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
manoj_duamzn
Posts: 21
Joined: Fri Aug 30, 2013 5:38 am

Re: MIXED GUI-CONSOLE APPLICATION HELP

Post 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
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: MIXED GUI-CONSOLE APPLICATION HELP

Post 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
There's nothing you can do that can't be done...
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MIXED GUI-CONSOLE APPLICATION HELP

Post 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...
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MIXED GUI-CONSOLE APPLICATION HELP

Post by Pablo César »

There is one enhanced sample at: viewtopic.php?f=45&t=4094&p=40041#p40041
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply