Silverfrost Forums

Welcome to our forums

api functions don't work

2 Sep 2010 4:43 #6882

Paul, why don't work the api functions, i need the arc function, what is wrong?

The clearwin polyline function works fine. I want to choose a printer at every start.

Thank you

[/code]

winapp 0,0
  program prtest
include<windows.ins>
  
  integer*4 width,height,xi(2),yi(2),n,m
integer*4 kp,jp,icol
integer*4 hnd1
  logical*4 done

data hnd1/1/
data kp,jp/0,0/

kp=open_printer@(hnd1)			
jp=select_graphics_object@(hnd1)
call GET_GRAPHICAL_RESOLUTION@( WIDTH, HEIGHT )    
icol = rgb@(255,0,0)
  
xi(1) = 500
yi(1) = 500
xi(2) = 2000		 
yi(2) = 2000		 
n = 2
call draw_polyline@(xi,yi,n,icol)				! clearwin

! m = moveto(hnd1,1000,2000) ! api don't work ! done = lineto(hnd1,1000,2000) ! api don't work done = arc(hnd1,100,100,500,500,300,100,300,500) ! api don't work done = ellipse(hnd1,100,100,500,500) ! api don't work

kp=close_printer@(hnd1) 
stop
end
2 Sep 2010 8:01 #6884

The first argument of MoveTo etc is a handle to the relevant device context. clearwin_info@('GRAPHICS_HDC') should provide this value.

3 Sep 2010 6:10 #6891

Thank you very much for the solution and the excellent forum, it works fine.

Bartl

Please login to reply.