how to make 2 text window

This is a discussion on how to make 2 text window within the C Programming forums, part of the General Programming Boards category; I already know to make 1 simple text window... this is the code: #include "stdio.h" #include <conio.h> main (void) { ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    4

    Question how to make 2 text window

    I already know to make 1 simple text window... this is the code:

    #include "stdio.h"
    #include <conio.h>
    main (void)
    {
    int i;
    clrscr();
    window (10, 10, 80, 25);
    textcolor(BLUE);
    textbackground(WHITE);
    cprintf ("Hello WORLD\r\n");
    getch();
    return 0;
    }

    the question is: I want to make another window that has a different backgroun and text color.

    If u know a URL that explains well about this text window or related to this! please tell me... Thanks in advance.

    blueXrogue

  2. #2
    Unregistered
    Guest
    You just need to have the same code over again wiht out the clear screen command, like this:

    #include "stdio.h"
    #include <conio.h>
    main ()
    {
    int i;
    clrscr();

    //Window 1
    window (10, 10, 80, 25);
    textcolor(BLUE);
    textbackground(WHITE);
    cprintf ("Hello WORLD\r\n");

    //Window 2
    window (10, 10, 80, 25);
    textcolor(WHITE);
    textbackground(BLUE);
    cprintf ("Hello WORLD\r\n");
    getch();
    return 0;
    }

  3. #3
    Unregistered
    Guest
    oops, i forgot one thing, just make sure u change the window position so like it says 10,10, 85, 25 make the second one 20,20,85,25 or what ever you want it to be

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Window scrollbar
    By maxorator in forum Windows Programming
    Replies: 2
    Last Post: 10-07-2005, 01:31 PM
  2. My Window Class
    By Epo in forum Game Programming
    Replies: 2
    Last Post: 07-10-2005, 03:33 PM
  3. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 11:50 AM
  4. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 04:49 PM
  5. Grabbing Text from a Window
    By jimothygu in forum Windows Programming
    Replies: 4
    Last Post: 10-06-2003, 08:29 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21