Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.

MIDL
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.
Posted
Updated 26-Nov-10 17:09pm
v4
Comments
Lakamraju Raghuram 9-Feb-12 1:39am    
why on earth you want to double click a radio button
Bhavin Jagad 9-Feb-12 1:53am    
i have already mention in my question that i want to mimic a "OK" button click when radio button double clicked and on "OK" button click dialog get closed. there are many practical examples in application like MS Word where dialog get closed on Radio button double click.

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?
 
Share this answer
 
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!
 
Share this answer
 
This is not the way to use Radio Buttons, see the description here[^].
 
Share this answer
 
I drag and drop the radio button.

and than i change Notify property to true.

after that i got double click event as i think.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900