NC Clone

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
gfilatov
Posts: 1060
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: NC Clone

Post by gfilatov »

AUGE_OHR wrote: Fri Sep 25, 2020 5:40 am hi,

it seem there is a big BUG in HBFM since v1.17 :shock:

after delete a File HBFM does not work correct with F3/F4 and show "black" Window or "no Image" etc. :evil:
Hi Jimmy,

You are correct - there is a bug in the C-function GETICOINDEX().

Please take a look for the fixed function below:

Code: Select all

HB_FUNC( GETICOINDEX )
{
   int nSize = ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 );

   SHFILEINFO sfi = { 0 };

   SHGetFileInfo( hb_parc( 1 ), 0, &sfi, sizeof( SHFILEINFO ), SHGFI_ICON | nSize );

   hb_retnl( ( LONG ) sfi.iIcon );

   HB_STORNL( ( LONG_PTR ) ( HICON ) sfi.hIcon, 3 );
}
Sample code:

Code: Select all

...
         nIndex := GETICOINDEX( cFile, nSize, @hIcon )
      ENDIF

      ListView_SetItemImageIndex( GetControlHandle( cObj, cForm ), i, 1, nIndex )

      IF Valtype( hIcon ) != "U"
         IF DestroyIcon( hIcon )
            hIcon := NIL
         ENDIF
      ENDIF
Hope that helps :idea:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: NC Clone

Post by AUGE_OHR »

hi,
gfilatov wrote: Fri Sep 25, 2020 9:41 am You are correct - there is a bug in the C-function GETICOINDEX().

Please take a look for the fixed function below:
Hope that helps :idea:
YES , THX :!:

i have not test to Delete Files so i have not recognize my Error, sorry :roll:

so here latest Version v1.29

32 Bit
HBFM_129.zip
(2.19 MiB) Downloaded 200 times
64 Bit
HBFM64_129.zip
(2.51 MiB) Downloaded 181 times

i will also update on GitHub.
i will add a Folder \SOURCE which include Change of HMG LIB to use Type "T" or "@" and "I"
please look into README.TXT

! Note : Files are documented by CLICK
// v.1.29 22.09.2020 BUG GETICOINDEX() sind v1.17 in FMGRID.PRG DirImageColor()
// v.1.28 21.09.2020 integrate VFP Type "I" and "@" (Timestamp)
// need change in HMG \Source\H_BROWSE.PRG amd h_controlmisc.prg
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: NC Clone

Post by AUGE_OHR »

latest Version v1.35

32 Bit
HBFM_135.zip
(2.2 MiB) Downloaded 197 times
64 Bit
HBFM64_135.zip
(2.52 MiB) Downloaded 192 times
i have change Image Viewer while i want to add

Code: Select all

   // more FreeImage
   CASE cExt $ ".PSD.ICO.EXR.PCX.PPM.PSD.WEBP.JP2.PPM"
now i "paint" Picture using BitBlt() / StretchBlt()

if Edit Picture all is done on "temp file" and later ask to save it

! Note : rotate in Thumbs WILL change Original Picture without asking !

fixed :
BUG DestroyIcon() for HMG

new :
HB_FUNC.PRG for 32 and 64 Bit
// v.1.35 03.10.2020 BUG DestroyIcon() for HMG_*
// v.1.34 30.09.2020 HB_FUNC.PRG "64 Bit ready" using HMG_* instead of hb.*
// v.1.33 29.09.2020 FreeImage : HB_FUNC ( FREE_DRAWPICTURE ) re-size
// v.1.32 28.09.2020 FreeImage Workfile when view or rotate.
// will ask to Save Workfile which Replace Original !
// Thumbs direct Replace Original !
// v.1.31 27.09.2020 FreeImage now also use for Viewer and Picture > Screen
// v.1.30 26.09.2020 Problem when delete many Files. now BEGIN SEQUENCE
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: NC Clone

Post by AUGE_OHR »

here lates Ver v1.38

32 Bit
HBFM_138.zip
(2.2 MiB) Downloaded 241 times
64 Bit
HBFM64_138.zip
(2.52 MiB) Downloaded 203 times
after got that "Apple Email Attachment" i have change Codepage to UTF8

but i also have to change DLL Funtion from "A" to W"
FreeImage and ShFileOperation are still ANSI so i have to convert Filename to ANSI when call these Function

btw. Extended Version have ShFileOeration but also only "A" Version.
c:\MiniGUI\SOURCE\shell32\Shell32.prg

---

i do upload each Version to Github but only "Stable" Version in Forum.
if you find a reproducible Error please write me a Email (about -> mail to author )

fixed : DestroyIcon() 2nd fix in HB_FUNC.PRG

New : UTF8 as default Codeepage.
change DLLcall from "A" to "W"

add : runAs Adminstrator in Pop-Up Menu
// v.1.38 13.10.2020 German "umlaute" from Apple Email CHR(204)
// v.1.37 07.10.2020 enhance HMG_Calldll() "A" and "W"
// v.1.36 06.10.2020 change to Codepage UTF8
have fun
Jimmy
HGAutomator
Posts: 188
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: NC Clone

Post by HGAutomator »

Hi Auge,

I tried running both the 32 and 64 bit versions, and neither of them run.

I need a more maximized file manager than HMG's FileMan. I'd prefer text mode, but the one at https://github.com/omm/harbour-commander was never completed.

When I run 32-bit HBFM, it just returns without doing anything.

The 64-bit version says that the Application was unable to start correctly.

Do you have the most recent source, so I can try to compile it here?
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: NC Clone

Post by AUGE_OHR »

hi,
HGAutomator wrote: Wed Jan 11, 2023 9:47 pm I tried running both the 32 and 64 bit versions, and neither of them run.
please try
dir %appdata%\HMG
please delete FMSETUP.DBF / FMSETUP.fpt if found ant try start again
have fun
Jimmy
HGAutomator
Posts: 188
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: NC Clone

Post by HGAutomator »

There's no HMG folder inside of the ../AppData/Roaming folder.

Anyway, never mind, I found your source on github

https://github.com/AugeOhr/HBFM
HGAutomator
Posts: 188
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: NC Clone

Post by HGAutomator »

Ah. Beautiful. Works like a gem, thanks.

I'll donate to MiniGui this month. If you have a Paypal address, please forward so I can send you something as well.
HGAutomator
Posts: 188
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: NC Clone

Post by HGAutomator »

Hi Auge_ohr,

The pre-compiled 64-bit executable is working perfectly. Thanks for taking the time to put it together.

However, I'm not able to compile from the github source.

If you have time, can you forward your environment, related to Minigui? I think the most important is probably the INCLUDE environmental variable. Possibly I should reorder the INCLUDE paths, or maybe even take one out.

Here are the errors I'm getting. This is from the Mingw Minigui version, but there are similar errors with the borland minigui.

FMCOLOR.PRG >> HBFM.LOG
i_var.ch(54) Error E0003 Duplicate variable declaration '_HMG_SYSDATA'
FMGRID.PRG(189) Error E0009 Illegal variable 'NLASTVIEW' initializer ''
FMGRID.PRG(318) Error E0030 Syntax error "syntax error at 'WINDOW'"
FMGRID.PRG(484) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(490) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(991) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(1003) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(1319) Error E0030 Syntax error "syntax error at '@'"
FMGRID.PRG(1375) Error E0030 Syntax error "syntax error at '@'"
FMGRID.PRG(2280) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(2998) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(2999) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(3751) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(4626) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(4640) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(4828) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(4850) Error E0030 Syntax error "syntax error at '.'"
FMGRID.PRG(6255) Error E0030 Syntax error "syntax error at '.'"
HBDEVICE.PRG(98) Error E0030 Syntax error "syntax error at ')'"
HBDEVICE.PRG(109) Error E0010 ENDIF does not match IF
HBDEVICE.PRG(121) Error E0030 Syntax error "syntax error at 'FUNCTION'"
HBEJECT.PRG(562) Error E0030 Syntax error "syntax error at '.'"
HBEJECT.PRG(599) Error E0030 Syntax error "syntax error at '.'"
HBEJECT.PRG(599) Error E0022 Invalid lvalue '()'
HBEJECT.PRG(624) Error E0030 Syntax error "syntax error at '.'"
HBFTP.PRG(132) Error E0003 Duplicate variable declaration '_HMG_SYSDATA'
HMGDLL.PRG(519) Error E0030 Syntax error "syntax error at '.'"
MODISTRU.PRG(112) Error E0030 Syntax error "syntax error at 'WINDOW'"
MODISTRU.PRG(161) Error E0030 Syntax error "syntax error at '.'"
PHONE2.PRG(61) Error E0003 Duplicate variable declaration '_HMG_SYSDATA'
PHONE2.PRG(271) Error E0030 Syntax error "syntax error at '.'"
PHONE2.PRG(330) Error E0030 Syntax error "syntax error at '.'"
PHONE2.PRG(405) Error E0030 Syntax error "syntax error at '.'"
PHONE2.PRG(405) Error E0022 Invalid lvalue '()'
PHONE2.PRG(519) Error E0030 Syntax error "syntax error at '.'"
PHONE2.PRG(519) Error E0022 Invalid lvalue '()'
PHONE2.PRG(571) Error E0030 Syntax error "syntax error at '.'"
THUMBS.PRG(426) Error E0030 Syntax error "syntax error at '.'"
VIEWER.PRG(85) Error E0003 Duplicate variable declaration '_HMG_SYSDATA'
Browser.PRG(1930) Error E0030 Syntax error "syntax error at 'WINDOW'"



AUGE_OHR wrote: Wed Jan 11, 2023 10:58 pm hi,
HGAutomator wrote: Wed Jan 11, 2023 9:47 pm I tried running both the 32 and 64 bit versions, and neither of them run.
please try
dir %appdata%\HMG
please delete FMSETUP.DBF / FMSETUP.fpt if found ant try start again
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: NC Clone

Post by AUGE_OHR »

hi,
HGAutomator wrote: Fri Jan 20, 2023 5:32 pm However, I'm not able to compile from the github source.

If you have time, can you forward your environment, related to Minigui?
it is made for HMG not MiniGUI :!:

---

i have work on a MiniGUI Version but there are too many Difference to HMG
not only *.PRG also HB_FUNC() must be enhance as Grigory show me

i have gave up MiniGUI Version of HBFM , sorry
have fun
Jimmy
Post Reply