?? mydialog.cpp
字號:
// MyDialog.cpp : implementation file
//
#include "stdafx.h"
#include "畢業設計數字邏輯電子仿真器.h"
#include "MyDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyDialog dialog
CMyDialog::CMyDialog(CWnd* pParent /*=NULL*/)
: CDialog(CMyDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CMyDialog)
m_MyCaption = _T("");
//}}AFX_DATA_INIT
}
void CMyDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMyDialog)
DDX_Control(pDX, IDC_Output, m_OutputList);
DDX_Text(pDX, IDC_MYSTATIC, m_MyCaption);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMyDialog, CDialog)
//{{AFX_MSG_MAP(CMyDialog)
ON_LBN_SELCHANGE(IDC_Output, OnSelchangeOutput)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyDialog message handlers
void CMyDialog::OnSelchangeOutput()
{
// TODO: Add your control notification handler code here
}
BOOL CMyDialog::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
//引用view.cpp中的x,計算要循環的次數以加入列表框
extern int x;
//引用view.cpp中的strs,用于加入字符串到列表框
extern CArray<CString,CString&> strs;
//引用view.cpp中的輸入結點個數n
extern int n;
//開始加入字符串到列表框
for(int i=0;i<x;i++)
{
m_OutputList.AddString (strs[i]);
}
//定義一個CString str用于格式化字符串
m_MyCaption="輸入端:";
CString str;
for(i=1;i<=n;i++)
{
str.Format("%d ",i);
m_MyCaption+=str;
}
str.Format ("\t輸出端");
m_MyCaption+=str;
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -