コード例 #1
0
ファイル: uiautostart.c プロジェクト: carriercomm/VICE-Core
static void init_autostart_dialog(HWND hwnd)
{
    HWND temp_hwnd;
    int res_value;
    const char *autostartfile;
    TCHAR *st_autostartfile;
    int xsize, ysize;
    int xsize2;
    RECT rect;

    uilib_localize_dialog(hwnd, autostart_dialog);
    uilib_get_group_extent(hwnd, autostart_leftgroup1, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, autostart_leftgroup1);
    uilib_move_and_adjust_group_width(hwnd, autostart_rightgroup1, xsize + 30);
    uilib_get_group_extent(hwnd, autostart_leftgroup2, &xsize2, &ysize);
    uilib_adjust_group_width(hwnd, autostart_leftgroup2);
    uilib_move_group(hwnd, autostart_rightgroup2, xsize2 + 30);

    /* get the max x of the rightgroup3 elements */
    uilib_get_group_max_x(hwnd, autostart_rightgroup3, &xsize);

    /* resize the text fill-in box */
    uilib_move_and_set_element_width(hwnd, IDC_AUTOSTART_DISK_IMAGE_FILE, 9, xsize - 9);

    /* set the width of the dialog to 'surround' all the elements */
    GetWindowRect(hwnd, &rect);
    MoveWindow(hwnd, rect.left, rect.top, xsize + 20, rect.bottom - rect.top, TRUE);

    /* recenter the buttons in the newly resized dialog window */
    uilib_center_buttons(hwnd, move_buttons_group, 0);

    resources_get_int("AutostartWarp", &res_value);
    CheckDlgButton(hwnd, IDC_AUTOSTART_WARP, res_value ? BST_CHECKED : BST_UNCHECKED);

    resources_get_int("AutostartRunWithColon", &res_value);
    CheckDlgButton(hwnd, IDC_AUTOSTART_USE_COLON_WITH_RUN, res_value ? BST_CHECKED : BST_UNCHECKED);
    
    resources_get_int("AutostartBasicLoad", &res_value);
    CheckDlgButton(hwnd, IDC_AUTOSTART_LOAD_TO_BASIC, res_value ? BST_CHECKED : BST_UNCHECKED);

    resources_get_int("AutostartDelayRandom", &res_value);
    CheckDlgButton(hwnd, IDC_AUTOSTART_RANDOM_DELAY, res_value ? BST_CHECKED : BST_UNCHECKED);

    resources_get_int("AutostartHandleTrueDriveEmulation", &res_value);
    CheckDlgButton(hwnd, IDC_AUTOSTART_HANDLE_TRUE_DRIVE_EMULATION, res_value ? BST_CHECKED : BST_UNCHECKED);

    temp_hwnd = GetDlgItem(hwnd, IDC_AUTOSTART_PRG_MODE);
    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)translate_text(IDS_AUTOSTART_VIRTUAL_FS));
    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)translate_text(IDS_AUTOSTART_INJECT));
    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)translate_text(IDS_AUTOSTART_DISK));
    resources_get_int("AutostartPrgMode", &res_value);
    SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)res_value, 0);

    resources_get_string("AutostartPrgDiskImage", &autostartfile);
    st_autostartfile = system_mbstowcs_alloc(autostartfile);
    SetDlgItemText(hwnd, IDC_AUTOSTART_DISK_IMAGE_FILE, autostartfile != NULL ? st_autostartfile : TEXT(""));
    system_mbstowcs_free(st_autostartfile);
}
コード例 #2
0
ファイル: uiramcart.c プロジェクト: BigBoss21X/vice-emu
static void init_ramcart_dialog(HWND hwnd)
{
    HWND temp_hwnd;
    int res_value;
    const char *ramcartfile;
    TCHAR *st_ramcartfile;
    int res_value_loop;
    int active_value;
    int xsize, ysize;
    int xsize2;

    uilib_localize_dialog(hwnd, ramcart_dialog);
    uilib_get_group_extent(hwnd, ramcart_leftgroup1, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, ramcart_maingroup);
    uilib_adjust_group_width(hwnd, ramcart_leftgroup1);
    uilib_move_and_adjust_group_width(hwnd, ramcart_rightgroup1, xsize + 30);
    uilib_get_group_extent(hwnd, ramcart_leftgroup2, &xsize2, &ysize);
    uilib_adjust_group_width(hwnd, ramcart_leftgroup2);
    uilib_move_group(hwnd, ramcart_rightgroup2, xsize2 + 30);

    resources_get_int("RAMCART", &res_value);
    CheckDlgButton(hwnd, IDC_RAMCART_ENABLE, res_value ? BST_CHECKED : BST_UNCHECKED);

    resources_get_int("RAMCARTImageWrite", &res_value);
    CheckDlgButton(hwnd, IDC_RAMCART_WRITE_ENABLE, res_value ? BST_CHECKED : BST_UNCHECKED);

    resources_get_int("RAMCART_RO", &res_value);
    CheckDlgButton(hwnd, IDC_RAMCART_RO, res_value ? BST_CHECKED : BST_UNCHECKED);
    
    temp_hwnd = GetDlgItem(hwnd, IDC_RAMCART_SIZE);
    for (res_value_loop = 0; ui_ramcart_size[res_value_loop] != 0; res_value_loop++) {
        TCHAR st[10];

        _itot(ui_ramcart_size[res_value_loop], st, 10);
        _tcscat(st, translate_text(IDS_SPACE_KB));
        SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)st);
    }
    resources_get_int("RAMCARTsize", &res_value);
    active_value = 0;
    for (res_value_loop = 0; ui_ramcart_size[res_value_loop] != 0; res_value_loop++) {
        if (ui_ramcart_size[res_value_loop] == res_value) {
            active_value = res_value_loop;
        }
    }
    SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)active_value, 0);

    resources_get_string("RAMCARTfilename", &ramcartfile);
    st_ramcartfile = system_mbstowcs_alloc(ramcartfile);
    SetDlgItemText(hwnd, IDC_RAMCART_FILE, ramcartfile != NULL ? st_ramcartfile : TEXT(""));
    system_mbstowcs_free(st_ramcartfile);

    enable_ramcart_controls(hwnd);
}
コード例 #3
0
ファイル: uiplus256k.c プロジェクト: martinpiper/VICE
static void init_plus256k_dialog(HWND hwnd)
{
    int res_value;
    const char *plus256kfile;
    TCHAR *st_plus256kfile;
    int xsize, ysize;

    uilib_localize_dialog(hwnd, plus256k_dialog);
    uilib_adjust_group_width(hwnd, plus256k_group1);
    uilib_get_group_extent(hwnd, plus256k_leftgroup, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, plus256k_leftgroup);
    uilib_move_group(hwnd, plus256k_rightgroup, xsize + 30);

    resources_get_int("PLUS256K", &res_value);
    CheckDlgButton(hwnd, IDC_PLUS256K_ENABLE, 
        res_value ? BST_CHECKED : BST_UNCHECKED);
    
    resources_get_string("PLUS256Kfilename", &plus256kfile);
    st_plus256kfile = system_mbstowcs_alloc(plus256kfile);
    SetDlgItemText(hwnd, IDC_PLUS256K_FILE,
                   plus256kfile != NULL ? st_plus256kfile : TEXT(""));
    system_mbstowcs_free(st_plus256kfile);

    enable_plus256k_controls(hwnd);
}
コード例 #4
0
ファイル: uic64burstmod.c プロジェクト: AreaScout/vice
static void init_c64burstmod_dialog(HWND hwnd)
{
    HWND temp_hwnd;
    int res_value;
    int xsize, ysize;

    uilib_localize_dialog(hwnd, c64burstmod_dialog);
    uilib_adjust_group_width(hwnd, c64burstmod_left_total_group);
    uilib_get_group_extent(hwnd, c64burstmod_leftgroup, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, c64burstmod_leftgroup);
    uilib_move_group(hwnd, c64burstmod_rightgroup, xsize + 30);

    resources_get_int("BurstMod", &res_value);
    CheckDlgButton(hwnd, IDC_C64BURSTMOD_ENABLE, res_value ? BST_CHECKED : BST_UNCHECKED);
    
    temp_hwnd = GetDlgItem(hwnd, IDC_C64BURSTMOD_CIA);
    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"CIA-1");
    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"CIA-2");

    if (res_value) {
        SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)res_value - 1, 0);
    } else {
        SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)0, 0);
    }

    enable_c64burstmod_controls(hwnd);
}
コード例 #5
0
ファイル: uirs232user.c プロジェクト: martinpiper/VICE
static void init_rs232user_dialog(HWND hwnd)
{
    HWND temp_hwnd;
    RECT rect;
    int res_value;
    int res_value_loop;
    int active_value;
    int xsize, ysize;

    uilib_localize_dialog(hwnd, rs232user_dialog);
    uilib_get_group_extent(hwnd, rs232user_leftgroup, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, rs232user_leftgroup);
    uilib_move_group(hwnd, rs232user_rightgroup, xsize + 30);

    GetWindowRect(hwnd, &rect);
    MoveWindow(hwnd, rect.left, rect.top, xsize + 160, rect.bottom - rect.top,
               TRUE);

    resources_get_int("RsUserEnable", &res_value);
    CheckDlgButton(hwnd, IDC_RS232USER_ENABLE,
                   res_value ? BST_CHECKED : BST_UNCHECKED);

    temp_hwnd = GetDlgItem(hwnd, IDC_RS232USER_DEVICE);
    for (res_value_loop = 0; res_value_loop < MAXRS232; res_value_loop++) {
        TCHAR st[20];
        _stprintf(st, translate_text(IDS_RS232_DEVICE_I), res_value_loop + 1);
        SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)st);
    }
    SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)res_value, 0);

    resources_get_int("RsUserDev", &res_value);
    active_value = 0;
    for (res_value_loop = 0; res_value_loop < MAXRS232; res_value_loop++) {
        if (res_value_loop == res_value)
            active_value = res_value_loop;
    }
    SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)active_value, 0);

    temp_hwnd = GetDlgItem(hwnd, IDC_RS232USER_BAUDRATE);
    for (res_value_loop = 0; res_value_loop < NUM_OF_BAUDRATES;
        res_value_loop++) {
        TCHAR st[10];
        _itot(baudrates[res_value_loop], st, 10);
        SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)st);
    }

    resources_get_int("RsUserBaud", &res_value);
    active_value = 0;
    for (res_value_loop = 0; res_value_loop < MAXRS232; res_value_loop++) {
        if (baudrates[res_value_loop] == res_value)
            active_value = res_value_loop;
    }
    SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)active_value, 0);

    enable_rs232user_controls(hwnd);
}
コード例 #6
0
ファイル: uids12c887rtc.c プロジェクト: carriercomm/VICE-Core
static void init_ds12c887rtc_dialog(HWND hwnd)
{
    HWND temp_hwnd;
    int res_value;
    int res_value_loop;
    int active_value;
    int xsize, ysize;
    int *ui_ds12c887rtc_base;

    if (machine_class == VICE_MACHINE_VIC20) {
        ui_ds12c887rtc_base = ui_vic20_ds12c887rtc_base;
    } else if (machine_class == VICE_MACHINE_C128) {
        ui_ds12c887rtc_base = ui_c128_ds12c887rtc_base;
    } else {
        ui_ds12c887rtc_base = ui_c64_ds12c887rtc_base;
    }

    uilib_localize_dialog(hwnd, ds12c887rtc_dialog);
    uilib_adjust_group_width(hwnd, ds12c887rtc_left_total_group);
    uilib_get_group_extent(hwnd, ds12c887rtc_leftgroup, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, ds12c887rtc_leftgroup);
    uilib_move_group(hwnd, ds12c887rtc_rightgroup, xsize + 30);

    resources_get_int("DS12C887RTC", &res_value);
    CheckDlgButton(hwnd, IDC_DS12C887RTC_ENABLE, res_value ? BST_CHECKED : BST_UNCHECKED);

    resources_get_int("DS12C887RTCRunMode", &res_value);
    CheckDlgButton(hwnd, IDC_DS12C887RTC_RUNMODE, res_value ? BST_CHECKED : BST_UNCHECKED);

    resources_get_int("DS12C887RTCSave", &res_value);
    CheckDlgButton(hwnd, IDC_DS12C887RTC_SAVE, res_value ? BST_CHECKED : BST_UNCHECKED);

    temp_hwnd = GetDlgItem(hwnd, IDC_DS12C887RTC_BASE);
    for (res_value_loop = 0; ui_ds12c887rtc_base[res_value_loop] != -1; res_value_loop++) {
        TCHAR st[40];

        _stprintf(st, "$%X", ui_ds12c887rtc_base[res_value_loop]);
        SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)st);
    }
    resources_get_int("DS12C887RTCbase", &res_value);
    active_value = 0;
    for (res_value_loop = 0; ui_ds12c887rtc_base[res_value_loop] != -1; res_value_loop++) {
        if (ui_ds12c887rtc_base[res_value_loop] == res_value) {
            active_value = res_value_loop;
        }
    }
    SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)active_value, 0);

    enable_ds12c887rtc_controls(hwnd);
}
コード例 #7
0
ファイル: uipetreu.c プロジェクト: martinpiper/VICE
static void init_petreu_dialog(HWND hwnd)
{
    HWND temp_hwnd;
    int res_value;
    const char *petreufile;
    TCHAR *st_petreufile;
    int res_value_loop;
    int active_value;
    int xsize, ysize;

    uilib_localize_dialog(hwnd, petreu_dialog);
    uilib_get_group_extent(hwnd, petreu_leftgroup, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, petreu_leftgroup);
    uilib_move_group(hwnd, petreu_rightgroup, xsize + 30);

    resources_get_int("PETREU", &res_value);
    CheckDlgButton(hwnd, IDC_PETREU_ENABLE, 
                   res_value ? BST_CHECKED : BST_UNCHECKED);

    temp_hwnd = GetDlgItem(hwnd, IDC_PETREU_SIZE);
    for (res_value_loop = 0; res_value_loop < NUM_OF_PETREU_SIZE;
        res_value_loop++) {
        TCHAR st[10];
        _itot(ui_petreu_size[res_value_loop], st, 10);
        _tcscat(st, translate_text(IDS_SPACE_KB));
        SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)st);
    }
    resources_get_int("PETREUsize", &res_value);
    active_value = 0;
    for (res_value_loop = 0; res_value_loop < NUM_OF_PETREU_SIZE;
        res_value_loop++) {
        if (ui_petreu_size[res_value_loop] == res_value)
            active_value = res_value_loop;
    }
    SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)active_value, 0);

    resources_get_string("PETREUfilename", &petreufile);
    st_petreufile = system_mbstowcs_alloc(petreufile);
    SetDlgItemText(hwnd, IDC_PETREU_FILE,
                   petreufile != NULL ? st_petreufile : TEXT(""));
    system_mbstowcs_free(st_petreufile);

    enable_petreu_controls(hwnd);
}
コード例 #8
0
ファイル: uiplus60k.c プロジェクト: martinpiper/VICE
static void init_plus60k_dialog(HWND hwnd)
{
    HWND temp_hwnd;
    int res_value;
    const char *plus60kfile;
    TCHAR *st_plus60kfile;
    int res_value_loop;
    int active_value;
    int xsize, ysize;

    uilib_localize_dialog(hwnd, plus60k_dialog);
    uilib_get_group_extent(hwnd, plus60k_leftgroup, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, plus60k_leftgroup);
    uilib_move_group(hwnd, plus60k_rightgroup, xsize + 30);

    resources_get_int("PLUS60K", &res_value);
    CheckDlgButton(hwnd, IDC_PLUS60K_ENABLE, 
        res_value ? BST_CHECKED : BST_UNCHECKED);
    
    temp_hwnd = GetDlgItem(hwnd, IDC_PLUS60K_BASE);
    for (res_value_loop = 0; res_value_loop < NUM_OF_PLUS60K_BASE;
        res_value_loop++) {
        TCHAR st[10];
        _stprintf(st, "$%X", ui_plus60k_base[res_value_loop]);
        SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)st);
    }
    resources_get_int("PLUS60Kbase", &res_value);
    active_value = 0;
    for (res_value_loop = 0; res_value_loop < NUM_OF_PLUS60K_BASE;
        res_value_loop++) {
        if (ui_plus60k_base[res_value_loop] == res_value)
            active_value = res_value_loop;
    }
    SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)active_value, 0);

    resources_get_string("PLUS60Kfilename", &plus60kfile);
    st_plus60kfile = system_mbstowcs_alloc(plus60kfile);
    SetDlgItemText(hwnd, IDC_PLUS60K_FILE,
                   plus60kfile != NULL ? st_plus60kfile : TEXT(""));
    system_mbstowcs_free(st_plus60kfile);

    enable_plus60k_controls(hwnd);
}
コード例 #9
0
ファイル: uiv364speech.c プロジェクト: AreaScout/vice
static void init_v364speech_dialog(HWND hwnd)
{
    int res_value;
    const char *v364speechfile;
    TCHAR *st_v364speechfile;
    int xsize, ysize;

    uilib_localize_dialog(hwnd, v364speech_dialog);
    uilib_adjust_group_width(hwnd, v364speech_group1);
    uilib_get_group_extent(hwnd, v364speech_leftgroup, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, v364speech_leftgroup);
    uilib_move_group(hwnd, v364speech_rightgroup, xsize + 30);

    resources_get_int("SpeechEnabled", &res_value);
    CheckDlgButton(hwnd, IDC_V364SPEECH_ENABLE, res_value ? BST_CHECKED : BST_UNCHECKED);
    
    resources_get_string("SpeechImage", &v364speechfile);
    st_v364speechfile = system_mbstowcs_alloc(v364speechfile);
    SetDlgItemText(hwnd, IDC_V364SPEECH_FILE, v364speechfile != NULL ? st_v364speechfile : TEXT(""));
    system_mbstowcs_free(st_v364speechfile);

    enable_v364speech_controls(hwnd);
}
コード例 #10
0
ファイル: uimagicvoice.c プロジェクト: BigBoss21X/vice-emu
static void init_magicvoice_dialog(HWND hwnd)
{
    int res_value;
    const char *magicvoicefile;
    TCHAR *st_magicvoicefile;
    int xsize, ysize;

    uilib_localize_dialog(hwnd, magicvoice_dialog);
    uilib_adjust_group_width(hwnd, magicvoice_group1);
    uilib_get_group_extent(hwnd, magicvoice_leftgroup, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, magicvoice_leftgroup);
    uilib_move_group(hwnd, magicvoice_rightgroup, xsize + 30);

    resources_get_int("MagicVoiceCartridgeEnabled", &res_value);
    CheckDlgButton(hwnd, IDC_MAGICVOICE_ENABLE, res_value ? BST_CHECKED : BST_UNCHECKED);
    
    resources_get_string("MagicVoiceImage", &magicvoicefile);
    st_magicvoicefile = system_mbstowcs_alloc(magicvoicefile);
    SetDlgItemText(hwnd, IDC_MAGICVOICE_FILE, magicvoicefile != NULL ? st_magicvoicefile : TEXT(""));
    system_mbstowcs_free(st_magicvoicefile);

    enable_magicvoice_controls(hwnd);
}
コード例 #11
0
ファイル: uisoundexpander.c プロジェクト: AreaScout/vice
static void init_soundexpander_dialog(HWND hwnd)
{
    HWND temp_hwnd;
    int res_value;
    int xsize, ysize;

    uilib_localize_dialog(hwnd, soundexpander_dialog);

    if (machine_class == VICE_MACHINE_VIC20) {
        uilib_localize_dialog(hwnd, soundexpander_mascuerade_dialog);
    }

    uilib_get_group_extent(hwnd, soundexpander_leftgroup, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, soundexpander_left_total_group);
    uilib_move_group(hwnd, soundexpander_rightgroup, xsize + 30);

    resources_get_int("SFXSoundExpander", &res_value);
    CheckDlgButton(hwnd, IDC_SFX_SOUNDEXPANDER_ENABLE, res_value ? BST_CHECKED : BST_UNCHECKED);
    
    if (machine_class == VICE_MACHINE_VIC20) {
        resources_get_int("SFXSoundExpanderIOSwap", &res_value);
        CheckDlgButton(hwnd, IDC_SFX_SOUNDEXPANDER_IO_SWAP, res_value ? BST_CHECKED : BST_UNCHECKED);
    }

    temp_hwnd = GetDlgItem(hwnd, IDC_SFX_SOUNDEXPANDER_TYPE);

    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"3526");
    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"3812");
    resources_get_int("SFXSoundExpanderChip", &res_value);
    if (res_value == 3526) {
        SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)0, 0);
    } else {
        SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)1, 0);
    }
    enable_soundexpander_controls(hwnd);
}
コード例 #12
0
ファイル: PageConfigTfe.cpp プロジェクト: AppleWin/AppleWin
void CPageConfigTfe::init_tfe_dialog(HWND hwnd)
{
	HWND temp_hwnd;
	int active_value;

	int tfe_enable;
	int xsize, ysize;

	char *interface_name = NULL;

	uilib_get_group_extent(hwnd, ms_leftgroup, &xsize, &ysize);
	uilib_adjust_group_width(hwnd, ms_leftgroup);
	uilib_move_group(hwnd, ms_rightgroup, xsize + 30);

	//resources_get_value("ETHERNET_ACTIVE", (void *)&tfe_enabled);
	get_tfe_enabled(&tfe_enable);

	//resources_get_value("ETHERNET_AS_RR", (void *)&tfe_as_rr_net);
	active_value = (tfe_enable ? 1 : 0);

	temp_hwnd=GetDlgItem(hwnd,IDC_TFE_SETTINGS_ENABLE);
	SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"Disabled");
	SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"Uthernet");
	SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)active_value, 0);

	//resources_get_value("ETHERNET_INTERFACE", (void *)&interface_name);
	interface_name = (char *) get_tfe_interface();

	if (tfe_enumadapter_open())
	{
		int cnt = 0;

		char *pname;
		char *pdescription;

		temp_hwnd=GetDlgItem(hwnd,IDC_TFE_SETTINGS_INTERFACE);

		for (cnt = 0; tfe_enumadapter(&pname, &pdescription); cnt++)
		{
			BOOL this_entry = FALSE;

			if (strcmp(pname, interface_name) == 0)
			{
				this_entry = TRUE;
			}

			SetWindowText(GetDlgItem(hwnd, IDC_TFE_SETTINGS_INTERFACE_NAME), pname);
			SetWindowText(GetDlgItem(hwnd, IDC_TFE_SETTINGS_INTERFACE_DESC), pdescription);
			SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)pname);
			lib_free(pname);
			lib_free(pdescription);

			if (this_entry)
			{
				SendMessage(GetDlgItem(hwnd, IDC_TFE_SETTINGS_INTERFACE),
					CB_SETCURSEL, (WPARAM)cnt, 0);
			}
		}

		tfe_enumadapter_close();
	}

	if (gray_ungray_items(hwnd))
	{
		/* we have a problem: TFE is disabled. Give a message to the user */
		// TC (18 Dec 2017) this vicekb URL is a broken link now, so I copied it to the AppleWin repo, here:
		// . https://github.com/AppleWin/AppleWin/blob/master/docs/VICE%20Knowledge%20Base%20-%20Article%2013-005.htm
		MessageBox( hwnd,
			"TFE support is not available on your system,\n"
			"there is some important part missing. Please have a\n"
			"look at the VICE knowledge base support page\n"
			"\n      http://vicekb.trikaliotis.net/13-005\n\n"
			"for possible reasons and to activate networking with VICE.",
			"TFE support", MB_ICONINFORMATION|MB_OK);

		/* just quit the dialog before it is open */
		SendMessage( hwnd, WM_COMMAND, IDCANCEL, 0);
	}
}