Hi John and Peter,
In Oxygen your callback Subs should have the callback attribute, otherwise it will corrupt some of the registers used by IUP causing Exceptions.
I think this will resolve the problem.
Note wndproc() always requires this attribute because it is also called from outside of Oxygen.
sub Btn2_clicked() callback
print "BUTTON 2 Event"
end sub
Charles