ULONG State = WinSendMsg (SysMenu_window, MM_ISITEMVALID,                            
                                          MPFROM2SHORT (
                                                         SC_CLOSE, 
                                                         INCLUDE_SUBMENUS
                                                       ), 
                                          0);
