Thread: Text based frames in win32 console

  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    2

    Wink Text based frames in win32 console

    Hello Guys ,

    i want to split the win32 console window in two pieces like in this drawing:
    Code:
    -----------------------------------------------------
    | You have enter the following text : help          | <-text output-"frame"
    |                                                   |
    |                                                   |
    |                                                   |
    -----------------------------------------------------
    |>help                                              | <-text input-"frame"
    |                                                   |
    -----------------------------------------------------
    The moreover the two frames are to update themselves after each input automatically.

    I know that it for UNIX the header file ncurses.h gives, with that these and other functions function.

    I would know gladly from you like I this problem in Windows solve?

    I program my project in C. As development environment I use the Dev C++ compiler.

    Thank you in advance for everyone type .

    Bye
    Ragger
    Last edited by Ragger; 06-18-2004 at 11:36 AM.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    This tutorial should help.

    gg

  3. #3
    Registered User
    Join Date
    Jun 2004
    Posts
    2
    Thanks, Codeplug .

  4. #4
    Quote Originally Posted by Codeplug
    This tutorial should help.
    Let's have a look. First example :
    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
        cout << "Hello World!" << endl;
        return 0;
    }
    Sounds to be anything but C. I'm not sure it will be helpful...
    Emmanuel Delahaye

    "C is a sharp tool"

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >I'm not sure it will be helpful...
    You didn't read far enough. While the examples may be in C++, the techniques for handling simple Windows consoles still apply. The Win32 API is usable with C.
    My best code is written with the delete key.

  6. #6
    Quote Originally Posted by Prelude
    >I'm not sure it will be helpful...
    You didn't read far enough. While the examples may be in C++, the techniques for handling simple Windows consoles still apply. The Win32 API is usable with C.
    You are making the assumption that the original poster can read C++. I won't bet on it.
    Emmanuel Delahaye

    "C is a sharp tool"

  7. #7
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >You are making the assumption that the original poster can read C++. I won't bet on it.
    On the relevant page, there are only 3 lines that would cause a problem for someone who has never seen C++ before (5 if you consider the headers and using directive):
    Code:
    cout.width(3);
    cout << i << " " << (unsigned char)i << flush;
    And:
    Code:
    cout << What << flush;
    Everything else is straightforward enough to figure out, like bool. And for anything that isn't straightforward, we conveniently have a C++ forum and quite a few members on the C forum that are familar enough with C++ to explain the necessary conversions.

    Believe it or not, we don't spoonfeed people here. Sometimes they actually have to work to interpret the answers given to them.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Console app: Making pretty text blocks
    By unit335 in forum C++ Programming
    Replies: 6
    Last Post: 05-31-2009, 07:22 PM
  2. How to use FTP?
    By maxorator in forum C++ Programming
    Replies: 8
    Last Post: 11-04-2005, 03:17 PM
  3. Choosing a variable based on user text input.
    By Compiling... in forum C++ Programming
    Replies: 7
    Last Post: 11-01-2005, 01:21 AM
  4. Scrolling text in a DOS CONSOLE box
    By Blizzarddog in forum C++ Programming
    Replies: 4
    Last Post: 04-06-2004, 02:27 PM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 07:35 PM