From my main window a second window is opened to display the graphical output. Using the GET_WINDOW_LOCATION to determine the size results in WIDTH and HEIGHT being negative. Below is some test code.
Until now the application was a single window. Adding a main window to the application is new to me.
Question: 1.) Why is the result negative for the size? 2.) %hw gives strange numbers for the handle - is the correct?
Jacques
winapp
program enum
use mswin
implicit none
integer :: i,ctrl,ou
EXTERNAL :: cb_func
ctrl = -1
ou = 6
i=winio@('%ca[Child window size]&')
i=winio@('%sy[thin_border]&')
i=winio@('%bg[BTNFACE]&')
i=winio@('%ob[depressed]%40.20cw[vscroll]%cb&',0)
i=winio@('%lw%ff%nl&',ctrl)
i=winio@('%^bt[Show plot]',cb_func)
end program enum
integer function cb_func()
implicit none
INCLUDE 'clearwin.ins'
integer :: ou
integer*4 WIDTH, HEIGHT,X ,Y, handle
INTEGER*4 I,J
integer*4 isdepth,iswidth,ixcentre,iycentre
integer*4 ix(10000),iy(10000),colour
real*8 fac,xc,yc, xr, yr
!
! get graphics window dimensions
i = winio@('%ww&')
i = winio@('%sy[3d_depressed]&')
i = winio@('%ca[Slot mmf]&')
i = winio@('%gr&',800,600)
i = winio@('%hw',handle)
call GET_WINDOW_LOCATION@(handle,X,Y,WIDTH, HEIGHT)
write(*,*) handle,WIDTH, HEIGHT
cb_func = 1
return
end
[/URL]
[/URL]