Know if a window has been rolled up
Does anyone know how to determine whether a window has been rolled up by WindowShade (or the OS8 equivalent)?
What I would like ideally is a function:-
LOCAL FN isWindRolledUp (wndID)
'clever code goes here
END FN = rolledUp
Sure. WindowShade leaves the port rect and clip region alone, but it empties the content region. So just check for
and a code snippet that could be used, for example, before checking to change cursors in your window would be:
FN EMPTYRGN([windowPtr + _contRgn])that's all you need.
Works on OS8 and WindowShade both.
LONG IF( 0 =FN EMPTYRGN( [windowPtr& +_contRgn])
' do it - window visible