Ejemplo n.º 1
0
void WRSetEntries( HWND hdlg, WRSelectImageInfo *info )
{
    HWND                lbox;
    WResTypeNode        *tnode;
    char                *empty_str;

    if( info == NULL || info->info == NULL || hdlg == (HWND)NULL ) {
        return;
    }

    lbox = GetDlgItem( hdlg, IDM_SELIMGLBOX );
    if( lbox == (HWND)NULL ) {
        return;
    }
    SendMessage( lbox, LB_RESETCONTENT, 0, 0 );

    tnode = WRFindTypeNode( info->info->dir, info->type, NULL );
    if( tnode == NULL ) {
        empty_str = WRAllocRCString( WR_EMPTY );
        if( empty_str != NULL ) {
            WRSetLBoxWithStr( lbox, empty_str, NULL );
            WRFreeRCString( empty_str );
        }
        return;
    }

    WRSetResNamesFromTypeNode( lbox, tnode );
    SendMessage( lbox, LB_SETCURSEL, 0, 0 );
}
Ejemplo n.º 2
0
void WRDisplayErrorMsg( msg_id msg )
{
    char        *title;

    title = WRAllocRCString( WR_ERRMSG );

    if( !RCMessageBox( (HWND)NULL, msg, title, MB_ICONEXCLAMATION | MB_OK | MB_TASKMODAL ) ) {
        MessageBeep( (UINT)-1 );
    }

    if( title != NULL ) {
        WRFreeRCString( title );
    }
}