2
* uimouse.c - Implementation of the mouse settings dialog box.
5
* Marco van den Heuvel <blackystardust68@yahoo.com>
7
* This file is part of VICE, the Versatile Commodore Emulator.
8
* See README for copyright notice.
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
35
#include "resources.h"
37
#include "translate.h"
42
static void enable_mouse_controls(HWND hwnd)
44
EnableWindow(GetDlgItem(hwnd, IDC_MOUSE_TYPE), 1);
45
EnableWindow(GetDlgItem(hwnd, IDC_MOUSE_PORT), 1);
48
static void init_mouse_dialog(HWND hwnd)
53
temp_hwnd = GetDlgItem(hwnd, IDC_MOUSE_TYPE);
54
SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"1351");
55
SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"NEOS");
56
SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"AMIGA");
57
resources_get_int("Mousetype", &res_value);
58
SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)res_value, 0);
60
temp_hwnd = GetDlgItem(hwnd, IDC_MOUSE_PORT);
61
SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"Joy1");
62
SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"Joy2");
63
resources_get_int("Mouseport", &res_value);
65
SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)res_value, 0);
67
enable_mouse_controls(hwnd);
70
static void end_mouse_dialog(HWND hwnd)
72
resources_set_int("Mousetype",SendMessage(GetDlgItem(
73
hwnd, IDC_MOUSE_TYPE), CB_GETCURSEL, 0, 0));
75
resources_set_int("Mouseport",SendMessage(GetDlgItem(
76
hwnd, IDC_MOUSE_PORT), CB_GETCURSEL, 0, 0)+1);
79
static BOOL CALLBACK dialog_proc(HWND hwnd, UINT msg, WPARAM wparam,
87
command = LOWORD(wparam);
91
end_mouse_dialog(hwnd);
101
init_mouse_dialog(hwnd);
107
void ui_mouse_settings_dialog(HWND hwnd)
109
DialogBox(winmain_instance, (LPCTSTR)translate_res(IDD_MOUSE_SETTINGS_DIALOG), hwnd,