Page 1 of 2
Window handling.
Posted: Thu Mar 10, 2011 12:14 pm
by mluighy
Hi !
I'm new in HMG forum
I have some living projects which are converted from clipper 5.3. I use gtwvw and hwgui libraries to take them semiGUI/GUI. The base application builds with gtwvw and some of it with hwgui. I wish to know that may i use hmg libraries with the exeisting program source ?
I mean for example that i open a window in this application with hmg function and from that point i use hmg functions for calling graphical objects. Does this work ?
If it is not possible, may it be mixed somehow this libraries ? Or what i write about, it cannot be managed in a single application ?
TIA Lajos
Re: Window handling.
Posted: Thu Mar 10, 2011 1:56 pm
by Rathinagiri
Hi,
IMHO, you can't mingle both the code in a single prg/application. Window handling is different in both the methods.
Re: Window handling.
Posted: Thu Mar 10, 2011 5:13 pm
by dhaine_adp
Hello,
Rathi was right. However you can tie up the applications if you build them in separate executable files (.exe) and call them from HMG thru EXECUTE command. Please consult the manual that comes with HMG distro for the proper syntax and parameters.
I believed there is no problem on those as long as you have put the necessary check and validation prior to operation of the other apps. I mean they should not work on the same tables otherwise you would need to implement record locking.
It's just a suggestion that you can try if you wish to head towards this direction. Otherwise I think you would need to code your application in HMG.
Regards,
Danny
Re: Window handling.
Posted: Fri Mar 11, 2011 11:09 am
by mluighy
Hi,
i suspected that my existing projects are problematic to port.
Thanks for your reply.
Best regards Lajos
Re: Window handling.
Posted: Fri Mar 11, 2011 5:28 pm
by concentra
Try this:
Code: Select all
#include "hbqtgui.ch"
#include "hmg.ch"
#include "std.ch"
Function Main
hbqt_errorsys()
public oWindow
REQUEST HB_GT_WVT
REQUEST HB_GT_WVT_DEFAULT
SetMode( 25, 80 )
@ 10,10 SAY "Calling a QT window from pseudo-console WVT"
@ 12,10 SAY "Press ENTER to show QT window"
Inkey(0)
QtCallFromConsole()
@ 20,10 SAY "Press ENTER to quit..."
Inkey(0)
Return Nil
Static function QtCallFromConsole()
With Object oWindow := Window():New()
:Width := 400
:Height := 400
:Title := 'Calling a QT window from pseudo-console WVT'
:Type := WND_MAIN
End With
oWindow:Activate()
Return Nil

Re: Window handling.
Posted: Sun Mar 13, 2011 10:25 am
by mluighy
Hi Mauricio !
If i understand well, with this code i could open minigui window from gtwvw console ?
Which minigui libs should be used to link ?
TIA: Lajos
Re: Window handling.
Posted: Sun Mar 13, 2011 10:39 am
by mluighy
Sorry Mauricio,
i almost forget that my projects are in xharbour environment.
Does exist minigui version for xharbour, or is this plus problem ?
Lajos
Re: Window handling.
Posted: Mon Mar 14, 2011 10:23 am
by concentra
Hi.
mluighy wrote:
If i understand well, with this code i could open minigui window from gtwvw console ?
I tested with gtwvt but gtwvw should be ok also. Will try.
mluighy wrote:
Which minigui libs should be used to link ?
I just created a DEMO_1.PRG inside the samples and executed BUILD.BAT.
Re: Window handling.
Posted: Mon Mar 14, 2011 10:30 am
by concentra
Hi.
mluighy wrote:
i almost forget that my projects are in xharbour environment.
Does exist minigui version for xharbour, or is this plus problem ?
My projects are in xHarbour also, the commercial version but I a not happy with it.
But I am in the process of converting all code to Harbour and my subscription to xHarbour.com will end this month and I will not renew.
Almost all code is the same, only minor changes, most of them are documented in \harbour\contrib\xhb\hbcompat.h.
I took less than a week to convert a huge application from xHarbour to Harbour...
Re: Window handling.
Posted: Mon Mar 14, 2011 10:38 am
by concentra
mluighy wrote:
If i understand well, with this code i could open minigui window from gtwvw console ?
I tested with GTWVG and it is ok, but I was unable to find a GTWVW lib in Harbour.
I use GTWVT in all my console code...