prg code function documentor in HMG

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: prg code function documentor in HMG

Post by RPC »

Hi AUGE_OHR
Your program works like a charm.
It does show click icon both in explorer and task bar :D
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

hi,

i have to run CLICK Source under MiniGUI.
it need some modification e.g. how to change Button ACTION after create.

Code: Select all

_HMG_SYSDATA[ 6 ] [ nIndex ] := { || DoEsc() }
_HMG_SYSDATA[ 6 ] [ nIndex ] := { || DoExit() }
_HMG_SYSDATA[ 6 ] [ nIndex ] := { || StartClick() }
Question : is there a IFDEF Constante that i can use for HMG / MiniGUI to use different Code / Syntax :?:

never less i was able to Start and with CLICK.
it work and it is MUCH faster than HMG Version, 24 Sec. vs 40 Sec. :o

as we all know it have only to do with Grafik "OutPut" and MiniGUI seem to use GDIplus instead of GDI32
but i have a Problem when press "X" to close Apps ... it crash (when .Release :?: )
Called from GDIPLUSSHUTDOWN(0)
Called from RELEASEALLWINDOWS(2285) in h_windows.prg
Called from __QUIT(43) in C:\MINIGUI\SAMPLES\0\CLICK\XBASE.Prg
Called from RELEASEALLWINDOWS(2296) in h_windows.prg
Called from _RELEASEWINDOW(2334) in h_windows.prg
Called from DOMETHOD(5366) in h_controlmisc.prg
Called from (b)MAIN(555) in C:\MINIGUI\SAMPLES\0\CLICK\CLICK2.Prg
Called from _DOCONTROLEVENTPROCEDURE(1858) in h_windows.prg
Called from EVENTS(698) in h_events.prg
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(1493) in h_windows.prg
Called from MAIN(558) in C:\MINIGUI\SAMPLES\0\CLICK\CLICK2.Prg

Code: Select all

555   ON KEY ESCAPE OF ClickForm ACTION ClickForm.Release
556   CENTER WINDOW ClickForm
557
558   Activate Window ClickForm               <- Crash here when close App
559
560 RETURN
please have a look at it when release Source

btw. have to rename CLICK.PRG into CLICK2.PRG when using MinGUI IDE while it create a *.INI from "Main" PRG :roll:
we NEED CLICK.INI but MiniGUI IDE "OVERRIDE" CLICK.INI ... after rename now MiniGUI IDE use CLICK2.INI
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

hi,

there is a BUG in v0.26 when have something like this

Code: Select all

Start_xxx()
i had to check if "PRINTDOC" or "PRINTPAGE" is in same line as "START"
have fix it for Release
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

hi,

have made many Test with different Source and it seem to work fine :D
so i will freese this Version for Release.

add :

Code: Select all

IF aFileNames[ x, F_NAME ] = "HB_FUNC.PRG"
   // use this Filename for C-Code
ELSE
   AADD( aFileList, aFileNames[ x, F_NAME ] )
ENDIF
i recommend to use HB_FUNC.PRG for all C-Code and exclude it from Filelist so CLICK will not touch that Code.
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

hi,

so here is the Source Code for HMG CLICK v2.05.29
hb_CLICK_20529.ZIP
(67.37 KiB) Downloaded 311 times
i'm doing my best but i can't guarantee that produce Code is free of Error :!:
even when CLICK does not find a Error and it compile / link it is still possible that "something" have change.

so make BACKUP from *.PRG before you override it with Code produced by CLICK :!:

---

about ";"
it seem that "Keyword" like "End" or "Return" can be "lost" when have ";" before.
so write "End" or "Return" in next line so CLICK will be not confuse to "forget" it :o

it work without "+" when using

Code: Select all

.AND. ;
.OR. ;
it work with long String and "+" in next line but more safe (for CLICK) when using "+ ;" at End of line

Code: Select all

BEGIN xxx
i have only test BEGIN INI
hope other are used in *.RMG which CLICK do not touch

---

small BUG with STATUSITEM with are not Intend

Code: Select all

      DEFINE STATUSBAR ..
   STATUSITEM ..
---

for MiniGUI User :
you have to delete some line where MiniGUI IDE found a Error.
also all HMG_* are not working when have "MINIGUI.CH" instead of "HMG.CH"

i do change Button ACTION after create.

Code: Select all

_HMG_SYSDATA[ 6 ] [ nIndex ] := { || DoEsc() }
_HMG_SYSDATA[ 6 ] [ nIndex ] := { || DoExit() }
_HMG_SYSDATA[ 6 ] [ nIndex ] := { || StartClick() }
if someone found a MiniGUI Solution please also post it here in "this" Forum.

! Note : MiniGUI IDE create a Name.INI where Name = 1st PRG -> CLICK.INI ... :roll:
so for MiniGUI so have to rename CLICK.PRG into CLICK2.PRG :!:

---

feel free to modify Source.
if you someone find a nice Solution please post it here in "this" Forum, thx
have fun
Jimmy
User avatar
quartz565
Posts: 667
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Contact:

Re: prg code function documentor in HMG

Post by quartz565 »

Thank you again Jimmy!
I'll try the new version

Nikos
Best Regards,
Nikos.

os: Windows Server 2019 - 64
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: prg code function documentor in HMG

Post by RPC »

Hi AUGE_OHR
Thanks for v 2.05.29 and source code.
When I try to compile it I get error msg as per follo SS
Click20529 error msg.png
Click20529 error msg.png (1.05 MiB) Viewed 22574 times
I am unable to tell what is the exact error.
Can you please look into it
Thanks
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

hi,

i can't see youe full Modul List but i guess CLICK.PRG is NOT declare as "Main"
MakeMain.JPG
MakeMain.JPG (58.59 KiB) Viewed 22567 times
in IDE "somewhere" i saw a Option ...
other Way was to delete CLICK.PRG from Modul List and Import it again.

---

my Way is to click on *.HBP.
1st time Windows will ask how to open file and i point to

Code: Select all

c:\hmg.3.4.4\IDE\IDE.exe
and let Windows "remember"

next time when click on *.HBP it will open Project in IDE and i just press F5
have fun
Jimmy
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: prg code function documentor in HMG

Post by RPC »

Hi AUGE_OHR
Ok. Got it.
There is no \res sub dir and no clickBW32.ico file in it.
I put a dummy icon after creating \res directory and now it compiles !
Please upload clickBW32.ico file so that I can incorporate in the compiled program.

Secondly I am curious why the error mentions it as HMG 3.4.3 stable(32 bit) instead of HMG 3.4.4 which I am using to compile ?
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

RPC wrote: Tue Jan 21, 2020 10:56 am Hi AUGE_OHR
my Name is Jimmy
RPC wrote: Tue Jan 21, 2020 10:56 am Ok. Got it.
There is no \res sub dir and no clickBW32.ico file in it.
I put a dummy icon after creating \res directory and now it compiles !
uuups ... forgot \RES
Click_Res.JPG
Click_Res.JPG (28 KiB) Viewed 22530 times
so delete Icon and use your own Icon but it must called
MYMAIN ICON YourResource.ICO
RPC wrote: Tue Jan 21, 2020 10:56 am Secondly I am curious why the error mentions it as HMG 3.4.3 stable(32 bit) instead of HMG 3.4.4 which I am using to compile ?
no Idea
have fun
Jimmy
Post Reply