September 5th, 1999, 08:41 PM
Hello Gurus:
Appreciate your help on Microsoft Comm Control - ActiveX 6.0. Example given is:
-----------------------------
Private Sub Form_KeyPress (KeyAscii As Integer)
Dim Buffer as Variant
' Set and open port
MSComm1.CommPort = 1
MSComm1.PortOpen = True
Buffer = Chr$(KeyAscii)
MSComm1.Output = Buffer
End Sub
---------------------------
I understand that this is Visual Basic and have "Translated" all of it into what I need in Visual C++ except the last line in the above example. What is the C++ equivalent to "Dim buffer as Variant"? What argument do I need on SetOutput() to make the control work? (I am sending an ASCII string out a serial port)
Thanks!
Appreciate your help on Microsoft Comm Control - ActiveX 6.0. Example given is:
-----------------------------
Private Sub Form_KeyPress (KeyAscii As Integer)
Dim Buffer as Variant
' Set and open port
MSComm1.CommPort = 1
MSComm1.PortOpen = True
Buffer = Chr$(KeyAscii)
MSComm1.Output = Buffer
End Sub
---------------------------
I understand that this is Visual Basic and have "Translated" all of it into what I need in Visual C++ except the last line in the above example. What is the C++ equivalent to "Dim buffer as Variant"? What argument do I need on SetOutput() to make the control work? (I am sending an ASCII string out a serial port)
Thanks!