Exemplo n.º 1
0
Bool WdeSetCurrentCustControl( int which )
{
    int       ret;
    HINSTANCE inst;
    FARPROC   proc;

    if( WdeCustomLibList == NULL ) {
        WdeSetStatusByID( -1, WDE_NOCUSTLOADED );
        return( TRUE );
    }

    if( !WDE_CHECK_WHICH( which ) ) {
        WdeWriteTrail( "WdeSetCurrentCustControl: bad which!" );
        return( FALSE );
    }

    inst = WdeGetAppInstance();
    proc = MakeProcInstance( (FARPROC)WdeSelectCustProc, inst );
    if( proc == NULL ) {
        WdeWriteTrail( "WdeSetCurrentCustomControl: MakeProcInstance failed!" );
        return( FALSE );
    }
    ret = JDialogBoxParam( inst, "WdeSelectCustom", WdeGetMainWindowHandle(),
                           (DLGPROC)proc, (LPARAM)(LPVOID)&which );
    FreeProcInstance( proc );

    /* if the window could not be created return FALSE */
    if( ret == -1 ) {
        WdeWriteTrail( "WdeSetCurrentCustomControl: Could not create selection window!" );
        return( FALSE );
    }

    return( TRUE );
}
Exemplo n.º 2
0
Bool WdeIsCurrentCustControlSet( int which )
{
    if( WDE_CHECK_WHICH(which) ) {
        if( WdeCurrControl[which].control != NULL ) {
            return( TRUE );
        }
    }
    return( FALSE );
}
Exemplo n.º 3
0
void WdeGetCurrentCustControl( int which, WdeCustControl **control, UINT *type )
{
    if( !WDE_CHECK_WHICH( which ) ) {
        WdeWriteTrail( "WdeGetCurrentCustControl: bad which!" );
        return;
    }
    *control = WdeCurrControl[which].control;
    *type = WdeCurrControl[which].type;
}
Exemplo n.º 4
0
void WdeGetCurrentCustControl( int which, WdeCustLib **lib, UINT *index )
{
    if( !WDE_CHECK_WHICH( which ) ) {
        WdeWriteTrail( "WdeGetCurrentCustControl: bad which!" );
        return;
    }
    *lib = WdeCurrControl[which].lib;
    *index = WdeCurrControl[which].index;
}