Hi all,
I have 3 buttons attached with the same dialog link.
This dialog have the SetUp function
int SetUp( PtWidget_t *link_instance, ApInfo_t *apinfo,
PtCallbackInfo_t *cbinfo )
When I push the one of three buttons, this function will be called.
Question: Inside this function, how can I know it has been caled
by which buttons ?
If we can not get the source button, do you have any suggestion to
resolve
this implemantation ?
Thanks,
Trong
E-mail: tnguyen@aquilamsl.com
Hello,
What you can do is test the apinfo->widget. This structure has the info you need to find what button was pressed.
In your set-up function you can have something like the following.
If( apinfo->widget == ABW_button1)
{
/* Do what you want here /
}
else if (apinfo ->widget == ABW_button2)
{
/ Do what you want here /
}
else if (apinfo ->widget == ABW_button3)
{
/ Do what you want here */
}
Hope this helps.
Regards,
Dave B.
Trong Truong Nguyen <tnguyen@aquilamsl.com> wrote:
Hi all,
I have 3 buttons attached with the same dialog link.
This dialog have the SetUp function
int SetUp( PtWidget_t *link_instance, ApInfo_t *apinfo,
PtCallbackInfo_t *cbinfo )
When I push the one of three buttons, this function will be called.
Question: Inside this function, how can I know it has been caled
by which buttons ?
If we can not get the source button, do you have any suggestion to
resolve
this implemantation ?
Thanks,
Trong
E-mail: > tnguyen@aquilamsl.com