Page 9 of 20

Re: HMG 3.4.1

Posted: Fri Jul 10, 2015 11:53 pm
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

Re: HMG 3.4.1

Posted: Sat Jul 11, 2015 12:25 am
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

Re: HMG 3.4.1

Posted: Sat Jul 11, 2015 12:28 am
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.

Re: HMG 3.4.1

Posted: Sat Jul 11, 2015 12:30 am
by Roberto Lopez
Claudio,

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

GetSysColor(COLOR_WINDOW)

I've not tested yet.

Re: HMG 3.4.1 [EDITED]

Posted: Sat Jul 11, 2015 12:42 am
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.

Re: HMG 3.4.1

Posted: Sat Jul 11, 2015 12:50 am
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!

Re: HMG 3.4.1

Posted: Sat Jul 11, 2015 1:01 am
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

Re: HMG 3.4.1

Posted: Sat Jul 11, 2015 1:11 am
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!

Re: HMG 3.4.1

Posted: Sun Jul 19, 2015 1:50 pm
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)

Re: HMG 3.4.1

Posted: Sun Jul 19, 2015 2:06 pm
by bpd2000
Thank you Dr. Claudio Soto for patch