CMSCommCtrl class
Michel NIALON -- nialon@besancon.ts.slb.com Tuesday, July 30, 1996 Environment: MSVC 4.0, Win 95 Does anybody have an example of how to use the CMSCommCtrl class provided with he MSCommCtrl OCX. My problem is with the parameter to use with the SetOutput function and I didn't manage to find information about it. Thanks in advance! Michel NIALON Software Engineer nialon@besancon.ts.slb.com
Mike Blaszczak -- mikeblas@msn.com Saturday, August 03, 1996 [Mini-digest: 2 responses] From: owner-mfc-l@netcom.com on behalf of Michel NIALON > Environment: MSVC 4.0, Win 95 > Does anybody have an example of how to use the CMSCommCtrl > class provided with he MSCommCtrl OCX. One of the guys in PSS scratched out some code. We cleaned it up and made it a sample. It's in the VC++ 4.2 box. .B ekiM http://www.nwlink.com/~mikeblas/ What's that ugly square thing in my mirror that says "ovloV" on it? -----From: Doug RobbOn Tue, 30 Jul 1996, Michel NIALON wrote: You are not alone Mike. Can anybody tell me why most (all) of the help seems to be for vb or something but is definately not written for mfc programmers? I find the ? icon after selecting an OLD control to be useless most of the time. I was thought it was just me. But to answer your question Mike. What I had to do was insert the control into my project and then look at the function prototypes in the .cpp files. >From this you can see what functions you can use and what the arguments and return types are. For you to write to the port you need to do something like this (assume m_port is the variable for the control) m_port.SetPortOpen(TRUE) ; // open the port etc COleVariant propval ; // this is the datatype needed propval = OLESTR("hello") ; m_port.SetOutput(propval) ; // spits hello out of port m_port.SetPortOpen(FALSE) ; // close if you want You set the baud etc of port using the ole control property sheets or you can do this dynamically , see the funtion prototypes for details. Now if all this is documented somewhere could someone please point us to it, the doco for the internet controls (http, ftp etc) would also be nice, but only the vb and visual foxpro are with the control pack! Email - doug@psy.uwa.edu.au ,-_|\ Doug Robb Phone - +61 9 380 2507 / \ Senior Analyst Programmer Fax - +61 9 386 7564 --> *_,-._/ Psychology Department v University of Western Australia >From U.S. 011-61-9-380-2507 (EST +12hrs) from U.S. 011-61-9-386-7564 Homepage: http://www.psy.uwa.edu.au/user/doug/doug.html =========================================================================
| Вернуться в корень Архива |