Tbutton:click() and button ID

Tbutton:click() and button ID

Postby Taavi » 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.
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Button ID with no. 1

Postby ukoenig » Wed Apr 02, 2008 1: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Button ID with no. 1

Postby Taavi » Wed Apr 02, 2008 3: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
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Predefined ID No. 1

Postby ukoenig » Wed Apr 02, 2008 4: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby Antonio Linares » Wed Apr 02, 2008 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 68 guests