Mark,
If you set the Value property of the control in your program, it changes as
if the user had clicked it. For example:
m_button.Value = !m_button.Value;
toggles a CNiButton control. This is standard behavior for ActiveX controls.
The MeasurementStudio ActiveX controls have DataSocket binding, which you
might consider using instead. If you publish the data using DataSocket
instead of your socket server, you can configure the control such that its
Value property is automatically bound to the DataSocket data source.
David Rohacek
National Instruments
"Mark Greenman" wrote in message
news:3a07201d@newsgroups.ni.com...
> My apologies in advance if this is not a pertinent place for this
question,
> as I suspect it is as much an Active X contr
ol basics question as a CW++
> question.
>
> I am using Measurement Studio 1.0, the CW++ (Tools for C++) portion along
> with MS Visual Studio 6. I have an MFC application that has several
> modeless dialogs containing CW++ user interface controls. The application
> also establishes a sockets-based server. Some of the messages received
> through the sockets interface are intended to have the same action as a
user
> manipulating one or more of the CW++ user interface controls. For
example,
> I have a CNiButton based control for a camera shutter on one of the
dialogs
> with two states, Open and Closed. One of the messages receivable on the
> socket interface is to Open or Close the shutter.
>
> Is there a method to send a message to the CW++ control that simulates the
> mouse clicking the button to the Open or Closed state? This is my desire,
> as then the actual control of the shutter device and state of the
CNiButton
> are always in synch and linked.
>
> I have similar needs with
other CW++ user interface controls.
>
> TIA,
> Mark Greenman
> Space Dynamics Laboratory
> Utah State University
> Logan, UT
>
> markg@sdl.usu.edu
>
>
>