Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!dkuug!imada!micro From: micro@imada.ou.dk (Klaus Pedersen) Newsgroups: comp.sys.atari.st.tech Subject: How to use the VDI from the Autofolder Message-ID: <1991May24.184249.21414@imada.ou.dk> Date: 24 May 91 18:42:49 GMT Sender: news@imada.ou.dk (USENET News System) Organization: Dept. of Math. & Computer Science, Odense University, Denmark Lines: 79 Hi, When I tried to make the code that installed the Trap#2 handler I found that it was possible to use the vdi from the auto-folder, a thing that I thought was impossible! The trick is to open a physical screen work- station. Simple and clean... Here is some code you can try out: (it only works in the autofolder, 'cause it don't check if there already is one open! (aes's)) Klaus, micro@imada.ou.dk (please let me know if you care about these things - I hate to send things into a big void) -------- This was made using TurboC, but any compiler should do --------- ('int' is 16 bit) #include static int pointer[] = {0x0002, 0x0002, 0x0001, 0x0000, 0x0001, 0x7200, 0xAD00, 0xFE80, 0x6F78, 0xD808, 0x380C, 0x2002, 0x4001, 0x4001, 0x8000, 0x8008, 0x4009, 0x4011, 0x2002, 0x1004, 0x0C18, 0x0C00, 0x5200, 0x0100, 0x9080, 0x27F0, 0x07F0, 0x1FFC, 0x3FFE, 0x3FFE, 0x7FFF, 0x7FF7, 0x3FF6, 0x3FEE, 0x1FFC, 0x0FF8, 0x03E0}; static int work_in[] = {1,1,1,1,1,1,1,2,3,1,2}; /* fill pattern(black,checkboard), black full line */ int work_out[57]; main() {int mx, my, mk, d; int hchar, wchar, hbox, wbox, handle, phys_handle; int pxy[8]; work_in[0] = 1; v_opnwk(work_in,&phys_handle,work_out); work_in[0] = handle = phys_handle; v_opnvwk(work_in, &handle, work_out); vsc_form(handle, pointer); v_hide_c(handle); vswr_mode(handle, 1); vsf_perimeter(handle, 1); pxy[0] = 0; pxy[1] = 0; pxy[2] = work_out[0]; pxy[3] = work_out[1]; vr_recfl(handle, pxy); vsf_interior(handle,0); vst_point(handle,10,&hchar, &wchar, &wbox, &hbox); vst_alignment(handle,0,5,&d,&d); pxy[3] = hbox+2; v_bar(handle, pxy); v_gtext(handle,0,1," Desk File Edit "); vswr_mode(handle, 2); v_show_c(handle, 0); do { vq_mouse(handle, &mk, &mx, &my); if (mk == 1) { v_hide_c(handle); v_gtext(handle,mx,my,"test"); v_show_c(handle, 1); } } while (mk != 2); v_hide_c(handle); v_clsvwk(handle); v_clswk(phys_handle); return 0; }