Page 4 of 4
Re: HMG 2.9.3
Posted: Wed Aug 05, 2009 2:29 am
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,
Re: HMG 2.9.3
Posted: Wed Aug 05, 2009 2:38 am
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.
Re: HMG 2.9.3
Posted: Wed Aug 05, 2009 2:44 am
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.
Re: HMG 2.9.3
Posted: Wed Aug 05, 2009 2:53 am
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,
Re: HMG 2.9.3
Posted: Wed Aug 05, 2009 3:15 am
by Rathinagiri
Good research and nice findings.
Go ahead.
Re: HMG 2.9.3
Posted: Thu Aug 13, 2009 2:08 am
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.
Re: HMG 2.9.3
Posted: Thu Aug 13, 2009 2:23 am
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
Re: HMG 2.9.3
Posted: Thu Aug 13, 2009 3:01 am
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.