NullLogic

...

dl.load("wingdi"); print("win.gdi.window = ",typeof(win.gdi.window),"\r\n"); try { local window=new win.gdi.window(); window.title="Test Window"; window.width=640; window.height=480; if (window.create()!=true) { print("fail\r\n"); exit; } rect=window.getsize(); print(serialize(rect)); window.setfont(); // window.setpen((255<<16)+(0<<8)+0); // window.setpen((255*16384)+(0*256)+0); // window.setpen((255*65536)+(0*256)+0); // red // window.setpen((0*65536)+(255*256)+0); // green window.setpen((0*65536)+(0*256)+255); // blue window.setbrush(); for (i=0;;i++) { rect=window.getsize(); window.fillrect(rect.left, rect.right, rect.top, rect.bottom); // print("window.mouse = "+typeof(window.mouse)+"\r\n"); // window.print(0, 0, "window.mouse = "+typeof(window.mouse)+""); window.print(0, 0, "rect = "+serialize(rect)+""); if (typeof(window.mouse)=='table') { window.drawline(rect.left, rect.top, window.mouse.x, window.mouse.y); window.drawline(rect.right, rect.top, window.mouse.x, window.mouse.y);//print("drew line\r\n"); window.drawline(rect.left, rect.bottom, window.mouse.x, window.mouse.y); window.drawline(rect.right, rect.bottom, window.mouse.x, window.mouse.y);//print("drew line\r\n"); } else { window.drawline(rect.left, rect.top, rect.right, rect.bottom); window.drawline(rect.right, rect.top, rect.left, rect.bottom);//print("drew line\r\n"); } window.setpen((i%255*65536)+(i%255*256)+i%255); // blue // window.print(0, 0, "this is a test");//print("printed\r\n"); window.update(); // print(i," ",(i/runtime()),"\r\n"); io.flush(); } } catch (e) { print("\r\n[",e.description,"]\r\n"); } finally { window.destroy(); win.Beep(440, 100); delete window; } if (typeof(io.gets)=='function'&&string.sub(_ostype_, 0, 7)=="Windows") { print("\ndone - press enter\n"); io.gets(); }