bool WdeCleanup( WdeResInfo *res_info, bool fatal_exit ) { /* clean up before we exit */ if( WdeGetTestMode() ) { WdeHandleTestModeMenu( res_info ); } // must be done before FMEDIT is shutdown if( FMPasteValid() ) { FMResetClipboard(); } WdeSetOption( WdeOptIsCntlsTBarVisible, WdeControlsToolBarExists() ); if( WdeQueryKillApp( fatal_exit ) ) { WdeFreeResList(); } else { return( FALSE ); } WdeFiniHints(); WdeFreeAllCustLibs(); #ifndef __NT__ WdeFreeCustRESProcs(); #endif WdeShutdownToolBars(); WdeSetOption( WdeOptIsScreenMax, IsZoomed( hWinWdeMain ) ); WdeOptsShutdown(); WdeFreeControlIDs(); WdeSetAppMenuToRes( FALSE ); DestroyMenu( WdeResMenu ); DestroyMenu( WdeDDEMenu ); WdeFiniToolMenu(); WdeShutdownControls(); WdeDestroyRibbon(); WdeShutdownRibbon(); WdeFiniCreateTable(); WdeFiniOrderStuff(); /* get rid of all the child windows of the main application window */ WdeDestroyInfoWindow(); WdeInfoFini(); WdeDestroyStatusLine(); WdeFiniEditClass(); WdeFiniResStrings(); WdeFreeFontList(); WdeCtl3DFini( hInstWde ); WdeFreeFileFilter(); JDialogFini(); return( TRUE ); }
void WdeSetFileFilter( char *filter ) { WdeFreeFileFilter(); WdeFileFilter = WdeStrDup( filter ); }