HMG 2.9.3

HMG announcements; Latest HMG-related news, releases, fixes and updates.

Moderator: Rathinagiri

User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: HMG 2.9.3

Post by Vanguarda »

Roberto Lopez wrote: Stay tuned... we will find the solution :)
Yeah! You find one solution master. I know. :)
You are amazing.

with best regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 2.9.3

Post by Roberto Lopez »

Roberto Lopez wrote: Stay tuned... we will find the solution :)
Ok.

The problem and solution are described here:

http://blogs.msdn.com/oldnewthing/archi ... 05624.aspx

Apparently, in some situations HMG is setting (indirectly) the focus for the buttons using 'SetFocus' WINAPI function only. This cause multiple default buttons (multiple buttons with the thin line around them).

Please note that the HMG 'SetFocus' method do (apparently) the 'right thing'.

Look at 'h_controlmisc.prg' lines 1105-1107:

Code: Select all

		CASE T == 'BUTTON'
			setfocus( H )
			SendMessage ( H , 244 , LOWORD ( 1 ) , 1 )
Besides setting the focus I'm sending the BM_SETSTYLE mesage with BS_DEFPUSHBUTTON style, this way the focus rectangle and the thin line are in the same button (*).

So, surely, MsgInfo function or Enabled property are sending a WinAPI setfocus only to the buttons.

Anyway, I must investigate a lot prior to give a final word and a solution for the problem.

It could take some time...

EDIT: This code should be reviewed too. It could be part of the problem.

Regards,

Roberto.
Regards/Saludos,

Roberto


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

Re: HMG 2.9.3

Post by Roberto Lopez »

Vanguarda wrote: Yeah! You find one solution master. I know. :)
You are amazing.
Well... may be not :)

And... Congratulations!

This problem is here from MiniGUI library begin (seven years ago) and as far as I can remember, your are the first mentioning it :)

It's a subtle thing, but I've not noted either :)

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: HMG 2.9.3

Post by Vanguarda »

Roberto Lopez wrote: Well... may be not :)

And... Congratulations!

This problem is here from MiniGUI library begin (seven years ago) and as far as I can remember, your are the first mentioning it :)

It's a subtle thing, but I've not noted either :)

Regards,

Roberto.
Master, I´m so glad for contribute with the HMG Project.

With best regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 2.9.3

Post by Rathinagiri »

Good research and nice findings. :)

Go ahead.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 2.9.3

Post by Roberto Lopez »

Vanguarda wrote:
Roberto Lopez wrote: Stay tuned... we will find the solution :)
Yeah! You find one solution master. I know. :)
You are amazing.

with best regards,
I've not forgot this issue.

I'm still researching and making tests...

I've not found yet a complete solution but to show you how difficult it can be, I post a paragraph from MSDN official docs about Windows API:

Code: Select all

Sending a DM_SETDEFID message to change the default button will not always remove the default state border from the first push button. 
Please note the 'not always' :)

The 'default button' thing is plagued with uncertainty about the exact behavior of 'default state' of buttons.

So... this will not be easy :)

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: HMG 2.9.3

Post by Vanguarda »

Roberto Lopez wrote: I've not forgot this issue.
Hi master,

At first, many thanks for explain it for us.
I know that it not be easy. I´m think about it and i know that, realy, not be easy.I would like help of someway.

Good work for you, and thank once again for your explain.

with best regards,

PS: Sorry my bad english
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 2.9.3

Post by Roberto Lopez »

Vanguarda wrote:
Roberto Lopez wrote: I've not forgot this issue.
Hi master,

At first, many thanks for explain it for us.
I know that it not be easy. I´m think about it and i know that, realy, not be easy.I would like help of someway.

Good work for you, and thank once again for your explain.

with best regards,

PS: Sorry my bad english
Well... I guess I've found the solution. Please test 2.9.4 that I've just uploaded.

TIA.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply