HMG 3.1.1

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 1924
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 27 times
Been thanked: 99 times
Contact:

Re: HMG 3.1.1

Post by srvet_claudio » Tue Apr 02, 2013 10:35 pm

danielmaximiliano wrote:
srvet_claudio wrote:
srvet_claudio wrote:Hi All.
I attached a patch for source code of HMG.3.1.1

Best regards,
Claudio.
Hola Claudio: Como siempre muchas gracias por su esfuerzo en las contribuciones para con HMG.

este segundo patch contiene el 1° patch ? sino es asi puede ser un nuevo topico acerca del mismo( Patch para HMG.3.1.1)
Hi Daniel.
Yes, this 2nd patch includes first patch.
Un abrazo,
Claudio.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

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

Post by esgici » Wed Apr 03, 2013 11:28 am

srvet_claudio wrote: ...
This is a new patch for HMG.3.1.1
...
Hi Dr

- re-installed HMG_3.1.1 to a new folder ( clean install )
- Open hmg.3.1.1_patch2.rar to this folder by overwrite
- run buildlib.bat
- open MENU_Dynamic_Demo\demo.hbp by HMG_IDE
- build and run

C:/hmg/lib/libhmg.a(c_winapimisc.o):c_winapimisc.c:(.text+0xac): undefined reference to `HMG_WCHAR_TO_CHAR'
...
C:/hmg/lib/libhmg.a(c_dialogs.o):c_dialogs.c:(.text+0x840): undefined reference to `HMG_CHAR_TO_WCHAR
...
'


- add

Code: Select all

#include "HMG_UNICODE.h" 
line to (top of) C:\hmg_3.1.1\INCLUDE\minigui.ch

- run buildlib.bat
- open MENU_Dynamic_Demo\demo.hbp by HMG_IDE
- build and run

C:\hmg_3.1.1\include\HMG_UNICODE.h(51) Error F0029 Can't open #include file 'tchar.h'

Where I'm wrong :cry: :?:

Note : there are multiple notes in harbour\changelog.txt such as:
2012-11-27 21:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
...
* do not include <tchar.h>, current code does not use
any tchar functions and macros and some older MinGW
versions are broken and this files breaks some standard
unicode macros like TEXT()
I don't know is there any relation :(

TIA
Viva INTERNATIONAL HMG :D

User avatar
mol
Posts: 2779
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 107 times
Been thanked: 42 times
Contact:

Post by mol » Wed Apr 03, 2013 12:56 pm

Maybe it's time to create new full version?

User avatar
srvet_claudio
Posts: 1924
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 27 times
Been thanked: 99 times
Contact:

Post by srvet_claudio » Wed Apr 03, 2013 1:05 pm

esgici wrote:
srvet_claudio wrote: ...
This is a new patch for HMG.3.1.1
...
Hi Dr

- re-installed HMG_3.1.1 to a new folder ( clean install )
- Open hmg.3.1.1_patch2.rar to this folder by overwrite
- run buildlib.bat
- open MENU_Dynamic_Demo\demo.hbp by HMG_IDE
- build and run

C:/hmg/lib/libhmg.a(c_winapimisc.o):c_winapimisc.c:(.text+0xac): undefined reference to `HMG_WCHAR_TO_CHAR'
...
C:/hmg/lib/libhmg.a(c_dialogs.o):c_dialogs.c:(.text+0x840): undefined reference to `HMG_CHAR_TO_WCHAR
...
'


- add

Code: Select all

#include "HMG_UNICODE.h" 
line to (top of) C:\hmg_3.1.1\INCLUDE\minigui.ch

- run buildlib.bat
- open MENU_Dynamic_Demo\demo.hbp by HMG_IDE
- build and run

C:\hmg_3.1.1\include\HMG_UNICODE.h(51) Error F0029 Can't open #include file 'tchar.h'

Where I'm wrong :cry: :?:

Note : there are multiple notes in harbour\changelog.txt such as:
2012-11-27 21:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
...
* do not include <tchar.h>, current code does not use
any tchar functions and macros and some older MinGW
versions are broken and this files breaks some standard
unicode macros like TEXT()
I don't know is there any relation :(

TIA

Hi Esgici.

Wow, is strange problem ... :?: in my two laptop works ok (XP and 7).

Please:

1) delete the line (you add): #include "HMG_UNICODE.h" of the file C:\HMG.3.1.1\INCLUDE\minigui.ch

2) Test if in the file C:\HMG.3.1.1\INCLUDE\HMG_UNICODE.h have the lines:

Code: Select all

    ...
    #define HMG_CHAR_TO_WCHAR(c)     ((c != NULL) ? hb_osStrU16Encode(c) : NULL)  // return WCHAR
    ...
    #define HMG_WCHAR_TO_CHAR(c)      hb_osStrU16Decode(c)                       // return CHAR
    ...
3) See if the beginning of the file C:\HMG.3.1.1\SOURCE\c_winapimisc.c, c_dialogs.c, ... have the line: #include "HMG_UNICODE.h"

4) See if file C:\HMG.3.1.1\hmg.hbp is:
-hblib
-olib/hmg

-Iinclude

-D__HBIDE__

-w2 -es2

source/UNICODE_STRING.prg
source/ErrorSys.prg
source/h_browse.prg
...
...

Hope it works :!:
Best regards,
Claudio
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
srvet_claudio
Posts: 1924
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 27 times
Been thanked: 99 times
Contact:

Post by srvet_claudio » Wed Apr 03, 2013 1:06 pm

mol wrote:Maybe it's time to create new full version?
Yes, it's the best.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

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

Post by esgici » Wed Apr 03, 2013 1:59 pm

esgici wrote: ...
Where I'm wrong :cry: :?:
...
FOUND !

Guilty is C:\hmg.3.1.1\IDE\hmg.ini ( Not me :lol: )

I'm changing ( very frequently ) HMG root folder name ( hmg, hmg.3.1.1, hmg.311, hmg_3.046 etc ).

HMG_IDE always look at C:\hmg.3.1.1\IDE\hmg.ini for HMG root folder ( HMG path) :(

I must modify content of that hmg.ini depending on HMG root folder whenever changed :!:

Sorry Dr and other friends interested :oops:

By the way; it's important enhancement ability to change menu content ( especially for language ) :arrow:

Separate thanks for this Dr. :)

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D

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

Post by Rathinagiri » Wed Apr 03, 2013 2:16 pm

Now is the time for a new version. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

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

Post by esgici » Wed Apr 03, 2013 2:21 pm

rathinagiri wrote:Now is the time for a new version. :)
Definitely :!:
Viva INTERNATIONAL HMG :D

User avatar
srvet_claudio
Posts: 1924
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 27 times
Been thanked: 99 times
Contact:

Post by srvet_claudio » Wed Apr 03, 2013 2:27 pm

esgici wrote:
esgici wrote: ...
Where I'm wrong :cry: :?:
...
FOUND !

Guilty is C:\hmg.3.1.1\IDE\hmg.ini ( Not me :lol: )

I'm changing ( very frequently ) HMG root folder name ( hmg, hmg.3.1.1, hmg.311, hmg_3.046 etc ).

HMG_IDE always look at C:\hmg.3.1.1\IDE\hmg.ini for HMG root folder ( HMG path) :(

I must modify content of that hmg.ini depending on HMG root folder whenever changed :!:

Sorry Dr and other friends interested :oops:

By the way; it's important enhancement ability to change menu content ( especially for language ) :arrow:

Separate thanks for this Dr. :)

Happy HMG'ing :D
It's ok, no problem. :D
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
gfilatov
Posts: 502
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 6 times
Been thanked: 32 times
Contact:

Post by gfilatov » Wed Apr 03, 2013 6:05 pm

srvet_claudio wrote: It's ok, no problem. :D
Hello Dr. Soto,

There is a GDI bitmap resources leak in the current GdiPlus usage.

My test sample is below:

Code: Select all

/*
 * HMG - Harbour Win32 GUI library Demo
 *
 * Copyright 2002 Roberto Lopez <mail.box.hmg@gmail.com>
 * http://www.hmgforum.com//
*/

#include "hmg.ch"

Function Main

        DEFINE WINDOW Win_1 ;
                AT 0,0 ;
                WIDTH 640 HEIGHT 480 ;
                TITLE 'Main Window' ;
                ICON 'WORLD' ;
                MAIN

                @ 200,140 IMAGE Image_1 ;
                        PICTURE 'img.gif' ;
                        WIDTH 200 ;
                        HEIGHT 200

                @ 10 ,10  BUTTON Button_1 CAPTION "Set png" ACTION test() WIDTH 100  HEIGHT 30
                @ 10 ,110 BUTTON Button_2 CAPTION "Set jpg" ACTION Win_1.Image_1.Picture := "img.jpg" WIDTH 100  HEIGHT 30
                @ 10 ,210 BUTTON Button_3 CAPTION "Set ico" ACTION Win_1.Image_1.Picture := "img.ico" WIDTH 100  HEIGHT 30
                @ 10 ,310 BUTTON Button_4 CAPTION "Set wmf" ACTION Win_1.Image_1.Picture := "img.wmf" WIDTH 100  HEIGHT 30
                @ 10 ,410 BUTTON Button_5 CAPTION "Set cur" ACTION Win_1.Image_1.Picture := "img.cur" WIDTH 100  HEIGHT 30
                @ 10 ,510 BUTTON Button_6 CAPTION "Set bmp" ACTION Win_1.Image_1.Picture := "demo.bmp" WIDTH 100  HEIGHT 30

        END WINDOW

        ACTIVATE WINDOW Win_1

Return Nil


func test
local i

for i:=1 to 1000
Win_1.Image_1.Picture := "img.png"
do events
next

retu nil
We have 1(one) unreleased bitmap resource at the each step of iteration (tested via GDIView utility from http://www.nirsoft.net/) :roll:

What is your opinion?
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein

Post Reply