Thanks Mike.
Here is the seed of the graphics dll interface.
The window normally runs in its own thread, and does not block communications with the client.
O2 DLL side
function run(optional p) callback
=================================
MainWindow width,height,WS_OVERLAPPEDWINDOW
end function
extern export
function grun(optional m)
===============================
static sys th,da,id
select m
case 0 : run 'not in thread
case 1 : th=CreateThread1 null,0,@run,@da,0,0
case else : WaitForMultipleObjects 1,@th,1,-1
CloseHandle th
end select
end function
function iotxt(char*pc) as sys 'as char* in API header
==============================
sys a
sys i=1
string s=pc
static string w,v,r
w=getword s,i
'
'INTERPRET COMMAND
if w="title"
a=i+1
endline s,i
title=mid s,a,i-a
r=title
end if
actn++ 'refresh screen
'
'RETURN DATA
return strptr r
end function
end extern
O2 Client side
extern lib "t.dll"
! grun (mode)
! iotxt (char*pr) as char*
end extern
grun 1 'start thread
mbox iotxt "title 2D Graphics"
mbox iotxt "title 2D & 3D Graphics" 'change title
...
grun -1 'close thread
Graphics borrowed from projectsA/OpenglCns: --->
.