The "Measurement" argument of the OnAcquiredDataCWCounter event handler is a pointer to a VARIANT. To access the contents of a VARIANT and place it in a Microsoft Edit Box you can do something similar to the following inside of the event handler:
void CDAQSTCBufferedDlg::OnAcquiredDataCwcounter1(VARIANT FAR* Measurement, BOOL Overflow)
{
CString mstr;
mstr.Format ("%lf", Measurement->dblVal);
m_edit.SetWindowText (mstr);
}
I have attached a simple project that illustrates basically the same concept. It has a CWSlide control and an MS Edit Box on the dialog. When the CWSlide's pointer changes position, I update the Edit Box with the new value of the pointer's position. (Make sure to rebuild the entire project to execute it).
To unders
tand more about the CString MFC class and the VARIANT structure go to http://msdn.microsoft.com
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask