[Coco] Trouble with OS9 Windows in C

Todd Wallace dragonbytes at cox.net
Wed May 26 02:03:20 EDT 2010


Hey guys, 

I am trying to write an program for OS9 that uses two windows on 1 screen, the top for received data, and the bottom for input commands.  The problem is, I can only write text to the top window and not the bottom window, even though both are open to read/write data.  I was hoping someone on the list could tell me what I might be doing wrong.  Included below is the part of my code that does the setting up:

    /* Setup text windows */
        outWPath = open("/W1",3);
        inWndPath = open("/W2",3);

        DWSet(outWPath, 2, 0, 0, 80, 20, forColor, bgColor, bdColor);
        Select(outWPath);
        
        status = DWSet(inWndPath, 0, 0, 21, 80, 3, WHITE, BLUE, BLACK);

        Select(inWndPath);


The first part opens /w1 and /w2 as read/write.  In the DWSet the middle numbers are just dimensions of the 2 windows. The first number after the path creates the type of window. 2 means a 80x24 text mode screen. 0 in the second DWSet means to open a second window on the current Process's screen.  Everything works fine except the ability to write text to /W2.  Let me know if i'm not providing enough info.  I can send the full source and necessery libraries if anyone wants to try it for themselves and/or the pdf documents I have been using for reference.  Any help is appreciated.

- Todd Wallace


More information about the Coco mailing list