Here is peter Text():
Sub Text( sys x, y, string txt, sys r,g,b)
color = r + g*256 + b*65536
SetTextColor bHdc, color
TextOut bHdc,x,y,txt,Len(txt)
End Sub
And here is mine TextOn():
Sub TextOn( int wnd,sys x, y, string txt, sys r,g,b)
'sys_hdc=GetDC(wnd)
'bHnd = CreateCompatibleBitmap(sys_hdc,128,24)
'bHdc = CreateCompatibleDC(sys_hdc)
'SelectObject bHdc, bHnd
SetBkMode tHdc,1
color = r + g*256 + b*65536
SetTextColor bHdc, color
TextOut bHdc,x,y,txt,Len(txt)
ReleaseDC(bhdc)
End Sub
It looks that work...hmmm
is this right way to properly add permanent text to window.
I test this function on example Sunflower:
include "win64.inc"
sys win
win=Window "SUN FLOWER",640,480,2
'TextOn(win,0,0,"PrintMe",200,0,0)
single r0=7.21,r1=2.11,r2=1.55,fc=30,st=.005,i
single inic=0,fi=80,pi=3.141592,x2,y2,a0,a1,x1,y1
x0 = 8*fc
y0 = 8*fc
ClsColor 200,200,248
For i=inic to fi step st
a0=(i/r0)*(2*pi)
a1=((i/r1)*(2*pi))*-1
x1=x0+(sin(a0)*((r0-r1)*fc))
y1=y0+(cos(a0)*((r0-r1)*fc))
x2=x1+(sin(a1)*((r2)*fc))
y2=y1+(cos(a1)*((r2)*fc))
Poke x2+80,y2-12,0,0,0
Next
TextOn(win,0,0,"PrintMe",200,0,0)
Oval 210,120,220,220,255,255,0
Pause
WinEnd
How work for you ?