Anyone know where I can find this sample program? It seems to be no longer attached to the MSDN article by Alan Deaver.
Many thanks.:confused:
Printable View
Anyone know where I can find this sample program? It seems to be no longer attached to the MSDN article by Alan Deaver.
Many thanks.:confused:
I have the copy but I can't remeber where I gpt it so I attached it to this post.
That was very quick.
Is much appreciated.
:)
i realize this is a very old thread, but what to use to compile this? I tried with vs2017 but there are too many errors. I have checked the paths and all is good. Any help would be great.
thanks
What kind of errors do you have?
What are you trying to achieve: just to compile a very old sample or to get a working code for serial communication? Or something else?
How are you compiling - using mttty.mak or from VS IDE Build/Build Solution?
Thanks for the quick response guys.
I wanted to use this program for serial communication because the cr and lf commands are working in the window, there are very few terminals that actually work like this. I would also like to implement the ansii esc sequences.
Because this terminal moves the window cursor in a specific way, it is better than most vb or other terminals out there.
I am compiling it with vs2017. the version i downloaded is from here:
https://github.com/bmo/mttty
the readme says that it will compile in vs2017.
i can post a screenshot of the errors if you need
Since you posted your question in the MFC forum I would recommend you some great articles with sample code using MFC:
Serial Port I/O
A set of C++ classes for Win32 serial ports
Please, not a screenshot! Just copy/paste a couple of complete error messages from Output window together with the lines that produce the errors.
Don't believe everything you read! Create a new project and open the .sln file. This will create the solution with the required .c/.h files etc. You then need to make changes to two of the source files
init.c
Add after the #include statements:
settings.cCode:#pragma comment(lib, "Comctl32")
#pragma comment(lib, "Winmm")
Add after the #include <stdio.h> statement:
This now compiles OK on my system (with a couple of warnings about duplicate dialog control ids) and the generated .exe file runs and shows the expected window etc.Code:#include <conio.h>