You can use the CNiFile class to write the value out to a file. For example, create a new Measurement Studio C++ project and follow these steps:
- Add a CNiNumEdit to the dialog.
- Add a member variable for the CNiNumEdit called m_numEdit.
- Add a button to the dialog.
- Double-click the button to add a message handler for the button's BN_CLICKED message.
- Add the following code to the button's BN_CLICKED message handler:
CNiFile file("C:\\Values.log", CFile::modeCreate | CFile::modeWrite | CFile::typeText);
file << m_numEdit.Value << endl;
file.Close();
- Run the application, edit the CNiNumEdit's value, and click the button. The value should be written to the Values.log
file as specified in the code above.
Hope this helps.
- Elton