hi all,
if there is a Dialog, and a Button on that Dialog is activated, ik can detect that with the getdialogproperty activecontrol.
However, the result is a value such as 39900003
And that value differs each time. Gues Windows assign that value to the Button.
So now the question is: is there a way to translate that value back to the Button name?
Thanks,
kind regard,
Djek
possible to link an activecontrol on dialog to objectname ?
Moderators: JRL, Dorian (MJT support)
Not sure what you're wanting to accomplish. Something like this maybe?
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
ClientHeight = 100
ClientWidth = 400
object MSButton1: tMSButton
Left = 50
Top = 50
Width = 75
Height = 25
Caption = 'MSButton1'
end
object MSButton2: tMSButton
Left = 250
Top = 50
Width = 75
Height = 25
Caption = 'MSButton2'
end
end
EndDialog>Dialog1
AddDialogHandler>Dialog1,msButton1,OnEnter,Button(msButton1)
AddDialogHandler>Dialog1,msButton2,OnEnter,Button(msButton2)
Show>Dialog1,
SRT>Button
GetDialogProperty>Dialog1,,ActiveControl,res
MDL>%res% %button_var_1%
END>Button