2015-12-23 20:41:06 +00:00
|
|
|
#include "stdafx.h"
|
2022-09-21 05:16:07 +00:00
|
|
|
|
2021-04-14 05:34:15 +00:00
|
|
|
#include "RomInformation.h"
|
|
|
|
#include <Project64-core/N64System/N64Disk.h>
|
2015-12-23 20:41:06 +00:00
|
|
|
|
|
|
|
RomInformation::RomInformation(const char * RomFile) :
|
2019-11-09 20:34:24 +00:00
|
|
|
m_DeleteRomInfo(true),
|
|
|
|
m_DeleteDiskInfo(true),
|
|
|
|
m_FileName(RomFile ? RomFile : ""),
|
2021-04-12 11:35:39 +00:00
|
|
|
m_pRomInfo(nullptr),
|
|
|
|
m_pDiskInfo(nullptr)
|
2015-12-23 20:41:06 +00:00
|
|
|
{
|
|
|
|
if (m_FileName.length() == 0) { return; }
|
2019-08-11 16:13:52 +00:00
|
|
|
if ((CPath(m_FileName).GetExtension() != "ndd") && (CPath(m_FileName).GetExtension() != "d64"))
|
2019-01-25 20:32:26 +00:00
|
|
|
{
|
|
|
|
m_pRomInfo = new CN64Rom;
|
|
|
|
if (!m_pRomInfo->LoadN64Image(m_FileName.c_str()))
|
|
|
|
{
|
|
|
|
delete m_pRomInfo;
|
2021-04-12 11:35:39 +00:00
|
|
|
m_pRomInfo = nullptr;
|
2019-01-25 20:32:26 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_pDiskInfo = new CN64Disk;
|
|
|
|
if (!m_pDiskInfo->LoadDiskImage(m_FileName.c_str()))
|
|
|
|
{
|
|
|
|
delete m_pDiskInfo;
|
2021-04-12 11:35:39 +00:00
|
|
|
m_pDiskInfo = nullptr;
|
2019-01-25 20:32:26 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2015-12-23 20:41:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
RomInformation::RomInformation(CN64Rom * RomInfo) :
|
2019-11-09 20:34:24 +00:00
|
|
|
m_DeleteRomInfo(false),
|
|
|
|
m_DeleteDiskInfo(false),
|
|
|
|
m_FileName(RomInfo ? RomInfo->GetFileName().c_str() : ""),
|
|
|
|
m_pRomInfo(RomInfo),
|
2021-04-12 11:35:39 +00:00
|
|
|
m_pDiskInfo(nullptr)
|
2015-12-23 20:41:06 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-01-25 07:11:40 +00:00
|
|
|
RomInformation::RomInformation(CN64Disk * DiskInfo) :
|
2019-11-09 20:34:24 +00:00
|
|
|
m_DeleteRomInfo(false),
|
|
|
|
m_DeleteDiskInfo(false),
|
|
|
|
m_FileName(DiskInfo ? DiskInfo->GetFileName().c_str() : ""),
|
2021-04-12 11:35:39 +00:00
|
|
|
m_pRomInfo(nullptr),
|
2019-11-09 20:34:24 +00:00
|
|
|
m_pDiskInfo(DiskInfo)
|
2019-01-25 07:11:40 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-12-23 20:41:06 +00:00
|
|
|
RomInformation::~RomInformation()
|
|
|
|
{
|
|
|
|
if (m_DeleteRomInfo)
|
|
|
|
delete m_pRomInfo;
|
2019-01-25 20:32:26 +00:00
|
|
|
if (m_DeleteDiskInfo)
|
|
|
|
delete m_pDiskInfo;
|
2015-12-23 20:41:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#include <windows.h>
|
2015-12-23 21:32:39 +00:00
|
|
|
void RomInformation::DisplayInformation(HWND hParent) const
|
|
|
|
{
|
2015-12-23 20:41:06 +00:00
|
|
|
if (m_FileName.length() == 0) { return; }
|
|
|
|
|
2021-04-12 11:35:39 +00:00
|
|
|
DialogBoxParam(GetModuleHandle(nullptr), MAKEINTRESOURCE(IDD_Rom_Information), hParent, (DLGPROC)RomInfoProc, (DWORD)this);
|
2015-12-23 20:41:06 +00:00
|
|
|
}
|
|
|
|
|
2015-12-23 21:32:39 +00:00
|
|
|
DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam)
|
|
|
|
{
|
|
|
|
switch (uMsg)
|
|
|
|
{
|
2015-12-23 20:41:06 +00:00
|
|
|
case WM_INITDIALOG:
|
|
|
|
{
|
2021-03-17 08:32:40 +00:00
|
|
|
// Record class for future usage
|
2020-05-12 12:19:05 +00:00
|
|
|
SetProp(hDlg, L"this", (RomInformation *)lParam);
|
2019-01-25 20:32:26 +00:00
|
|
|
RomInformation * _this = (RomInformation *)lParam;
|
|
|
|
|
2021-04-12 11:35:39 +00:00
|
|
|
if (_this->m_pDiskInfo == nullptr)
|
2019-01-25 20:32:26 +00:00
|
|
|
{
|
2021-01-02 03:37:00 +00:00
|
|
|
SetWindowText(hDlg, wGS(INFO_TITLE).c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_ROM_NAME, wGS(INFO_ROM_NAME_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_FILE_NAME, wGS(INFO_FILE_NAME_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_LOCATION, wGS(INFO_LOCATION_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_ROM_MD5, wGS(INFO_MD5_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_ROM_SIZE, wGS(INFO_SIZE_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_CART_ID, wGS(INFO_CART_ID_TEXT).c_str());
|
2021-01-11 00:58:44 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_MEDIA, wGS(INFO_MEDIA_TEXT).c_str());
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_COUNTRY, wGS(INFO_COUNTRY_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_CRC1, wGS(INFO_CRC1_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_CRC2, wGS(INFO_CRC2_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_CIC_CHIP, wGS(INFO_CIC_CHIP_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_CLOSE_BUTTON, wGS(BOTTOM_CLOSE).c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_ROMNAME, stdstr(_this->m_pRomInfo->GetRomName()).ToUTF16(stdstr::CODEPAGE_932).c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_FILENAME, stdstr(CPath(_this->m_pRomInfo->GetFileName()).GetNameExtension()).ToUTF16(CP_ACP).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_INFO_LOCATION, stdstr(CPath(_this->m_pRomInfo->GetFileName()).GetDriveDirectory()).ToUTF16(CP_ACP).c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_MD5, stdstr(_this->m_pRomInfo->GetRomMD5()).ToUTF16().c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_INFO_ROMSIZE, stdstr_f("%.1f MBit", (float)_this->m_pRomInfo->GetRomSize() / 0x20000).ToUTF16().c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
|
|
|
BYTE * RomHeader = _this->m_pRomInfo->GetRomAddress();
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_CARTID, stdstr_f("%c%c", RomHeader[0x3F], RomHeader[0x3E]).ToUTF16().c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
|
|
|
switch (RomHeader[0x38])
|
|
|
|
{
|
2021-01-11 00:58:44 +00:00
|
|
|
case 'C': SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"N64 Cartridge (Disk Compatible)"); break;
|
2022-08-15 11:55:14 +00:00
|
|
|
case 'M': SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"N64 Development Cartridge"); break;
|
2021-01-11 00:58:44 +00:00
|
|
|
case 'N': SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"N64 Cartridge"); break;
|
|
|
|
case 'Z': SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"Aleck64"); break;
|
|
|
|
case 0: SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"None"); break;
|
|
|
|
default: SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"(Unknown)"); break;
|
2019-01-25 20:32:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
switch (RomHeader[0x3D])
|
|
|
|
{
|
2021-01-02 03:37:00 +00:00
|
|
|
case Country_NTSC_BETA: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Beta"); break;
|
|
|
|
case Country_Asian_NTSC: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"NTSC"); break;
|
|
|
|
case Country_Germany: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Germany"); break;
|
|
|
|
case Country_NorthAmerica: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"America"); break;
|
|
|
|
case Country_French: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"France"); break;
|
|
|
|
case Country_Italian: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Italy"); break;
|
|
|
|
case Country_Japan: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Japan"); break;
|
|
|
|
case Country_Europe: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Europe"); break;
|
|
|
|
case Country_Spanish: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Spain"); break;
|
|
|
|
case Country_Australia: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Australia"); break;
|
|
|
|
case Country_EuropeanX_PAL: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"PAL"); break;
|
|
|
|
case Country_EuropeanY_PAL: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"PAL"); break;
|
|
|
|
case Country_Unknown: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"None"); break;
|
2019-01-25 20:32:26 +00:00
|
|
|
default:
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_COUNTRY, stdstr_f(" Unknown %c (%02X)", RomHeader[0x3D], RomHeader[0x3D]).ToUTF16().c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
}
|
2019-08-11 11:30:51 +00:00
|
|
|
|
|
|
|
switch (_this->m_pRomInfo->CicChipID())
|
|
|
|
{
|
|
|
|
case CIC_NUS_8303:
|
|
|
|
case CIC_NUS_DDUS:
|
2021-10-04 23:24:36 +00:00
|
|
|
case CIC_NUS_8401:
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_CRC1, stdstr_f("0x%08X", (*(uint16_t *)(RomHeader + 0x608) << 16) | *(uint16_t *)(RomHeader + 0x60C)).ToUTF16().c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_INFO_CRC2, stdstr_f("0x%08X", (*(uint16_t *)(RomHeader + 0x638) << 16) | *(uint16_t *)(RomHeader + 0x63C)).ToUTF16().c_str());
|
2019-08-11 11:30:51 +00:00
|
|
|
break;
|
|
|
|
default:
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_CRC1, stdstr_f("0x%08X", *(uint32_t *)(RomHeader + 0x10)).ToUTF16().c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_INFO_CRC2, stdstr_f("0x%08X", *(DWORD *)(RomHeader + 0x14)).ToUTF16().c_str());
|
2019-08-11 11:30:51 +00:00
|
|
|
break;
|
|
|
|
}
|
2019-01-25 20:32:26 +00:00
|
|
|
|
|
|
|
std::wstring CicChip;
|
|
|
|
switch (_this->m_pRomInfo->CicChipID())
|
|
|
|
{
|
|
|
|
case CIC_UNKNOWN: CicChip = L"Unknown"; break;
|
|
|
|
case CIC_NUS_8303: CicChip = L"CIC-NUS-8303"; break;
|
|
|
|
case CIC_NUS_5167: CicChip = L"CIC-NUS-5167"; break;
|
2021-10-04 23:24:36 +00:00
|
|
|
case CIC_NUS_5101: CicChip = L"CIC-NUS-5101"; break;
|
2019-01-25 20:32:26 +00:00
|
|
|
case CIC_NUS_DDUS: CicChip = L"CIC-NUS-????"; break;
|
2021-10-04 23:24:36 +00:00
|
|
|
case CIC_NUS_8401: CicChip = L"CIC-NUS-8401"; break;
|
2019-01-25 20:32:26 +00:00
|
|
|
default: CicChip = stdstr_f("CIC-NUS-610%d", _this->m_pRomInfo->CicChipID()).ToUTF16(); break;
|
|
|
|
}
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_CIC, CicChip.c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-01-02 03:37:00 +00:00
|
|
|
SetWindowText(hDlg, wGS(INFO_TITLE).c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_ROM_NAME, wGS(INFO_ROM_NAME_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_FILE_NAME, wGS(INFO_FILE_NAME_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_LOCATION, wGS(INFO_LOCATION_TEXT).c_str());
|
2022-01-20 23:24:39 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_ROM_MD5, wGS(INFO_MD5_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_ROM_SIZE, wGS(INFO_SIZE_TEXT).c_str());
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_CART_ID, wGS(INFO_CART_ID_TEXT).c_str());
|
2022-01-20 23:24:39 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_MEDIA, wGS(INFO_MEDIA_TEXT).c_str());
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_COUNTRY, wGS(INFO_COUNTRY_TEXT).c_str());
|
2022-01-20 23:24:39 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_CRC1, wGS(INFO_CRC1_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_CRC2, wGS(INFO_CRC2_TEXT).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_CIC_CHIP, wGS(INFO_CIC_CHIP_TEXT).c_str());
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_CLOSE_BUTTON, wGS(BOTTOM_CLOSE).c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_ROMNAME, _this->m_pDiskInfo->GetRomName().ToUTF16(stdstr::CODEPAGE_932).c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_FILENAME, stdstr(CPath(_this->m_pDiskInfo->GetFileName()).GetNameExtension()).ToUTF16(CP_ACP).c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_INFO_LOCATION, stdstr(CPath(_this->m_pDiskInfo->GetFileName()).GetDriveDirectory()).ToUTF16(CP_ACP).c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
2021-01-02 03:37:00 +00:00
|
|
|
//SetDlgItemText(hDlg, IDC_INFO_MD5, _this->m_pRomInfo->GetRomMD5().ToUTF16().c_str());
|
2022-01-20 23:24:39 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_ROMSIZE, stdstr_f("%.1f MBit", (float)_this->m_pDiskInfo->GetDiskSize() / 0x20000).ToUTF16().c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
2019-08-12 15:50:04 +00:00
|
|
|
BYTE * DiskHeader = _this->m_pDiskInfo->GetDiskAddressID();
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_CARTID, stdstr_f("%c%c", DiskHeader[0x02], DiskHeader[0x01]).ToUTF16().c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
|
2022-01-20 23:24:39 +00:00
|
|
|
switch (DiskHeader[0x03])
|
2019-01-25 20:32:26 +00:00
|
|
|
{
|
2021-01-11 01:27:37 +00:00
|
|
|
case 'D': SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"64DD Disk"); break;
|
2022-01-20 23:24:39 +00:00
|
|
|
case 'E': SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"64DD Disk (Expansion)"); break;
|
2021-01-11 00:58:44 +00:00
|
|
|
case 0: SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"None"); break;
|
|
|
|
default: SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"(Unknown)"); break;
|
2022-01-20 23:24:39 +00:00
|
|
|
}
|
2019-01-25 20:32:26 +00:00
|
|
|
|
|
|
|
switch (DiskHeader[0x00])
|
|
|
|
{
|
2021-01-02 03:37:00 +00:00
|
|
|
case Country_NTSC_BETA: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Beta"); break;
|
|
|
|
case Country_Asian_NTSC: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"NTSC"); break;
|
|
|
|
case Country_Germany: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Germany"); break;
|
|
|
|
case Country_NorthAmerica: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"America"); break;
|
|
|
|
case Country_French: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"France"); break;
|
|
|
|
case Country_Italian: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Italy"); break;
|
|
|
|
case Country_Japan: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Japan"); break;
|
|
|
|
case Country_Europe: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Europe"); break;
|
|
|
|
case Country_Spanish: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Spain"); break;
|
|
|
|
case Country_Australia: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Australia"); break;
|
|
|
|
case Country_EuropeanX_PAL: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"PAL"); break;
|
|
|
|
case Country_EuropeanY_PAL: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"PAL"); break;
|
|
|
|
case Country_Unknown: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"None"); break;
|
2019-01-25 20:32:26 +00:00
|
|
|
default:
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_COUNTRY, stdstr_f(" Unknown %c (%02X)", DiskHeader[0x03], DiskHeader[0x03]).ToUTF16().c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
}
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_CRC1, stdstr_f("0x%08X", (_this->m_pDiskInfo->CalculateCrc())).ToUTF16().c_str());
|
|
|
|
SetDlgItemText(hDlg, IDC_INFO_CRC2, stdstr_f("0x%08X", (~_this->m_pDiskInfo->CalculateCrc())).ToUTF16().c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
/*
|
|
|
|
std::wstring CicChip;
|
|
|
|
switch (_this->m_pRomInfo->CicChipID())
|
|
|
|
{
|
|
|
|
case CIC_UNKNOWN: CicChip = L"Unknown"; break;
|
|
|
|
case CIC_NUS_8303: CicChip = L"CIC-NUS-8303"; break;
|
|
|
|
case CIC_NUS_5167: CicChip = L"CIC-NUS-5167"; break;
|
|
|
|
case CIC_NUS_DDUS: CicChip = L"CIC-NUS-????"; break;
|
|
|
|
default: CicChip = stdstr_f("CIC-NUS-610%d", _this->m_pRomInfo->CicChipID()).ToUTF16(); break;
|
|
|
|
}
|
2021-01-02 03:37:00 +00:00
|
|
|
SetDlgItemText(hDlg, IDC_INFO_CIC, CicChip.c_str());
|
2019-01-25 20:32:26 +00:00
|
|
|
*/
|
|
|
|
}
|
2015-12-23 20:41:06 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case WM_COMMAND:
|
2015-12-23 21:32:39 +00:00
|
|
|
switch (LOWORD(wParam))
|
|
|
|
{
|
2015-12-23 20:41:06 +00:00
|
|
|
case IDCANCEL:
|
2020-05-12 12:19:05 +00:00
|
|
|
RemoveProp(hDlg, L"this");
|
2015-12-23 20:41:06 +00:00
|
|
|
EndDialog(hDlg, 0);
|
|
|
|
break;
|
|
|
|
case IDC_CLOSE_BUTTON:
|
2020-05-12 12:19:05 +00:00
|
|
|
RemoveProp(hDlg, L"this");
|
2015-12-23 20:41:06 +00:00
|
|
|
EndDialog(hDlg, 0);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
2015-12-26 08:11:13 +00:00
|
|
|
}
|