dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10

Thread: MTTTY Sample Program

  1. #1
    Join Date
    Jun 2003
    Posts
    2

    MTTTY Sample Program

    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.

  2. #2
    Join Date
    Apr 2003
    Posts
    1,755

    Smile

    I have the copy but I can't remeber where I gpt it so I attached it to this post.
    Attached Files Attached Files

  3. #3
    Join Date
    Jun 2003
    Posts
    2

    Thumbs up

    That was very quick.
    Is much appreciated.

  4. #4
    Join Date
    Dec 2012
    Posts
    1

    Re: MTTTY Sample Program

    Quote Originally Posted by rxbagain View Post
    I have the copy but I can't remeber where I gpt it so I attached it to this post.
    thank you

  5. #5
    Join Date
    May 2019
    Posts
    2

    Re: MTTTY Sample Program

    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

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,378

    Re: MTTTY Sample Program

    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?
    Victor Nijegorodov

  7. #7
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,689

    Re: MTTTY Sample Program

    How are you compiling - using mttty.mak or from VS IDE Build/Build Solution?
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.1.3)

  8. #8
    Join Date
    May 2019
    Posts
    2

    Re: MTTTY Sample Program

    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

  9. #9
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,378

    Re: MTTTY Sample Program

    Quote Originally Posted by ckeays View Post
    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.
    ....
    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

    Quote Originally Posted by ckeays View Post

    i can post a screenshot of the errors if you need
    Please, not a screenshot! Just copy/paste a couple of complete error messages from Output window together with the lines that produce the errors.
    Victor Nijegorodov

  10. #10
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,689

    Re: MTTTY Sample Program

    Quote Originally Posted by ckeays View Post
    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.
    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:

    Code:
    #pragma comment(lib, "Comctl32")
    #pragma comment(lib, "Winmm")
    settings.c

    Add after the #include <stdio.h> statement:

    Code:
    #include <conio.h>
    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.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.1.3)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)