📄 dlgrecorder.cpp
字号:
// DlgRecorder.cpp : implementation file
//
#include "stdafx.h"
#include "LineColor.h"
#include "DlgRecorder.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgRecorder dialog
CDlgRecorder::CDlgRecorder(CWnd* pParent /*=NULL*/)
: CDialog(CDlgRecorder::IDD, pParent)
{
//{{AFX_DATA_INIT(CDlgRecorder)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDlgRecorder::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgRecorder)
DDX_Control(pDX, IDC_MSFLEXGRID, m_MsFlexGrid);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgRecorder, CDialog)
//{{AFX_MSG_MAP(CDlgRecorder)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgRecorder message handlers
void CDlgRecorder::OnOK()
{
CDialog::OnOK();
}
void CDlgRecorder::OnCancel()
{
CDialog::OnCancel();
}
void CDlgRecorder::MoveParm(RECORDER_INFO *ptrRecorder)
{
m_pRecorder = ptrRecorder;
}
BOOL CDlgRecorder::OnInitDialog()
{
CDialog::OnInitDialog();
m_MsFlexGrid.SetCols(4);
m_MsFlexGrid.SetRows(11);
m_MsFlexGrid.SetColAlignment(0, 4);
m_MsFlexGrid.SetColAlignment(1, 4);
m_MsFlexGrid.SetColAlignment(2, 4);
m_MsFlexGrid.SetColAlignment(3, 4);
m_MsFlexGrid.SetTextMatrix(0, 0, "序号");
m_MsFlexGrid.SetTextMatrix(0, 1, "姓名");
m_MsFlexGrid.SetTextMatrix(0, 2, "分数");
m_MsFlexGrid.SetTextMatrix(0, 3, "记录日期");
m_MsFlexGrid.SetColWidth(0, 500);
m_MsFlexGrid.SetColWidth(1, 1500);
m_MsFlexGrid.SetColWidth(2, 800);
m_MsFlexGrid.SetColWidth(3, 1500);
CString str;
for (int y=0; y<10; y++)
{
str.Format("%d", y+1);
m_MsFlexGrid.SetTextMatrix(y+1, 0, str);
str.Format("%s", m_pRecorder[y].szUserName);
m_MsFlexGrid.SetTextMatrix(y+1, 1, str);
str.Format("%d", m_pRecorder[y].nScore);
m_MsFlexGrid.SetTextMatrix(y+1, 2, str);
}
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 + -