Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use a Measurement Studio class in MFC

I am new to MFC coming over from VB.NET.
I have created a VISA class to measure something from an instrument and have a simple dialog box with a Button to invoke the measurement and display it to a text box. I changed the ID of the control and made a member variable for the text box and can code the OnButtonClick event to display text in the Text box as a test.
The problem is I cannot seem to create an object of the Visa Class that I built in the OnBnClickedRun()function. I can code the OnInitDialog() to make this measurement:

double power;
CGetBandPower BPower;
BPower.Run(power);

but want to do it when I click on the button. I am using VS.NET 2003 with Measurement Studio 7.0.

Help
0 Kudos
Message 1 of 2
(3,063 Views)
Hello,

I think the following other discussion forum post contains useful information for you:

http://forums.ni.com/ni/board/message?board.id=232&message.id=1306&requireLogin=False

In particular, read the posts by the names in blue... you'll find paths to great examples which should help you use VISA in the .NET environment.

Repost if you continue to have any problems!

Thank you,

Best Regards,

JLS
Best,
JLS
Sixclear
0 Kudos
Message 2 of 2
(3,057 Views)