HMG 3.4.1

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.4.1

Post by Roberto Lopez »

Claudio,

I've found a problem in InputWindow (this is an easy one :) )

If you do not specify a BackColor, instead of use the system's default window background color for current theme, InputWindow uses a custom one.

The problem is at h_controlmisc, line 3037:

Code: Select all

If !ValType(aBackColor)="A"
   aBackColor  := {212,208,200}
Endif
Attachments
inputwindow.png
inputwindow.png (37.11 KiB) Viewed 5255 times
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.4.1

Post by srvet_claudio »

srvet_claudio wrote:
Roberto Lopez wrote:Claudio,

I've rebuilt the apps, with unicode version and it works fine now. So, the problem is limited to ANSI version.

Thanks for your help.
mol wrote:As I wrote....
Something is wrong with ANSI compilation
Marek and Roberto,
you are right, the problem is in ANSI, I will have to revise the code.
I think it is now fixed.

1) please unzip this file in source folder and re-build the lib


2) Use the solution proposed by Rathi.

Code: Select all

Function main_query_server_action

   aRecordset := netio_funcexec( "query_001" , Main.Query_String.Value )

Main.Grid_1.ItemCount := 0   // <--  add this line

// Main.Grid_1.DeleteAllItems   // I think that this line is not necessary

   Main.Grid_1.ItemCount := LEN(aRecordset)

Return Nil
Attachments
c_grid.rar
(5.48 KiB) Downloaded 300 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.4.1

Post by Roberto Lopez »

srvet_claudio wrote: I think it is now fixed.

1) please unzip this file in source folder and re-build the lib
2) Use the solution proposed by Rathi.
Thanks!

I'll try it.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.4.1

Post by Roberto Lopez »

Claudio,

Regarding InputWindow problem, I guess that the default background color should be:

GetSysColor(COLOR_WINDOW)

I've not tested yet.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.4.1 [EDITED]

Post by Roberto Lopez »

Claudio,

About InputWIndow problem, this is the solution:

The code starting in line 3037 (h_controlmisc) must be replaced by:

Code: Select all

If !ValType(aBackColor)="A"
	nColor := GetSysColor ( COLOR_BTNFACE )
	aBackColor := { GetRed(nColor) , GetGreen(nColor), GetBlue (nColor) }
Endif
Then, the default background color is correct (the same as the other windows).

In fact it should be COLOR_WINDOW (instead COLOR_BTNFACE), but is not working as expected here.

I'll try to test it on other Windows versions to be sure.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.4.1

Post by Roberto Lopez »

srvet_claudio wrote: I think it is now fixed.

1) please unzip this file in source folder and re-build the lib
2) Use the solution proposed by Rathi.
It works perfect with ANSI and a simpler code:

Code: Select all

Function main_query_server_action

	Main.Grid_1.ItemCount := 0

	aRecordset := netio_funcexec( "query_001" , Main.Query_String.Value )

	Main.Grid_1.ItemCount := LEN(aRecordset)

Return Nil
THANKS!
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.4.1

Post by srvet_claudio »

Roberto Lopez wrote:Claudio,

I've found a problem in InputWindow (this is an easy one :) )

If you do not specify a BackColor, instead of use the system's default window background color for current theme, InputWindow uses a custom one.

The problem is at h_controlmisc, line 3037:

Code: Select all

If !ValType(aBackColor)="A"
   aBackColor  := {212,208,200}
Endif
Roberto Lopez wrote:Claudio,

About InputWIndow problem, this is the solution:

The code starting in line 3037 (h_controlmisc) must be replaced by:

Code: Select all

If !ValType(aBackColor)="A"
	nColor := GetSysColor ( COLOR_BTNFACE )
	aBackColor := { GetRed(nColor) , GetGreen(nColor), GetBlue (nColor) }
Endif
Then, the default background color is correct (the same as the other windows).
Many thanks Roberto,

I fixed, with this force to get the default color:

Code: Select all

If !ValType(aBackColor)="A"
   aBackColor  := NIL
Endif
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.4.1

Post by Roberto Lopez »

srvet_claudio wrote:
I fixed, with this force to get the default color:

Code: Select all

If !ValType(aBackColor)="A"
   aBackColor  := NIL
Endif
Pretty much simpler... Thanks!
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.4.1

Post by srvet_claudio »

Hi all,

1) please unzip this patch in folder c:\hmg.3.4.1

2) and rebuild the lib
- Fixed bug in CreateEvent (reporter by Roberto Lopez)

- Fixed bug in This.QueryData of Grid control (reporter by Roberto Lopez)

- Fixex bug in BackColor of InputWindow (reporter by Roberto Lopez)

- IsControlDefined, IsWindowDefine and IsWindowActive, accept parameters FormName/ControlName with/without quotation marks (contrib by Pablo Cesar)
Attachments
hmg.3.4.1_patch1.rar
(820.73 KiB) Downloaded 628 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HMG 3.4.1

Post by bpd2000 »

Thank you Dr. Claudio Soto for patch
BPD
Convert Dream into Reality through HMG
Post Reply