Trying to understand the Samples via HMGIDE

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

Trying to understand the Samples via HMGIDE

Post by CCH4CLIPPER »

Hi

Just downloaded HMG/HMGIDE and I must say I am pretty impressed with it given my extensive Delphi + Clipper background.

Using the Menu Sample,
#include "minigui.ch"

Function Main

Load Window Test
Center Window Test
Activate Window Test

Return

I can understand that Test is a window defined as test.fmg but I cannot see how and where the

a) File /Open, Edit,Save is created
b) how the message Dialog is onvoke when one click say File/open


CCH
http://cch4clipper.blogspot.com

User avatar
esgici
Posts: 4538
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 410 times
Been thanked: 118 times
Contact:

Post by esgici »

Hello CCH, welcome abord, big haapiness seeing you here :D
CCH4CLIPPER wrote:
Just downloaded HMG/HMGIDE and I must say I am pretty impressed with it given my extensive Delphi + Clipper background.
This is HMG power. :) Thanks to Roberto Lopez.
CCH4CLIPPER wrote:
...

I can understand that Test is a window defined as test.fmg but I cannot see how and where the

a) File /Open, Edit,Save is created
b) how the message Dialog is onvoke when one click say File/open


CCH
In HMG-IDE, all the project files ( .ch, .prg, .fmg etc ) are in project directory. Only project file ( .hmg ) invoke directory path when first opening and first saving. Other files are saved to project path without asking path. When you open a project file (.hmg), IDE open all project files automatically.

Again, welcome and happ HMG'ing.

Best Regards.

--

esgici
Viva INTERNATIONAL HMG :D

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

Post by CCH4CLIPPER »

Hi esgici

Great to be here :D

What I meant was how do I define the menus or customise the menu sample ?

CCH
http://cch4clipper.blogspot.com

User avatar
esgici
Posts: 4538
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 410 times
Been thanked: 118 times
Contact:

Post by esgici »

CCH4CLIPPER wrote: ...

What I meant was how do I define the menus or customise the menu sample ?

CCH
Hello CCH

Well, we have four "menu builder" commands/buttons in the "builders" section of "Control Panel" of HMG-IDE: Main menu, Context Menu, Notify Menu and Drop-down Menu builders.

Because of the menu controls are complicated than ordinary GUI control, they are considered as "builder" in IDE.

Although HMG-IDE is a optional utility for make easy working in graphics, sometime working without IDE may be seen more easy.

In other hand for learning , direct coding is always better way than using "code writers".

In short, my suggestion is beginning by "Adding The Main Menu" subtitle of "Tutorial" page: C:\hmg\DOC\tutorial.htm

Regards

--

esgici
Viva INTERNATIONAL HMG :D

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

Post by CCH4CLIPPER »

Hi Escigi

Yup, I found out how it was done via Menu Builder late last night.

What I am going to do is to explore the IDE first...
BTW, I am promoting HMG at Clipper... Clipper...Clipper

CCH
http:/cch4clipper.blogspot.com

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

Post by CCH4CLIPPER »

Hi Esgici

You are right, it is much easier to code by hand :-)

So, I am temporarily dropping the IDE and coding by hand the menu framework of my target xHarbour Application

BTW, if I have several prgs, how do I compile them ?
The samples compile.bat deals with only a single prg


CCH
http://cch4clipper.blogspot.com

User avatar
Rathinagiri
Posts: 5324
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 200 times
Been thanked: 210 times
Contact:

Post by Rathinagiri »

It is easy to compile several prgs.

Write down all the prg filenames each in a separate line, keeping the prg file having main() function as the first line.

Save the file giving an extension of .hpj and open the same using HMG-IDE. You need not worry about any designing of forms there. Just press ctrl+F5 (Project->Build) or F5 (Project -> Run) or click the play button there to build and run.

So, HMG-IDE is a two way utility to build a HMG project and as well as an IDE.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
esgici
Posts: 4538
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 410 times
Been thanked: 118 times
Contact:

Post by esgici »

CCH4CLIPPER wrote:
... if I have several prgs, how do I compile them ?
The samples compile.bat deals with only a single prg

CCH
Hi CCH

As Rathinagiri said, it is easy to compile several prgs with HMG-IDE.

As cited in HMG-IDE page of Viva Clipper], HMG-IDE is both a Project Manager and a Form Designer.

The project management tools allow you all project based works with interactive manner. This includes building and running projects without complex batch processing and environment configuration tasks.

Build or open a project and add or exclude project elements ( forms (.fmg), modules (.prg ) whatever you want. This way have a big advantage: since HMG-IDE is at the same time a highly sophisticated "make" utility, only changed files will be compiled.

Alternatively you can use SET PROCEDURE TO <cModulFileName> command and also #include <cModulFileName> statement of Clipper. But, notice that in this case "make" concept will be broken.

In other hand, "The samples compile.bat deals with only a single prg" isn't correct. If you read it you will be seen "%1 %2" expressions. They are command parameters and each for a separate file.

BTW, in only one night you solved almost all about HMG, congratulations! :D

Regards

--

esgici
Viva INTERNATIONAL HMG :D

Post Reply