/*When it is minimized or restored, all the windows in OpenWindows will also be minimized or restored. */ Def WM_SYSCOMMAND(self,wp,lp | choice) { WM_SYSCOMMAND(self:ancestor,wp,lp); /* last four bits are used internally by */ /* MS-Windows, so mask them to get */ /* the real value: */ choice := wp bitAnd 0xFFF0; select /* the minimizebox clicked, so iconize all windows in OpenWindows*/ case choice = 0xF020 do(OpenWindows,{using(win) show(win,2)}) endCase /*icon double-clicked or menu choice Restore is selected,*/ /*so restore all windows in OpenWindows */ case choice = 0xF120 do(OpenWindows,{using(win) show(win,1)}) endCase endSelect }