有没有办法让单选按钮双击? [英] Is there any way to get Radio button double click?

查看:116
本文介绍了有没有办法让单选按钮双击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我要处理单选按钮双击..


我在Pretranslate中通过检查控件ID做到了这一点.

然后,我尝试了包含单选按钮属性的方法,但在这种情况下我没有任何结果.

hello,


i want to handle radio button double click..


i did this in Pretranslate by checking id of control.

then, i tried for the method which is included throw Radio button Property but i can''t get any result in this case.

void CdemoDlg::OnBnDoubleclickedRadio2()
{
    MessageBox("DBCLICK");
    // TODO: Add your control notification handler code here
}



这没用..
实际上我想在用户双击单选按钮时模仿确定"按钮.
我想知道缺少了什么??




this didn''t work..
Actually i want to mimic ''OK'' button when user double click radio button.
i want to know what is missing???


thanks.

推荐答案

我不确定单选按钮是否具有双击事件-甚至应该.我当然从未见过任何使用过的用户界面.
那将是一件不寻常的事情:用户不习惯双击单选按钮(除了标准按钮以外),因此您的应用程序可能难以使用或烦人.

您为什么特别想要这样做?也许有更好的方法吗?
I''m not sure a radio button has a double click event - or even that it should. I''ve certainly never seen any UI that used one.
That would be a unusual thing to do: users are not used to double clicking radio buttons (any more than standard buttons) so your app could be difficult or annoying to use.

Why do you specifically want to do this? Perhaps there is a better way?


您可以通过制作自定义单选按钮很容易地模仿自己,或者仅以一种单一形式实现它,就可以像下面的代码一样使用此功能.

在表单中定义一些变量,并在加载时为其提供默认值.
You can mimic this quite easily yourself by making a custom radiobutton, or just implement it for that single form you'' re using this functionality like the code below.

Define some variable in your form and give it a default value on load.
__int64  radioClickTime =  (__int64)GetTickCount(); 


void CdemoDlg::OnClickedRadio2()
{
   __int64  tempRadioClickTime =  (__int64)GetTickCount();

   if((tempRadioClickTime - radioClickTime) < 300) 
   { 
     /* double clicked */
   }

   radioClickTime = tempRadioClickTime
}



祝你好运!



Good luck!


这不是使用单选按钮的方法,请参见说明 ^ ].
This is not the way to use Radio Buttons, see the description here[^].


这篇关于有没有办法让单选按钮双击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆