Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » How do I 'check' a Switch control
Re: How do I 'check' a Switch control [message #36218 is a reply to message #36217] Sat, 12 May 2012 20:14 Go to previous messageGo to previous message
awksed is currently offline  awksed
Messages: 70
Registered: April 2012
Member
Hi jerson,

Thanks for your reply. It was most helpful in getting to the answer.

I guess I am not using the Switch class in the way the framework authors intended (too many years with MFC I guess and I'm too lazy to learn how to position two 'Radio Buttons' of a Switch group in widely differing places in a tab control, so I'm using two separate Switch controls connected by code).

The control is a single 'Radio Button', i.e. not part of a group therefore assigning 1 doesnt work, however assigning 0 does 'check' it (put the dot in the circle) and mySwitchObject <<= Null; 'unchecks' it.

int s = mySwitchObject; returns 0 if 'checked', i.e. got a dot in the circle, and -2147483648 (0x80000000) if not 'checked', i.e. no dot in the circle. So I have an odd looking but effective way of achieving what I want to do.

Regards,

Jan

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: time measurement :: RTIMING, TimeStop, GetTickCount
Next Topic: Storing VectorMap
Goto Forum:
  


Current Time: Fri Jul 18 03:28:18 CEST 2025

Total time taken to generate the page: 0.04375 seconds