If you put the statement: makeobj(objnum=genobj()); ahead of the statement: winopen("Hello"); instead of after it, your program will work as expected. Ivan Bach, ib at sgi.com Any opinions expressed above are mine, not SGI's.