Instructions for I/O ActiveX Control in Visual C++

Visual C++ Example Download.

Create the App:

1) In Visual C++ 4.2 from the menu select: "File", "New".
2) Select "New Project", "MFC App", enter the name of the new application, Click on "Create".
3) Select "Next, "Next", "OLE Controls", "Next", "Next", "Next", "Finish".

In Visual C++ 5.0 and 6.0 Use default setting when creating your application.

Insert IO OCX Control:

  1. On a dialog template, Right click.
  2. Select "Insert ActiveX Control".
  3. Select "IO Control".
  4. Click "OK".
  1. Activate Class Wizard via Menu: "View", "Class Wizard".
  2. Click "Member variable" tab.
  3. Select IDC_IOCTRL1.
  4. Add Variable.
  5. Click "OK" to generate wrapper class.
  6. Click "OK" to accept class name.
  7. Enter name of new member variable "m_IO1".
  8. Click "OK".
  9. Click "OK" to dismiss class wizard.
Writing the code:

m_IO1.Open("COM2:", "baud=9600 parity=N data=8 stop=1");
m_IO1.WriteString("Data to write to the port.");

Home Page | Site Map | Copyright (c) 1998 by JSPayne of Cortland NY