EvntAdd( win, WM_REDRAW, WinRedraw, EV_BOT);
Then, WindClear() will be firstly called then WinRedraw() will
be called.
Windows have a default WM_DESTROY function (see WindCreate()) wich close, destroy the window and send an AP_TERM message if no more windows are in memory. A typical bind to WM_DESTROY is :
EvntAdd( NULL, WM_DETROY, WinDestroy, EV_TOP);
/* and the Destroy function : */
void WinDestroy( WINDOW *win) {
/* Free up data attached to window
but not destroy the window */
}