📄 prop6.cpp
字号:
// prop6.cpp : implementation file
//
#include "stdafx.h"
#include "MFCpl0.h"
#include "prop6.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Cprop6 property page
IMPLEMENT_DYNCREATE(Cprop6, CPropertyPage)
Cprop6::Cprop6() : CPropertyPage(Cprop6::IDD)
{
//{{AFX_DATA_INIT(Cprop6)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
Cprop6::~Cprop6()
{
}
void Cprop6::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Cprop6)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Cprop6, CPropertyPage)
//{{AFX_MSG_MAP(Cprop6)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Cprop6 message handlers
void Cprop6::Addcodetable(instruction code1[])
{
for(int i=0;i<cxmax;i++)
{
code[i]=code1[i];
}
}
BOOL Cprop6::OnSetActive()
{
((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_DISABLEDFINISH );
CListBox* listbox;
listbox=(CListBox*)(GetDlgItem(IDC_LIST1));
listbox->ResetContent();
CString temps;
for(int i=0;i<cxmax;i++)
{
listbox->AddString("");
}
for(i=0;i<cxmax;i++)
{
switch(code[i].f)
{
case lit:
temps.Format("%3d%s%3d%s%d",i," lit ",code[i].a," ",code[i].l);
break;
case opr:
temps.Format("%3d%s%3d%s%d",i," opr ",code[i].a," ",code[i].l);
break;
case lod:
temps.Format("%3d%s%3d%s%d",i," lod ",code[i].a," ",code[i].l);
break;
case sto:
temps.Format("%3d%s%3d%s%d",i," sto ",code[i].a," ",code[i].l);
break;
case cal:
temps.Format("%3d%s%3d%s%d",i," cal ",code[i].a," ",code[i].l);
break;
case inte:
temps.Format("%3d%s%3d%s%d",i," inte ",code[i].a," ",code[i].l);
break;
case jmp:
temps.Format("%3d%s%3d%s%d",i," jmp ",code[i].a," ",code[i].l);
break;
case jpc:
temps.Format("%3d%s%3d%s%d",i," jpc ",code[i].a," ",code[i].l);
break;
default:
continue;
}
listbox->InsertString(i,temps);
//listbox->AddString(temps);
// MessageBox("Try");
}
return CPropertyPage::OnSetActive();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -