I noticed the same thing when I tried to duplicate this. I think the problem
is that fast clicks on the button are interpreted as double clicks instead
of clicks, so that the OnClick handler does not always get called. Try using
the OnValueChanged message handler instead of OnClick. This seems to fix
it. Hope this helps.
Dave
"Henryk Mueller" wrote:
>Hello folks,>>Have some weird effects with Component Works controls under
VC++ 6.0:>>I've created a simple test dialog with a CWButton object (horizontal
slide>style) and two CWButton objects (round star LED style). Whenever I
switch>the slide position the other LED should light up. I've added an OnClick>message
handler:>>void CMyView::OnClickCwbuttonChannel()>{> BOOL bSlide=m_cCWButtonSlide.G
etValue();>>
m_cCWButtonLED1.SetValue(!bSlide);> m_cCWButtonLED2.SetValue(bSlide);> TRACE("Switched\n");>}>>Pretty
simple code and it works fine - as long as you switch the button not>too
fast! If you switch it fast then the message handler is not called for>every
click (checked by the TRACE output) and so the LEDs do not light up>properly!!!>>This
is not acceptable for my project and I'm not used to such strange>behavior
from VC++ controls?>>What am I doing wrong? How can I fix this "bug"?>>Any
help appreciated!>>Henryk>>