From 278c6e9f38822d7164a7e80e45aa7499ea87c0e4 Mon Sep 17 00:00:00 2001 From: Volker Ruppert Date: Sun, 1 Feb 2004 01:40:14 +0000 Subject: [PATCH] - new gui dialogs for the first cdrom and the runtime options (log options are still handled on the console) - minor changes in other win32dialog functions --- bochs/gui/gui.cc | 33 ++--- bochs/gui/textconfig.cc | 12 +- bochs/gui/win32dialog.cc | 294 +++++++++++++++++++++++++++++++++++++-- bochs/gui/win32dialog.h | 6 +- bochs/gui/win32res.h | 34 +++++ bochs/win32res.rc | 51 +++++++ 6 files changed, 394 insertions(+), 36 deletions(-) diff --git a/bochs/gui/gui.cc b/bochs/gui/gui.cc index bb8329b54..32c052902 100644 --- a/bochs/gui/gui.cc +++ b/bochs/gui/gui.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: gui.cc,v 1.73 2003-12-18 20:04:48 vruppert Exp $ +// $Id: gui.cc,v 1.74 2004-02-01 01:40:14 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -257,30 +257,25 @@ bx_gui_c::floppyB_handler(void) bx_gui_c::cdromD_handler(void) { Bit32u handle = DEV_hd_get_first_cd_handle(); - if (!strcmp(bx_options.Osel_config->get_choice(bx_options.Osel_config->get()), - "wx")) { - // instead of just toggling the status, call wxWindows to bring up +#ifdef WIN32 + if (strcmp(bx_options.Osel_displaylib->get_choice(bx_options.Osel_displaylib->get()), + "rfb")) { + // instead of just toggling the status, call win32dialog to bring up // a dialog asking what disk image you want to switch to. - // BBD: for now, find the first cdrom and call ask_param on that. - // Since we could have multiple cdroms now, maybe we should be adding - // one cdrom button for each? + // This code handles the first cdrom only. The cdrom drives #2, #3 and + // #4 are handled in the win32 runtime dialog. bx_param_c *cdrom = SIM->get_first_cdrom (); if (cdrom == NULL) return; // no cdrom found int ret = SIM->ask_param (cdrom->get_id ()); - if (ret < 0) return; // cancelled - // eject and then insert the disk. If the new path is invalid, - // the status will return 0. - unsigned status = DEV_hd_set_cd_media_status(handle, 0); - printf ("eject disk, new_status is %d\n", status); - status = DEV_hd_set_cd_media_status(handle, 1); - printf ("insert disk, new_status is %d\n", status); - fflush (stdout); - BX_GUI_THIS cdromD_status = status; - } else { - BX_GUI_THIS cdromD_status = - DEV_hd_set_cd_media_status(handle, !BX_GUI_THIS cdromD_status); + if (ret > 0) { + BX_GUI_THIS update_drive_status_buttons (); + } + return; } +#endif + BX_GUI_THIS cdromD_status = + DEV_hd_set_cd_media_status(handle, !BX_GUI_THIS cdromD_status); BX_GUI_THIS update_drive_status_buttons (); } diff --git a/bochs/gui/textconfig.cc b/bochs/gui/textconfig.cc index 88337a322..289ecc489 100644 --- a/bochs/gui/textconfig.cc +++ b/bochs/gui/textconfig.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: textconfig.cc,v 1.20 2004-01-29 18:50:33 vruppert Exp $ +// $Id: textconfig.cc,v 1.21 2004-02-01 01:40:14 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // This is code for a text-mode configuration interface. Note that this file @@ -460,8 +460,12 @@ int bx_config_interface (int menu) char prompt[1024]; bx_floppy_options floppyop; bx_atadevice_options cdromop; +#ifdef WIN32 + choice = RuntimeOptionsDialog(); +#else build_runtime_options_prompt (runtime_menu_prompt, prompt, 1024); if (ask_uint (prompt, 1, 16, 15, &choice, 10) < 0) return -1; +#endif switch (choice) { case 1: SIM->get_floppy_options (0, &floppyop); @@ -498,6 +502,7 @@ int bx_config_interface (int menu) case 15: fprintf (stderr, "Continuing simulation\n"); return 0; case 16: fprintf (stderr, "You chose quit on the configuration interface.\n"); + bx_user_quit = 1; SIM->quit_sim (1); return -1; default: fprintf (stderr, "Menu choice %d not implemented.\n", choice); @@ -649,7 +654,7 @@ config_interface_notify_callback (void *unused, BxEvent *event) opts = sparam->get_options()->get(); if (opts & sparam->IS_FILENAME) { if (param->get_id() == BXP_NULL) { - event->retcode = AskFilename(GetBochsWindow(), (bx_param_filename_c *)sparam); + event->retcode = AskFilename(GetBochsWindow(), (bx_param_filename_c *)sparam, "txt"); } else { event->retcode = FloppyDialog((bx_param_filename_c *)sparam); } @@ -658,6 +663,9 @@ config_interface_notify_callback (void *unused, BxEvent *event) event->retcode = AskString(sparam); return event; } + } else if (param->get_type() == BXT_LIST) { + event->retcode = Cdrom1Dialog(); + return event; } #endif event->u.param.param->text_ask (stdin, stderr); diff --git a/bochs/gui/win32dialog.cc b/bochs/gui/win32dialog.cc index 8bfffff49..aa29e0f10 100644 --- a/bochs/gui/win32dialog.cc +++ b/bochs/gui/win32dialog.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: win32dialog.cc,v 1.13 2004-01-30 17:36:30 vruppert Exp $ +// $Id: win32dialog.cc,v 1.14 2004-02-01 01:40:14 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// #include "config.h" @@ -9,6 +9,7 @@ extern "C" { #include #include +#include } #include "win32res.h" #include "siminterface.h" @@ -84,7 +85,7 @@ static BOOL CALLBACK LogAskProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara case IDCANCEL: EndDialog(hDlg, BX_LOG_ASK_CHOICE_DIE); break; - } + } } return FALSE; } @@ -106,14 +107,14 @@ static BOOL CALLBACK StringParamProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: - GetWindowText(GetDlgItem(hDlg, IDSTRING), buffer, 20); + GetDlgItemText(hDlg, IDSTRING, buffer, 20); param->set(buffer); EndDialog(hDlg, 1); break; case IDCANCEL: EndDialog(hDlg, -1); break; - } + } } return FALSE; } @@ -153,19 +154,22 @@ static BOOL CALLBACK FloppyDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP } return FALSE; case WM_CLOSE: + param->set(origpath); EndDialog(hDlg, -1); break; case WM_COMMAND: switch (LOWORD(wParam)) { case IDBROWSE: - if (AskFilename(hDlg, param) > 0) { + GetDlgItemText(hDlg, IDPATH, path, MAX_PATH); + param->set(path); + if (AskFilename(hDlg, param, "img") > 0) { SetWindowText(GetDlgItem(hDlg, IDPATH), param->getptr()); SendMessage(GetDlgItem(hDlg, IDSTATUS), BM_SETCHECK, BST_CHECKED, 0); } break; case IDOK: if (SendMessage(GetDlgItem(hDlg, IDSTATUS), BM_GETCHECK, 0, 0) == BST_CHECKED) { - GetWindowText(GetDlgItem(hDlg, IDPATH), path, MAX_PATH); + GetDlgItemText(hDlg, IDPATH, path, MAX_PATH); if (lstrlen(path)) { status->set(BX_INSERTED); } else { @@ -184,14 +188,260 @@ static BOOL CALLBACK FloppyDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP EndDialog(hDlg, -1); break; case IDCREATE: - GetWindowText(GetDlgItem(hDlg, IDPATH), path, MAX_PATH); + GetDlgItemText(hDlg, IDPATH, path, MAX_PATH); cap = disktype->get() - disktype->get_min(); if (CreateImage(hDlg, floppy_type_n_sectors[cap], path)) { wsprintf(mesg, "Created a %s disk image called %s", floppy_type_names[cap], path); MessageBox(hDlg, mesg, "Image created", MB_OK); } break; - } + } + } + return FALSE; +} + +static BOOL CALLBACK Cdrom1DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + static bx_atadevice_options cdromop; + int device; + static char origpath[MAX_PATH]; + char path[MAX_PATH]; + + switch (msg) { + case WM_INITDIALOG: + SIM->get_cdrom_options(0, &cdromop, &device); + lstrcpy(origpath, cdromop.Opath->getptr()); + if (lstrlen(origpath) && lstrcmp(origpath, "none")) { + SetWindowText(GetDlgItem(hDlg, IDCDROM1), origpath); + } + if (cdromop.Ostatus->get() == BX_INSERTED) { + SendMessage(GetDlgItem(hDlg, IDSTATUS1), BM_SETCHECK, BST_CHECKED, 0); + } + break; + case WM_CLOSE: + cdromop.Opath->set(origpath); + EndDialog(hDlg, -1); + break; + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDBROWSE1: + GetDlgItemText(hDlg, IDCDROM1, path, MAX_PATH); + cdromop.Opath->set(path); + if (AskFilename(hDlg, (bx_param_filename_c *)cdromop.Opath, "iso") > 0) { + SetWindowText(GetDlgItem(hDlg, IDCDROM1), cdromop.Opath->getptr()); + SendMessage(GetDlgItem(hDlg, IDSTATUS1), BM_SETCHECK, BST_CHECKED, 0); + } + break; + case IDOK: + if (SendMessage(GetDlgItem(hDlg, IDSTATUS1), BM_GETCHECK, 0, 0) == BST_CHECKED) { + GetDlgItemText(hDlg, IDCDROM1, path, MAX_PATH); + if (lstrlen(path)) { + cdromop.Ostatus->set(BX_INSERTED); + } else { + cdromop.Ostatus->set(BX_EJECTED); + lstrcpy(path, "none"); + } + } else { + cdromop.Ostatus->set(BX_EJECTED); + lstrcpy(path, "none"); + } + cdromop.Opath->set(path); + EndDialog(hDlg, 1); + break; + case IDCANCEL: + cdromop.Opath->set(origpath); + EndDialog(hDlg, -1); + break; + } + } + return FALSE; +} + +void RuntimeDlgSetTab(HWND hDlg, int tabnum) +{ + ShowWindow(GetDlgItem(hDlg, IDGROUP2), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDGROUP3), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDGROUP4), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDLABEL2), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDLABEL3), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDLABEL4), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDCDROM2), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDCDROM3), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDCDROM4), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDBROWSE2), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDBROWSE3), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDBROWSE4), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDSTATUS2), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDSTATUS3), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDSTATUS4), (tabnum == 0) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDINFO), (tabnum == 1) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDLOGOPT1), (tabnum == 1) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDLOGOPT2), (tabnum == 1) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDLABEL5), (tabnum == 2) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDLABEL6), (tabnum == 2) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDLABEL7), (tabnum == 2) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDVGAUPDATE), (tabnum == 2) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDMOUSE), (tabnum == 2) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDKBDPASTE), (tabnum == 2) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDUSERBTN), (tabnum == 2) ? SW_SHOW : SW_HIDE); +} + +static BOOL CALLBACK RuntimeDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + TC_ITEM tItem; + NMHDR tcinfo; + int device, tabnum; + static int devcount; + long noticode; + static BOOL changed; + BOOL old_changed; + int value; + char buffer[32]; + static bx_atadevice_options cdromop[4]; + static char origpath[4][MAX_PATH]; + char path[MAX_PATH]; + + switch (msg) { + case WM_INITDIALOG: + SetForegroundWindow(hDlg); + tItem.mask = TCIF_TEXT; + tItem.pszText = "CD-ROM Options"; + TabCtrl_InsertItem(GetDlgItem(hDlg, IDRTOTAB), 0, &tItem); + tItem.mask = TCIF_TEXT; + tItem.pszText = "Log Options"; + TabCtrl_InsertItem(GetDlgItem(hDlg, IDRTOTAB), 1, &tItem); + tItem.mask = TCIF_TEXT; + tItem.pszText = "Misc Options"; + TabCtrl_InsertItem(GetDlgItem(hDlg, IDRTOTAB), 2, &tItem); + RuntimeDlgSetTab(hDlg, 0); + // 4 cdroms supported at run time + devcount = 1; + for (Bit8u cdrom=1; cdrom<4; cdrom++) { + if (!SIM->get_cdrom_options (cdrom, &cdromop[cdrom], &device) || !cdromop[cdrom].Opresent->get ()) { + EnableWindow(GetDlgItem(hDlg, IDLABEL1+cdrom), FALSE); + EnableWindow(GetDlgItem(hDlg, IDCDROM1+cdrom), FALSE); + EnableWindow(GetDlgItem(hDlg, IDBROWSE1+cdrom), FALSE); + EnableWindow(GetDlgItem(hDlg, IDSTATUS1+cdrom), FALSE); + } else { + lstrcpy(origpath[cdrom], cdromop[cdrom].Opath->getptr()); + if (lstrlen(origpath[cdrom]) && lstrcmp(origpath[cdrom], "none")) { + SetWindowText(GetDlgItem(hDlg, IDCDROM1+cdrom), origpath[cdrom]); + } + if (cdromop[cdrom].Ostatus->get() == BX_INSERTED) { + SendMessage(GetDlgItem(hDlg, IDSTATUS1+cdrom), BM_SETCHECK, BST_CHECKED, 0); + } + devcount++; + } + } + SetDlgItemInt(hDlg, IDVGAUPDATE, SIM->get_param_num(BXP_VGA_UPDATE_INTERVAL)->get(), FALSE); + SetDlgItemInt(hDlg, IDKBDPASTE, SIM->get_param_num(BXP_KBD_PASTE_DELAY)->get(), FALSE); + if (SIM->get_param_num(BXP_MOUSE_ENABLED)->get()) { + SendMessage(GetDlgItem(hDlg, IDMOUSE), BM_SETCHECK, BST_CHECKED, 0); + } + SetDlgItemText(hDlg, IDUSERBTN, SIM->get_param_string(BXP_USER_SHORTCUT)->getptr()); + EnableWindow(GetDlgItem(hDlg, IDAPPLY), FALSE); + changed = FALSE; + old_changed = FALSE; + break; + case WM_CLOSE: + for (device=1; deviceset(origpath[device]); + } + EndDialog(hDlg, 16); + break; + case WM_COMMAND: + old_changed = changed; + noticode = HIWORD(wParam); + switch(noticode) { + case EN_CHANGE: + switch (LOWORD(wParam)) { + case IDCDROM2: + case IDCDROM3: + case IDCDROM4: + case IDVGAUPDATE: + case IDKBDPASTE: + case IDUSERBTN: + changed = TRUE; + break; + } + break; + default: + switch (LOWORD(wParam)) { + case IDBROWSE2: + case IDBROWSE3: + case IDBROWSE4: + device = LOWORD(wParam) - IDBROWSE1; + GetDlgItemText(hDlg, IDCDROM1+device, path, MAX_PATH); + cdromop[device].Opath->set(path); + if (AskFilename(hDlg, (bx_param_filename_c *)cdromop[device].Opath, "iso") > 0) { + SetWindowText(GetDlgItem(hDlg, IDCDROM1+device), cdromop[device].Opath->getptr()); + SendMessage(GetDlgItem(hDlg, IDSTATUS1+device), BM_SETCHECK, BST_CHECKED, 0); + } + break; + case IDLOGOPT1: + EndDialog(hDlg, 8); + break; + case IDLOGOPT2: + EndDialog(hDlg, 9); + break; + case IDSTATUS2: + case IDSTATUS3: + case IDSTATUS4: + case IDMOUSE: + changed = TRUE; + break; + case IDAPPLY: + for (device=1; deviceset(BX_INSERTED); + } else { + cdromop[device].Ostatus->set(BX_EJECTED); + lstrcpy(path, "none"); + } + } else { + cdromop[device].Ostatus->set(BX_EJECTED); + lstrcpy(path, "none"); + } + cdromop[device].Opath->set(path); + } + value = GetDlgItemInt(hDlg, IDVGAUPDATE, NULL, FALSE); + SIM->get_param_num(BXP_VGA_UPDATE_INTERVAL)->set(value); + value = GetDlgItemInt(hDlg, IDKBDPASTE, NULL, FALSE); + SIM->get_param_num(BXP_KBD_PASTE_DELAY)->set(value); + value = SendMessage(GetDlgItem(hDlg, IDMOUSE), BM_GETCHECK, 0, 0); + SIM->get_param_num(BXP_MOUSE_ENABLED)->set(value==BST_CHECKED); + GetDlgItemText(hDlg, IDUSERBTN, buffer, sizeof(buffer)); + SIM->get_param_string(BXP_USER_SHORTCUT)->set(buffer); + changed = FALSE; + break; + case IDOK: + EndDialog(hDlg, 15); + break; + case IDCANCEL: + for (device=1; deviceset(origpath[device]); + } + EndDialog(hDlg, 16); + break; + } + } + if (changed != old_changed) { + EnableWindow(GetDlgItem(hDlg, IDAPPLY), changed); + } + break; + case WM_NOTIFY: + switch(LOWORD(wParam)) { + case IDRTOTAB: + tcinfo = *(LPNMHDR)lParam; + if (tcinfo.code == TCN_SELCHANGE) { + tabnum = TabCtrl_GetCurSel(GetDlgItem(hDlg, IDRTOTAB)); + RuntimeDlgSetTab(hDlg, tabnum); + } + break; + } + break; } return FALSE; } @@ -202,7 +452,7 @@ void LogAskDialog(BxEvent *event) (DLGPROC)LogAskProc, (LPARAM)event); } -int AskFilename(HWND hwnd, bx_param_filename_c *param) +int AskFilename(HWND hwnd, bx_param_filename_c *param, const char *ext) { OPENFILENAME ofn; int ret; @@ -221,14 +471,20 @@ int AskFilename(HWND hwnd, bx_param_filename_c *param) ofn.nMaxFile = MAX_PATH; ofn.lpstrTitle = title; ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY; - if (param->get_options()->get() & bx_param_filename_c::SAVE_FILE_DIALOG) { + ofn.lpstrDefExt = ext; + if (!lstrcmp(ext, "img")) { + ofn.lpstrFilter = "Floppy image files (*.img)\0*.img\0All files (*.*)\0*.*\0"; + } else if (!lstrcmp(ext, "iso")) { + ofn.lpstrFilter = "CD-ROM image files (*.iso)\0*.iso\0All files (*.*)\0*.*\0"; + } else if (!lstrcmp(ext, "txt")) { ofn.lpstrFilter = "Text files (*.txt)\0*.txt\0All files (*.*)\0*.*\0"; - ofn.lpstrDefExt = "prg"; + } else { + ofn.lpstrFilter = "All files (*.*)\0*.*\0"; + } + if (param->get_options()->get() & bx_param_filename_c::SAVE_FILE_DIALOG) { ofn.Flags |= OFN_OVERWRITEPROMPT; ret = GetSaveFileName(&ofn); } else { - ofn.lpstrFilter = "Floppy image files (*.img)\0*.img\0All files (*.*)\0*.*\0"; - ofn.lpstrDefExt = "img"; ofn.Flags |= OFN_FILEMUSTEXIST; ret = GetOpenFileName(&ofn); } @@ -257,4 +513,16 @@ int FloppyDialog(bx_param_filename_c *param) (DLGPROC)FloppyDlgProc, (LPARAM)param); } +int Cdrom1Dialog() +{ + return DialogBox(NULL, MAKEINTRESOURCE(CDROM1_DLG), GetBochsWindow(), + (DLGPROC)Cdrom1DlgProc); +} + +int RuntimeOptionsDialog() +{ + return DialogBox(NULL, MAKEINTRESOURCE(RUNTIME_DLG), GetBochsWindow(), + (DLGPROC)RuntimeDlgProc); +} + #endif // BX_USE_TEXTCONFIG && defined(WIN32) diff --git a/bochs/gui/win32dialog.h b/bochs/gui/win32dialog.h index 9d5d378a5..b18ecf893 100644 --- a/bochs/gui/win32dialog.h +++ b/bochs/gui/win32dialog.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: win32dialog.h,v 1.6 2004-01-29 18:50:33 vruppert Exp $ +// $Id: win32dialog.h,v 1.7 2004-02-01 01:40:14 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// #include "config.h" @@ -12,8 +12,10 @@ extern "C" { HWND GetBochsWindow(); void LogAskDialog(BxEvent *event); -int AskFilename(HWND hwnd, bx_param_filename_c *param); +int AskFilename(HWND hwnd, bx_param_filename_c *param, const char *ext); int AskString(bx_param_string_c *param); int FloppyDialog(bx_param_filename_c *param); +int Cdrom1Dialog(); +int RuntimeOptionsDialog(); #endif diff --git a/bochs/gui/win32res.h b/bochs/gui/win32res.h index a2f6c2435..9c64760e1 100644 --- a/bochs/gui/win32res.h +++ b/bochs/gui/win32res.h @@ -16,3 +16,37 @@ #define IDBROWSE 2230 #define IDSTATUS 2240 #define IDCREATE 2250 +#define CDROM1_DLG 2300 +#define RUNTIME_DLG 2400 +#define IDRTOTAB 2401 +#define IDGROUP1 2402 +#define IDGROUP2 2403 +#define IDGROUP3 2404 +#define IDGROUP4 2405 +#define IDLABEL1 2406 +#define IDLABEL2 2407 +#define IDLABEL3 2408 +#define IDLABEL4 2409 +#define IDLABEL5 2410 +#define IDLABEL6 2411 +#define IDLABEL7 2412 +#define IDCDROM1 2413 +#define IDCDROM2 2414 +#define IDCDROM3 2415 +#define IDCDROM4 2416 +#define IDBROWSE1 2417 +#define IDBROWSE2 2418 +#define IDBROWSE3 2419 +#define IDBROWSE4 2420 +#define IDSTATUS1 2421 +#define IDSTATUS2 2422 +#define IDSTATUS3 2423 +#define IDSTATUS4 2424 +#define IDLOGOPT1 2430 +#define IDLOGOPT2 2435 +#define IDVGAUPDATE 2440 +#define IDMOUSE 2445 +#define IDKBDPASTE 2450 +#define IDUSERBTN 2455 +#define IDAPPLY 2460 +#define IDINFO 2470 diff --git a/bochs/win32res.rc b/bochs/win32res.rc index 74728f6a6..38a34a7d9 100644 --- a/bochs/win32res.rc +++ b/bochs/win32res.rc @@ -42,3 +42,54 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 95, 70, 50, 14 PUSHBUTTON "Cancel", IDCANCEL, 155, 70, 50, 14 END + +CDROM1_DLG DIALOG 30, 30, 240, 85 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "First CD-ROM image/device" +FONT 8, "Helv" +BEGIN + GROUPBOX "CD-ROM #1", IDGROUP1, 10, 10, 220, 42 + LTEXT "Path", IDLABEL1, 15, 22, 25, 14 + EDITTEXT IDCDROM1, 45, 20, 120, 14, ES_AUTOHSCROLL + PUSHBUTTON "Browse...", IDBROWSE1, 173, 20, 50, 14 + AUTOCHECKBOX "Inserted", IDSTATUS1, 13, 35, 41, 14, BS_LEFTTEXT | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 65, 60, 50, 14 + PUSHBUTTON "Cancel", IDCANCEL, 125, 60, 50, 14 +END + +RUNTIME_DLG DIALOG 30, 30, 260, 215 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Runtime Options" +FONT 8, "Helv" +BEGIN + CONTROL "", IDRTOTAB, "SysTabControl32", 0x1000 | WS_CLIPSIBLINGS | + WS_TABSTOP, 10, 10, 240, 170 + GROUPBOX "CD-ROM #2", IDGROUP2, 20, 30, 220, 42 + LTEXT "Path", IDLABEL2, 25, 42, 25, 14 + EDITTEXT IDCDROM2, 55, 40, 120, 14, ES_AUTOHSCROLL + PUSHBUTTON "Browse...", IDBROWSE2, 183, 40, 50, 14 + AUTOCHECKBOX "Inserted", IDSTATUS2, 23, 55, 41, 14, BS_LEFTTEXT | WS_TABSTOP + GROUPBOX "CD-ROM #3", IDGROUP3, 20, 80, 220, 42 + LTEXT "Path", IDLABEL3, 25, 92, 25, 14 + EDITTEXT IDCDROM3, 55, 90, 120, 14, ES_AUTOHSCROLL + PUSHBUTTON "Browse...", IDBROWSE3, 183, 90, 50, 14 + AUTOCHECKBOX "Inserted", IDSTATUS3, 23, 105, 41, 14, BS_LEFTTEXT | WS_TABSTOP + GROUPBOX "CD-ROM #4", IDGROUP4, 20, 130, 220, 42 + LTEXT "Path", IDLABEL4, 25, 142, 25, 14 + EDITTEXT IDCDROM4, 55, 140, 120, 14, ES_AUTOHSCROLL + PUSHBUTTON "Browse...", IDBROWSE4, 183, 140, 50, 14 + AUTOCHECKBOX "Inserted", IDSTATUS4, 23, 155, 41, 14, BS_LEFTTEXT | WS_TABSTOP + LTEXT "The log options are still present on the console", IDINFO, 30, 37, 150, 14 + PUSHBUTTON "Standard", IDLOGOPT1, 65, 55, 70, 14 + PUSHBUTTON "Advanced", IDLOGOPT2, 65, 75, 70, 14 + LTEXT "VGA update interval", IDLABEL5, 20, 37, 70, 14 + EDITTEXT IDVGAUPDATE, 90, 35, 70, 14, ES_NUMBER + AUTOCHECKBOX "Mouse", IDMOUSE, 18, 55, 81, 14, BS_LEFTTEXT | WS_TABSTOP + LTEXT "Keyboard paste delay", IDLABEL6, 20, 77, 70, 14 + EDITTEXT IDKBDPASTE, 90, 75, 70, 14, ES_NUMBER + LTEXT "Userbutton shortcut", IDLABEL7, 20, 97, 70, 14 + EDITTEXT IDUSERBTN, 90, 95, 70, 14 + DEFPUSHBUTTON "Continue simulation", IDOK, 15, 190, 70, 14 + PUSHBUTTON "Quit simulation", IDCANCEL, 95, 190, 70, 14 + PUSHBUTTON "Apply", IDAPPLY, 175, 190, 70, 14 +END