forked from tianzhansheng/virtuanessrc097
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRomInfoDlg.cpp
78 lines (60 loc) · 4.05 KB
/
RomInfoDlg.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//
// ROM情報ダイアログクラス
//
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <string>
using namespace std;
#include "VirtuaNESres.h"
#include "DebugOut.h"
#include "App.h"
#include "Pathlib.h"
#include "Wnd.h"
#include "RomInfoDlg.h"
DLG_MESSAGE_BEGIN(CRomInfoDlg)
DLG_ON_MESSAGE( WM_INITDIALOG, OnInitDialog )
DLG_COMMAND_BEGIN()
DLG_ON_COMMAND( IDOK, OnOK )
DLG_ON_COMMAND( IDCANCEL, OnCancel )
DLG_COMMAND_END()
DLG_MESSAGE_END()
INT CRomInfoDlg::DoModal( HWND hWndParent )
{
return ::DialogBoxParam( CApp::GetPlugin(), MAKEINTRESOURCE(IDD_ROMINFO),
hWndParent, g_DlgProc, (LPARAM)this );
}
DLGMSG CRomInfoDlg::OnInitDialog( DLGMSGPARAM )
{
// DEBUGOUT( "CRomInfoDlg::OnInitDialog\n" );
::SetDlgItemText( m_hWnd, IDC_ROM_NAME, m_szName );
CHAR szStr[64];
if( m_nMapper < 256 ) ::wsprintf( szStr, "%d", m_nMapper );
else ::wsprintf( szStr, "NSF" );
::SetDlgItemText( m_hWnd, IDC_ROM_MAPPER, szStr );
::wsprintf( szStr, "%dKB", m_nPRG*16 );
::SetDlgItemText( m_hWnd, IDC_ROM_PRG, szStr );
::wsprintf( szStr, "%dKB", m_nCHR*8 );
::SetDlgItemText( m_hWnd, IDC_ROM_CHR, szStr );
::SetDlgItemText( m_hWnd, IDC_ROM_MIRROR, m_bMirror?"V":"H" );
::SetDlgItemText( m_hWnd, IDC_ROM_SRAM, m_bSram?"Yes":"No" );
::SetDlgItemText( m_hWnd, IDC_ROM_4SCREEN, m_b4Screen?"Yes":"No" );
::SetDlgItemText( m_hWnd, IDC_ROM_TRAINER, m_bTrainer?"Yes":"No" );
::SetDlgItemText( m_hWnd, IDC_ROM_VSUNISYSTEM, m_bVSUnisystem?"Yes":"No" );
::wsprintf( szStr, "%08X", m_dwCRC );
::SetDlgItemText( m_hWnd, IDC_ROM_CRC, szStr );
::wsprintf( szStr, "%08X", m_dwCRCALL );
::SetDlgItemText( m_hWnd, IDC_ROM_CRCALL, szStr );
::wsprintf( szStr, "%08X", m_dwCRCCHR );
::SetDlgItemText( m_hWnd, IDC_ROM_CRCCHR, szStr );
return TRUE;
}
DLGCMD CRomInfoDlg::OnOK( DLGCMDPARAM )
{
// DEBUGOUT( "CRomInfoDlg::OnOK\n" );
::EndDialog( m_hWnd, IDOK );
}
DLGCMD CRomInfoDlg::OnCancel( DLGCMDPARAM )
{
// DEBUGOUT( "CRomInfoDlg::OnCancel\n" );
::EndDialog( m_hWnd, IDCANCEL );
}