[futurebasic] A few questions about USR HANDLE2BTN

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2004 : Group Archive : Group : All Groups

From: Alain Wrobel <wrobel@...>
Date: Wed, 19 May 2004 10:13:28 +0200
		Bonjour,

	Why in the following example in the case of a mouse clic

1) over a button  USR HANDLE2BTN returns the number of the button 
(normal behaviour)
2) over nothing or over a static edit field USR HANDLE2BTN returns the 
number of the first non static edit field (7 in the example)
3) over a non static edit field USR HANDLE2BTN returns the number of 
the edit field (i.e. risk of confusion with the first case)
(are non static edit fields something like pseudo-buttons in the 
Appearance runtime ?)

subsidiary question : why the _statFramed edit fields are they not 
framed ?

		Merci,

			Alain W.



(FB^3 v7, CPU PPC, Basic Appearance)



window 1
dim rct as rect
dim hndleBouton as handle
dim ou as point
dim evenement
dim clicOu


setrect(rct,10,10,180,26)
button 10,_activeBtn,"bouton 10",@rct,_push
offsetrect(rct,0,40)
edit field 7,"champ 7",@rct,_framed
offsetrect(rct,0,40)
edit field 20,"champ 20",@rct,_framed
offsetrect(rct,0,40)
edit field 10,"champ 10",@rct,_framed
offsetrect(rct,0,40)
button 20,_activeBtn,"bouton 20",@rct,_push
offsetrect(rct,0,40)
edit field 50,"champ 50",@rct,_framed
offsetrect(rct,0,40)
button 50,_activeBtn,"bouton 50",@rct,_push
offsetrect(rct,190,0)
edit field 30,"",@rct,_statFramed
offsetrect(rct,0,40)
edit field 35,"",@rct,_statFramed
offsetrect(rct,0,40)
edit field 40,"",@rct,_statFramed
offsetrect(rct,0,40)
edit field 60,"press any key to stop",@rct,_statFramed

do
long if fn button
getmouse(ou)
evenement=fn findcontrol(ou,window(_wndPointer),hndleBouton)
clicOu=usr handle2btn(hndleBouton)
edit$(30)="bouton ou champ"+str$(clicOu)
edit$(35)="evenement"+str$(evenement)
edit$(40)="hndleBouton"+str$(hndleBouton)
end if
until len(inkey$)

_________________________________________________________________
A. Wrobel * GREGUM-UMR ESO, Université du Maine/CNRS *Tel:02-43-83-35-44
_________________________________________________________________