Пример #1
0
static INT_PTR CALLBACK callback_7(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg) {
        case WM_COMMAND:
            return FALSE;
        case WM_NOTIFY:
            {
                NMHDR FAR *nmhdr = (NMHDR FAR *)(lparam);

                switch (nmhdr->code) {
                    case PSN_APPLY:
                        resources_set_int("IECDevice7", (IsDlgButtonChecked(hwnd, IDC_PRINTER_USEIECDEVICE) == BST_CHECKED));
                        return TRUE;
                    case PSN_SETACTIVE:
                    case PSN_KILLACTIVE:
                        return TRUE;
                }
                break;
            }
        case WM_CLOSE:
            EndDialog(hwnd, 0);
            return TRUE;
        case WM_INITDIALOG:
            system_init_dialog(hwnd);
            init_device_7_dialog(hwnd);
            return TRUE;
    }

    return FALSE;
}
Пример #2
0
static BOOL CALLBACK dialog_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, unsigned int type)
{
    int command;

    switch (msg) {
        case WM_INITDIALOG:
            system_init_dialog(hwnd);
            init_rom_dialog(hwnd, type);
            return TRUE;
        case WM_NOTIFY:
            switch (((NMHDR FAR *)lparam)->code) {
                case PSN_KILLACTIVE:
                    set_dialog_proc(hwnd, type);
                    return TRUE;
            }
            return FALSE;
        case WM_COMMAND:
            command = LOWORD(wparam);
            return browse_command(hwnd, command);
        case WM_CLOSE:
            EndDialog(hwnd, 0);
            return TRUE;
    }
    return FALSE;
}
Пример #3
0
static INT_PTR CALLBACK dialog_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    int command;

    switch (msg) {
        case WM_INITDIALOG:
            system_init_dialog(hwnd);
            init_sound_dialog(hwnd);
            return TRUE;
        case WM_COMMAND:
            command = LOWORD(wparam);
                switch (command) {
                    case IDC_SOUND_DIRECTX:
                    select_dx();
                    break;
                case IDC_SOUND_WMM:
                    select_wmm();
                    break;
                case IDOK:
                    end_sound_dialog(hwnd);
                case IDCANCEL:
                    EndDialog(hwnd, 0);
                    return TRUE;
            }
            break;
    }
    return FALSE;
}
Пример #4
0
static INT_PTR CALLBACK functionrom_dialog_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    int command;

    switch (msg) {
        case WM_COMMAND:
            command = LOWORD(wparam);
            switch (command) {
                case IDC_C128_FUNCTIONROM_INTERNAL_BROWSE:
                    uilib_select_browse(hwnd, translate_text(IDS_SELECT_INT_FUNCTION_ROM), UILIB_FILTER_ALL, UILIB_SELECTOR_TYPE_FILE_LOAD, IDC_C128_FUNCTIONROM_INTERNAL_NAME);
                    break;
                case IDC_C128_FUNCTIONROM_EXTERNAL_BROWSE:
                    uilib_select_browse(hwnd, translate_text(IDS_SELECT_EXT_FUNCTION_ROM), UILIB_FILTER_ALL, UILIB_SELECTOR_TYPE_FILE_LOAD, IDC_C128_FUNCTIONROM_EXTERNAL_NAME);
                    break;
            }
            return FALSE;
        case WM_NOTIFY:
            switch (((NMHDR FAR *)lparam)->code) {
                case PSN_KILLACTIVE:
                    end_functionrom_dialog(hwnd);
                    return TRUE;
            }
            return FALSE;
        case WM_CLOSE:
            EndDialog(hwnd, 0);
            return TRUE;
        case WM_INITDIALOG:
            system_init_dialog(hwnd);
            init_functionrom_dialog(hwnd);
            return TRUE;
    }

    return FALSE;
}
Пример #5
0
static INT_PTR CALLBACK hardsid_dialog_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg) {
        case WM_NOTIFY:
            switch (((NMHDR FAR *)lparam)->code) {
                case PSN_SETACTIVE:
                    enable_hardsid_sid_controls(hwnd);
                    return TRUE;
                case PSN_APPLY:
                    end_hardsid_dialog(hwnd);
                    return TRUE;
            }
            return FALSE;
        case WM_CLOSE:
            EndDialog(hwnd, 0);
            return TRUE;
        case WM_INITDIALOG:
            system_init_dialog(hwnd);
            init_hardsid_sid_dialog(hwnd);
            return TRUE;
        case WM_SIZE:
            resize_hardsid_sid_dialog(hwnd);
            break;
    }
    return FALSE;
}
Пример #6
0
static BOOL CALLBACK mapping_dialog_proc(HWND hwnd, UINT msg, WPARAM wparam,
                                         LPARAM lparam)
{
    switch (msg) {
      case WM_NOTIFY:
        switch (((NMHDR FAR *)lparam)->code) {
          case PSN_KILLACTIVE:
            end_mapping_dialog(hwnd);
            return TRUE;
        }
        return FALSE;
      case WM_COMMAND:
        {
            int i;

            for (i = 0; i < uikeyboard_mapping_num; i++) {
                if (LOWORD(wparam) == mapping_entry[i].idc_select)
                    enable_mapping_controls(hwnd, LOWORD(wparam));
                if (LOWORD(wparam) == mapping_entry[i].idc_browse)
                    browse_mapping(hwnd, i);
            }
            if (LOWORD(wparam) == mapping_idc_dump)
                dump_mapping(hwnd);
        }
        return FALSE;
      case WM_CLOSE:
        EndDialog(hwnd, 0);
        return TRUE;
      case WM_INITDIALOG:
        system_init_dialog(hwnd);
        init_mapping_dialog(hwnd);
        return TRUE;
    }
    return FALSE;
}
Пример #7
0
static INT_PTR CALLBACK dialog_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    int command;

    switch (msg) {
    case WM_COMMAND:
        command=LOWORD(wparam);
        switch (command) {
        case IDOK:
            end_datasette_dialog(hwnd);
        case IDCANCEL:
            EndDialog(hwnd, 0);
            return TRUE;
        }
        return FALSE;
    case WM_CLOSE:
        EndDialog(hwnd, 0);
        return TRUE;
    case WM_INITDIALOG:
        system_init_dialog(hwnd);
        init_datasette_dialog(hwnd);
        return TRUE;
    }
    return FALSE;
}
Пример #8
0
static BOOL CALLBACK printer_dialog_proc(unsigned int num, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    int command;

    switch (msg) {
        case WM_COMMAND:
            command = LOWORD(wparam);
            switch (command) {
                case IDC_PRINTER_TYPE:
                case IDC_PRINTER_USEIECDEVICE:
                    enable_printer_controls(num, hwnd);
                    break;
                case IDC_PRINTER_FORMFEED:
                    switch (num) {
                        case 4:
                            printer_formfeed(0);
                            break;
                        case 5:
                            printer_formfeed(1);
                            break;
                        case 6:
                            printer_formfeed(2);
                            break;
                        case 0:
                            printer_formfeed(3);
                            break;
                    }
                    break;
            }
            return FALSE;
        case WM_NOTIFY:
            {
                NMHDR FAR *nmhdr = (NMHDR FAR *)(lparam);

                switch (nmhdr->code) {
                    case PSN_APPLY:
                        SetWindowLongPtr(hwnd, DWLP_MSGRESULT, store_printer_dialog_results(hwnd, num) ? PSNRET_NOERROR : PSNRET_INVALID);
                        return TRUE;
                    case PSN_SETACTIVE:
                        printer_set_active(hwnd);
                        return TRUE;
                    case PSN_KILLACTIVE:
                        printer_kill_active(hwnd);
                        return TRUE;
                }
                break;
            }
        case WM_CLOSE:
            EndDialog(hwnd, 0);
            return TRUE;
        case WM_INITDIALOG:
            system_init_dialog(hwnd);
            init_printer_dialog(num, hwnd);
            return TRUE;
    }

    return FALSE;
}
Пример #9
0
static BOOL CALLBACK dialog_proc(HWND hwnd, UINT msg, WPARAM wparam,
                                 LPARAM lparam)
{
    int command;
    int rv;

    switch (msg) {
      case WM_COMMAND:
        command = LOWORD(wparam);
        switch (command) {
          case IDC_RAMINIT_STARTVALUE:
           rv = SendMessage(GetDlgItem(hwnd,
                            IDC_RAMINIT_STARTVALUE), CB_GETCURSEL, 0, 0);
           resources_set_int("RAMInitStartValue", ui_ram_startvalue[rv]);
           update_preview(hwnd);
           break;
         case IDC_RAMINIT_VALUEINVERT:
           rv = SendMessage(GetDlgItem(
                            hwnd, IDC_RAMINIT_VALUEINVERT), CB_GETCURSEL, 0, 0);
           resources_set_int("RAMInitValueInvert", ui_ram_invertvalue[rv]);
           update_preview(hwnd);
           break;
         case IDC_RAMINIT_PATTERNINVERT:
           rv = SendMessage(GetDlgItem(hwnd,
                            IDC_RAMINIT_PATTERNINVERT), CB_GETCURSEL, 0, 0);
           resources_set_int("RAMInitPatternInvert", ui_ram_invertvalue[rv]);
           update_preview(hwnd);
           break;

         case IDOK:
           EndDialog(hwnd,0);
           return TRUE;
         case IDCANCEL:
           resources_set_int("RAMInitStartValue", orig_startvalue);
           resources_set_int("RAMInitValueInvert", orig_valueinvert);
           resources_set_int("RAMInitPatternInvert", orig_patterninvert);
           EndDialog(hwnd,0);
           return TRUE;
       }
            return FALSE;
        case WM_CLOSE:
            EndDialog(hwnd,0);
            return TRUE;
        case WM_INITDIALOG:
            system_init_dialog(hwnd);
            init_ram_dialog(hwnd);
            return TRUE;
    }
    return FALSE;
}
Пример #10
0
static INT_PTR CALLBACK machine_dialog_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg) {
        case WM_NOTIFY:
            switch (((NMHDR FAR *)lparam)->code) {
                case PSN_KILLACTIVE:
                    end_machine_dialog(hwnd);
                    return TRUE;
            }
            return FALSE;
        case WM_CLOSE:
            EndDialog(hwnd, 0);
            return TRUE;
        case WM_INITDIALOG:
            system_init_dialog(hwnd);
            init_machine_dialog(hwnd);
            return TRUE;
    }

    return FALSE;
}
Пример #11
0
static INT_PTR CALLBACK general_dialog_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    int temp;

    switch (msg) {
        case WM_COMMAND:
            switch (LOWORD(wparam)) {
                case IDC_SID_ENGINE_MODEL:
                    temp = SendDlgItemMessage(hwnd, IDC_SID_ENGINE_MODEL, CB_GETCURSEL, 0, 0);
                    sel_engine = (ui_sid_engine_model_list[temp]->value) >> 8;
                    break;
                case IDC_SID_EXTRA_AMOUNT:
                    sel_extra_sids = SendDlgItemMessage(hwnd, IDC_SID_EXTRA_AMOUNT, CB_GETCURSEL, 0, 0);
                    enable_general_sid_controls(hwnd);
                    break;
            }
            return FALSE;
        case WM_NOTIFY:
            switch (((NMHDR FAR *)lparam)->code) {
                case PSN_APPLY:
                    end_general_dialog(hwnd);
                    return TRUE;
            }
            return FALSE;
        case WM_CLOSE:
            EndDialog(hwnd, 0);
            return TRUE;
        case WM_INITDIALOG:
            system_init_dialog(hwnd);
            init_general_sid_dialog(hwnd);
            return TRUE;
        case WM_SIZE:
            resize_general_sid_dialog(hwnd);
            break;
    }
    return FALSE;
}
Пример #12
0
static INT_PTR CALLBACK dialog_proc_romset(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg) {
        case WM_INITDIALOG:
            system_init_dialog(hwnd);
            init_romset_dialog(hwnd);
            return TRUE;
        case WM_NOTIFY:
            switch (((NMHDR FAR *)lparam)->code) {
                case PSN_KILLACTIVE:
                    end_romset_dialog(hwnd);
                    return TRUE;
            }
            return FALSE;
        case WM_COMMAND:
            switch (LOWORD(wparam)) {
                case IDC_ROMSET_SELECT_ARCHIVE:
                case IDC_ROMSET_SELECT_FILE:
                    update_romset_dialog(hwnd, LOWORD(wparam));
                    break;
                case IDC_ROMSET_ARCHIVE_BROWSE:
                    uilib_select_browse(hwnd, translate_text(IDS_SELECT_ROMSET_ARCHIVE), UILIB_FILTER_ROMSET_ARCHIVE, UILIB_SELECTOR_TYPE_FILE_SAVE, IDC_ROMSET_ARCHIVE_NAME);
                    break;
                case IDC_ROMSET_ARCHIVE_LOAD:
                    load_archive_romset_dialog(hwnd);
                    break;
                case IDC_ROMSET_ARCHIVE_SAVE:
                    save_archive_romset_dialog(hwnd);
                    break;
                case IDC_ROMSET_ARCHIVE_APPLY:
                    apply_archive_romset_dialog(hwnd);
                    break;
                case IDC_ROMSET_ARCHIVE_NEW:
                    new_archive_romset_dialog(hwnd);
                    break;
                case IDC_ROMSET_ARCHIVE_DELETE:
                    delete_archive_romset_dialog(hwnd);
                    break;
                case IDC_ROMSET_FILE_BROWSE:
                    uilib_select_browse(hwnd, translate_text(IDS_SELECT_ROMSET_FILE), UILIB_FILTER_ROMSET_FILE, UILIB_SELECTOR_TYPE_FILE_SAVE, IDC_ROMSET_FILE_NAME);
                    break;
                case IDC_ROMSET_FILE_LOAD:
                    load_file_romset_dialog(hwnd);
                    break;
                case IDC_ROMSET_FILE_SAVE:
                    save_file_romset_dialog(hwnd);
                    break;
                case IDC_ROMSET_RESOURCE_COMPUTER:
                    uirom_resources_computer(hwnd);
                    break;
                case IDC_ROMSET_RESOURCE_DRIVE:
                    uirom_resources_drive(hwnd);
                    break;
                case IDC_ROMSET_RESOURCE_OTHER:
                    uirom_resources_other(hwnd);
                    break;
            }
            return TRUE;
        case WM_CLOSE:
            EndDialog(hwnd, 0);
            return TRUE;
    }
    return FALSE;
}