Esempio n. 1
0
void WFini( void )
{
    HINSTANCE inst;

    inst = WGetEditInstance();

    WFiniStatusLines();
    WOptsShutdown();
    WShutdownRibbons();
    WShutdownToolBars();
    WFiniEditWindows();
    WCtl3DFini( inst );
    UnregisterClass( WMainClass, inst );
    WUnRegisterPrevClass( inst );

    if( InsertBefore != (HBITMAP)NULL ) {
        DeleteObject( InsertBefore );
        InsertBefore = (HBITMAP)NULL;
    }
    if( InsertAfter != (HBITMAP)NULL ) {
        DeleteObject( InsertAfter );
        InsertAfter = (HBITMAP)NULL;
    }
    if( InsertSub != (HBITMAP)NULL ) {
        DeleteObject( InsertSub );
        InsertSub = (HBITMAP)NULL;
    }
    if( InsertNoSub != (HBITMAP)NULL ) {
        DeleteObject( InsertNoSub );
        InsertNoSub = (HBITMAP)NULL;
    }
    JDialogFini();
}
Esempio n. 2
0
Bool WRECleanup( Bool fatal_exit )
{
    /* clean up before we exit */
    if( !WREEndAllStringSessions( fatal_exit ) ||
            !WREEndAllMenuSessions( fatal_exit ) ||
            !WREEndAllAccelSessions( fatal_exit ) ||
            !WREEndAllImageSessions( fatal_exit ) ||
            !WREEndAllDialogSessions( fatal_exit ) ) {
        return( FALSE );
    }

    if( fatal_exit || WREQueryKillApp( FALSE ) ) {
        WREFreeResList();
    } else {
        return( FALSE );
    }

    WRESetOption( WREOptScreenMax, IsZoomed( WREMainWin ) );

    WREFiniHints();
    WREOptsShutdown();
    WREDestroyRibbon();
    WREDestroyStatusLine();
    WREShutdownRibbon();
    WREFiniTypeNames();
    WREFiniTotalText();
    WREFiniResources();
    WREShutdownToolBars();
    WREFiniClipboard();
    WRECtl3DFini( WREInst );
    WREFreeFileFilter();
    JDialogFini();

    return( TRUE );
}
Esempio n. 3
0
/*
 * WinMain - entry point for the application
 */
int PASCAL WinMain( HINSTANCE currinst, HINSTANCE previnst, LPSTR cmdline, int cmdshow )
{
    MSG         msg;

    cmdline = cmdline;
    Instance = currinst;
    SetInstance( Instance );

    if( !InitGblStrings() ) {
        MessageBox( NULL, "Unable to find string resources", AppName, MB_OK );
        return( 0 );
    }
    if( previnst == NULL ) {
        if( !firstInstInit() ) {
            return( 0 );
        }
    }
    if( !everyInstInit( cmdshow ) ) {
        return( 0 );
    }

    while( GetMessage( &msg, NULL, 0, 0 ) ) {
        TranslateMessage( &msg );
        DispatchMessage( &msg );
    }
    DdeUninitialize( DDEInstId );
    JDialogFini();
#ifndef NOUSE3D
    CvrCtl3dUnregister( Instance );
    CvrCtl3DFini( Instance );
#endif
    return( 1 );

} /* WinMain */
Esempio n. 4
0
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 );
}
Esempio n. 5
0
/*
 * SpyFini - cleanup at end
 */
void SpyFini( void )
{
#ifndef NOUSE3D
    CvrCtl3dUnregister( Instance );
    CvrCtl3DFini( Instance );
#endif
    ClearFilter();
    SpyLogClose();
    SaveSpyConfig( NULL );
    JDialogFini();

} /* SpyFini */
Esempio n. 6
0
void WFini( void )
{
    HINSTANCE inst;

    inst = WGetEditInstance();

    WFiniStatusLines();
    WOptsShutdown();
    WShutdownRibbons();
    WShutdownToolBars();
    WFiniEditWindows();
    WCtl3DFini( inst );
    UnregisterClass( WMainClass, inst );
    JDialogFini();
}