示例#1
0
WREAccelSession *WREStartAccelSession( WRECurrentResInfo *curr )
{
    WREAccelSession *session;

    if( curr == NULL ) {
        return( NULL );
    }

    session = WREAllocAccelSession();
    if( session == NULL ) {
        return( NULL );
    }

    session->info = WAccAllocAccelInfo();
    if( session->info == NULL ) {
        return( NULL );
    }

    session->info->parent = WREGetMainWindowHandle();
    session->info->inst = WREGetAppInstance();
    session->info->file_name = WREStrDup( WREGetQueryName( curr->info ) );
    session->info->res_name = WRECopyWResID( &curr->res->Info.ResName );
    session->info->lang = curr->lang->Info.lang;
    session->info->MemFlags = curr->lang->Info.MemoryFlags;
    session->info->data_size = curr->lang->Info.Length;
    session->info->data = curr->lang->data;
    session->info->is32bit = curr->info->is32bit;

    session->info->stand_alone = WRENoInterface;
    session->info->symbol_table = curr->info->symbol_table;
    session->info->symbol_file = curr->info->symbol_file;

    session->tnode = curr->type;
    session->rnode = curr->res;
    session->lnode = curr->lang;
    session->rinfo = curr->info;

    session->hndl = WAccelStartEdit( session->info );

    if( session->hndl ) {
        WREInsertObject( &WREAccSessions, session );
    } else {
        WAccFreeAccelInfo( session->info );
        WRMemFree( session );
        session = NULL;
    }

    return( session );
}
示例#2
0
void WREAddToolBar( WREToolBar *tbar )
{
    WREInsertObject( &WREToolBarList, (void *)tbar );
}