FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Tbutton:click() and button ID
Posts: 97
Joined: Mon Nov 21, 2005 10:29 AM
Tbutton:click() and button ID
Posted: Wed Apr 02, 2008 12:06 PM

Hello,
got a strange problem here with latest FWH (maybe all 32-bit) builds.

Seems like when creating button (tbutton) from resource with ID 1 it behaves like button having Default push button style. i.e. FWH generates tbutton:click() message when ENTER is pressed in dialog (also, when some other button is click-ed on some child dialog)

Call stack for this click looks like this:

....TBUTTON:CLICK0 TBUTTON:HANDLEEVENT0 _FWH0 WINRUN0 TMDIFRAME:ACTIVATE0 ...

Just changing button ID in resource file (from 1 to 1000 for example) seems to fix this problem but we have a lot of dialogs to fix...

Does this make any sense? Is resource ID 1 somehow different from ID 1000 for FWH event generation system? And can we disable this click()?
Nobody is clicking on this button at that time...

Taavi.

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Button ID with no. 1
Posted: Wed Apr 02, 2008 01:52 PM

Hello,

With ID no 1 it is true.
As a sample, you use it for the exit-button, a return
inside of a get field will jump to this button.
You have to use a different ID-No, not 1.

To change it, just open the resource ( RC ) with a text-editor
and replace ID No. 1 with a different number.

Regards

Uwe

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 97
Joined: Mon Nov 21, 2005 10:29 AM
Re: Button ID with no. 1
Posted: Wed Apr 02, 2008 03:57 PM
Hello,
strange, this behavior did'nt show up with 16-bit FW: we use the same dialogs also in 16-bit with no problems. Maybe because we had to modify FW classes to get what we need at the beginning times of FW.

Is the ID "1" the only ID with predefined purpose? I never actually cared about the ID values I used in RC files...


Thanks
Taavi.



ukoenig wrote:Hello,

With ID no 1 it is true.
As a sample, you use it for the exit-button, a return
inside of a get field will jump to this button.
You have to use a different ID-No, not 1.

Uwe
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Predefined ID No. 1
Posted: Wed Apr 02, 2008 04:30 PM

Hello,

It is just ID - No. 1

Regards

Uwe

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Tbutton:click() and button ID
Posted: Wed Apr 02, 2008 05:21 PM

Taavi,

> Is the ID "1" the only ID with predefined purpose?

1 is equivalent for IDOK and 2 for IDCANCEL.

You have to change those values if you don't want to use those predefined behaviors.

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion