Silverfrost Forums

Welcome to our forums

How to EXIT the program

30 May 2008 11:54 #3286

In main program I made simple handle menu in OpenGl Window as:

.........................................
i=winio@('%es%sv%sp%ww[no_caption,no_sysmenu,no_border]%pv%^og[DOUBLE]%lw',xo1,yo1,xo2,yo2,opengl_proc,ctrl)
.........................................
i=glutCreateMenu (menu)
call glutAddMenuEntry ('MAKE BMP',1)
call glutAddMenuEntry ('EXIT',2)
Icall glutAttachMenu (GLUT_RIGHT_BUTTON)
.........................................

and in subroutine I've wroten:

integer function myexit ()
include <opengl.ins>
integer ctrl

write(*,*) 'I AM IN'

        call glutDestroyWindow(i)
        ctrl = 0
        call window_update@(ctrl)
        myexit = 0

write(*,*) 'I AM OUT'
end function myexit 

By pushing right button mouse th epossition in the menu 'EXIT' I would like to EXIT the program closing OpenGl window too. Bu it doesn't work ?

30 May 2008 12:35 #3288

See reply elsewhere.

30 May 2008 8:24 #3290

Thank you very much it works exelent.

Please login to reply.