#IDCMP
This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.
I tried the BTST, and it doesn't work. Whichever test comes first is
satisfied…
movea.l im_Class(a1),a2 ;a2 has address of Class
move.l (a2),d1 ;d1 contains IDCMP message bits
btst.l #9,d1 ;CLOSEWINDOW = 0x00000200
beq exitclean ;z=1 if bit is set
btst.l #6,d1 ;GADGETDOWN = 0x00000040
beq do_gadget
..This code goes to exitclean when gadget is selected. —Mike