|
|
| version 1.12, 2005/02/09 20:11:36 | version 1.13, 2005/03/20 13:12:50 |
|---|---|
| Line 2 | Line 2 |
| #include "strres.h" | #include "strres.h" |
| #include "resource.h" | #include "resource.h" |
| #include "np2.h" | #include "np2.h" |
| #include "oemtext.h" | |
| #include "dosio.h" | #include "dosio.h" |
| #include "sysmng.h" | #include "sysmng.h" |
| #include "toolwin.h" | #include "toolwin.h" |
| Line 13 | Line 14 |
| #include "newdisk.h" | #include "newdisk.h" |
| static const OEMCHAR fddui_title[] = OEMTEXT("Select floppy image"); | static const TCHAR fddui_title[] = _T("Select floppy image"); |
| static const OEMCHAR fddui_filter[] = OEMTEXT("D88 image files (*.D88;*.D98)\0*.d88;*.88d;*.d98;*.98d\0Floppy disk images (*.XDF;*.HDM;*.DUP;*.2HD)\0*.xdf;*.hdm;*.dup;*.2hd;*.tfd\0All supported Files\0*.d88;*.88d;*.d98;*.98d;*.fdi;*.xdf;*.hdm;*.dup;*.2hd;*.tfd\0All files (*.*)\0*.*\0"); | static const TCHAR fddui_filter[] = \ |
| static const FILESEL fddui = {fddui_title, str_d88, fddui_filter, 3}; | _T("D88 image files (*.D88;*.D98)\0") \ |
| _T("*.d88;*.88d;*.d98;*.98d\0") \ | |
| _T("Floppy disk images (*.XDF;*.HDM;*.DUP;*.2HD)\0") \ | |
| _T("*.xdf;*.hdm;*.dup;*.2hd;*.tfd\0") \ | |
| _T("All supported Files\0") \ | |
| _T("*.d88;*.88d;*.d98;*.98d;*.fdi;") \ | |
| _T("*.xdf;*.hdm;*.dup;*.2hd;*.tfd\0") \ | |
| _T("All files (*.*)\0*.*\0"); | |
| static const FILESEL fddui = {fddui_title, tchar_d88, fddui_filter, 3}; | |
| #if defined(SUPPORT_SASI) | #if defined(SUPPORT_SASI) |
| static const OEMCHAR sasiui_title[] = OEMTEXT("Select SASI/IDE HDD image"); | static const TCHAR sasiui_title[] = _T("Select SASI/IDE HDD image"); |
| #else | #else |
| static const OEMCHAR sasiui_title[] = OEMTEXT("Select HDD image"); | static const TCHAR sasiui_title[] = _T("Select HDD image"); |
| #endif | #endif |
| static const OEMCHAR sasiui_filter[] = OEMTEXT("Anex86 harddisk image files (*.HDI)\0*.hdi\0T98 harddisk image files (*.THD)\0*.thd\0T98-Next harddisk image files (*.NHD)\0*.nhd\0All supported Files\0*.thd;*.nhd;*.hdi\0"); | static const TCHAR sasiui_filter[] = \ |
| static const FILESEL sasiui = {sasiui_title, str_thd, sasiui_filter, 4}; | _T("Anex86 harddisk image files (*.HDI)\0") \ |
| _T("*.hdi\0") \ | |
| _T("T98 harddisk image files (*.THD)\0") \ | |
| _T("*.thd\0") \ | |
| _T("T98-Next harddisk image files (*.NHD)\0") \ | |
| _T("*.nhd\0") \ | |
| _T("All supported Files\0") \ | |
| _T("*.thd;*.nhd;*.hdi\0"); | |
| static const FILESEL sasiui = {sasiui_title, tchar_thd, sasiui_filter, 4}; | |
| #if defined(SUPPORT_SCSI) | #if defined(SUPPORT_SCSI) |
| static const OEMCHAR scsiui_title[] = OEMTEXT("Select SCSI HDD image"); | static const TCHAR scsiui_title[] = _T("Select SCSI HDD image"); |
| static const OEMCHAR scsiui_filter[] = OEMTEXT("Virtual98 harddisk image files (*.HDD)\0*.hdd\0"); | static const TCHAR scsiui_filter[] = \ |
| static const FILESEL scsiui = {scsiui_title, str_hdd, scsiui_filter, 1}; | _T("Virtual98 harddisk image files (*.HDD)\0") \ |
| _T("*.hdd\0"); | |
| static const FILESEL scsiui = {scsiui_title, tchar_hdd, scsiui_filter, 1}; | |
| #endif | #endif |
| static const OEMCHAR newdisk_title[] = OEMTEXT("Create disk image"); | static const TCHAR newdisk_title[] = _T("Create disk image"); |
| #if defined(SUPPORT_SCSI) | #if defined(SUPPORT_SCSI) |
| static const OEMCHAR newdisk_filter[] = OEMTEXT("D88 image files (*.D88;*.88D)\0*.d88;*.88d;*.d98;*.98d\0Anex86 harddisk image files (*.HDI)\0*.hdi\0T98 harddisk image files (*.THD)\0*.thd\0T98-Next harddisk image files (*.NHD)\0*.nhd\0Virtual98 harddisk image files (*.HDD)\0*.hdd\0"); | static const TCHAR newdisk_filter[] = \ |
| _T("D88 image files (*.D88;*.88D)\0") \ | |
| _T("*.d88;*.88d;*.d98;*.98d\0") \ | |
| _T("Anex86 harddisk image files (*.HDI)\0") \ | |
| _T("*.hdi\0") \ | |
| _T("T98 harddisk image files (*.THD)\0") \ | |
| _T("*.thd\0") \ | |
| _T("T98-Next harddisk image files (*.NHD)\0") \ | |
| _T("*.nhd\0") \ | |
| _T("Virtual98 harddisk image files (*.HDD)\0") \ | |
| _T("*.hdd\0"); | |
| #else | #else |
| static const OEMCHAR newdisk_filter[] = OEMTEXT("D88 image files (*.D88;*.88D)\0*.d88;*.88d;*.d98;*.98d\0Anex86 harddisk image files (*.HDI)\0*.hdi\0T98 harddisk image files (*.THD)\0*.thd\0T98-Next harddisk image files (*.NHD)\0*.nhd\0"); | static const TCHAR newdisk_filter[] = \ |
| _T("D88 image files (*.D88;*.88D)\0") \ | |
| _T("*.d88;*.88d;*.d98;*.98d\0") \ | |
| _T("Anex86 harddisk image files (*.HDI)\0") \ | |
| _T("*.hdi\0") \ | |
| _T("T98 harddisk image files (*.THD)\0") \ | |
| _T("*.thd\0") \ | |
| _T("T98-Next harddisk image files (*.NHD)\0") \ | |
| _T("*.nhd\0"); | |
| #endif | #endif |
| static const FILESEL newdiskui = {newdisk_title, str_d88, newdisk_filter, 1}; | static const FILESEL newdiskui = {newdisk_title, tchar_d88, newdisk_filter, 1}; |
| // ---- | // ---- |
| Line 122 static LRESULT CALLBACK NewHddDlgProc(HW | Line 159 static LRESULT CALLBACK NewHddDlgProc(HW |
| WPARAM wp, LPARAM lp) { | WPARAM wp, LPARAM lp) { |
| UINT val; | UINT val; |
| OEMCHAR work[32]; | TCHAR work[32]; |
| switch (msg) { | switch (msg) { |
| case WM_INITDIALOG: | case WM_INITDIALOG: |
| SETLISTUINT32(hWnd, IDC_HDDSIZE, hddsizetbl); | SETLISTUINT32(hWnd, IDC_HDDSIZE, hddsizetbl); |
| OEMSPRINTF(work, OEMTEXT("(%d-%dMB)"), hddminsize, hddmaxsize); | wsprintf(work, _T("(%d-%dMB)"), hddminsize, hddmaxsize); |
| SetWindowText(GetDlgItem(hWnd, IDC_HDDLIMIT), work); | SetWindowText(GetDlgItem(hWnd, IDC_HDDLIMIT), work); |
| SetFocus(GetDlgItem(hWnd, IDC_HDDSIZE)); | SetFocus(GetDlgItem(hWnd, IDC_HDDSIZE)); |
| return(FALSE); | return(FALSE); |
| Line 137 static LRESULT CALLBACK NewHddDlgProc(HW | Line 174 static LRESULT CALLBACK NewHddDlgProc(HW |
| case IDOK: | case IDOK: |
| GetWindowText(GetDlgItem(hWnd, IDC_HDDSIZE), | GetWindowText(GetDlgItem(hWnd, IDC_HDDSIZE), |
| work, NELEMENTS(work)); | work, NELEMENTS(work)); |
| val = (UINT)milstr_solveINT(work); | val = (UINT)miltchar_solveINT(work); |
| if (val < hddminsize) { | if (val < hddminsize) { |
| val = hddminsize; | val = hddminsize; |
| } | } |
| Line 215 static LRESULT CALLBACK NewdiskDlgProc(H | Line 252 static LRESULT CALLBACK NewdiskDlgProc(H |
| WPARAM wp, LPARAM lp) { | WPARAM wp, LPARAM lp) { |
| UINT16 res; | UINT16 res; |
| #if defined(OSLANG_UTF8) | |
| TCHAR buf[17]; | |
| #endif | |
| switch (msg) { | switch (msg) { |
| case WM_INITDIALOG: | case WM_INITDIALOG: |
| Line 238 static LRESULT CALLBACK NewdiskDlgProc(H | Line 278 static LRESULT CALLBACK NewdiskDlgProc(H |
| case WM_COMMAND: | case WM_COMMAND: |
| switch(LOWORD(wp)) { | switch(LOWORD(wp)) { |
| case IDOK: | case IDOK: |
| #if defined(OSLANG_UTF8) | |
| GetWindowText(GetDlgItem(hWnd, IDC_DISKLABEL), | |
| buf, NELEMENTS(buf)); | |
| tchartooem(disklabel, NELEMENTS(disklabel), buf, -1); | |
| #else | |
| GetWindowText(GetDlgItem(hWnd, IDC_DISKLABEL), | GetWindowText(GetDlgItem(hWnd, IDC_DISKLABEL), |
| disklabel, NELEMENTS(disklabel)); | disklabel, NELEMENTS(disklabel)); |
| if (milstr_kanji1st(disklabel, NELEMENTS(disklabel) - 1)) { | if (milstr_kanji1st(disklabel, NELEMENTS(disklabel) - 1)) { |
| disklabel[NELEMENTS(disklabel) - 1] = '\0'; | disklabel[NELEMENTS(disklabel) - 1] = '\0'; |
| } | } |
| #endif | |
| if (GetDlgItemCheck(hWnd, IDC_MAKE2DD)) { | if (GetDlgItemCheck(hWnd, IDC_MAKE2DD)) { |
| makefdtype = (DISKTYPE_2DD << 4); | makefdtype = (DISKTYPE_2DD << 4); |
| } | } |