Window handling.

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

mluighy
Posts: 7
Joined: Wed Mar 09, 2011 3:44 pm

Window handling.

Post by mluighy »

Hi !

I'm new in HMG forum :shock:
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 ? :roll:

TIA Lajos
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Window handling.

Post by Rathinagiri »

Hi,

IMHO, you can't mingle both the code in a single prg/application. Window handling is different in both the methods.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

Re: Window handling.

Post 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
Regards,

Danny
Manila, Philippines
mluighy
Posts: 7
Joined: Wed Mar 09, 2011 3:44 pm

Re: Window handling.

Post by mluighy »

Hi,

i suspected that my existing projects are problematic to port. :(
Thanks for your reply.

Best regards Lajos
User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Re: Window handling.

Post 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
:)
[[]] Mauricio Ventura Faria
mluighy
Posts: 7
Joined: Wed Mar 09, 2011 3:44 pm

Re: Window handling.

Post 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
mluighy
Posts: 7
Joined: Wed Mar 09, 2011 3:44 pm

Re: Window handling.

Post 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
User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Re: Window handling.

Post 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.
[[]] Mauricio Ventura Faria
User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Re: Window handling.

Post 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...
[[]] Mauricio Ventura Faria
User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Re: Window handling.

Post 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...
[[]] Mauricio Ventura Faria
Post Reply