⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 word.cpp

📁 这是一个俄罗斯方块的源代码
💻 CPP
字号:
// WORD.cpp : implementation file
//

#include "stdafx.h"
#include "俄罗斯方块.h"
#include "WORD.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// WORD dialog


JIMUWORD::JIMUWORD(CWnd* pParent /*=NULL*/)
	: CDialog(JIMUWORD::IDD, pParent)
{
	//{{AFX_DATA_INIT(WORD)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	//以下是名次数据
	OrderNum=0;
	for(int i=0;i<5;i++)
	{
		strcpy(Order[i].Name,"");
    	strcpy(Order[i].Floor,"");
	    strcpy(Order[i].Score,"");
	}
}


void JIMUWORD::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(WORD)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(JIMUWORD, CDialog)
	//{{AFX_MSG_MAP(WORD)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// WORD message handlers

BOOL JIMUWORD::OnInitDialog() 
{
	CDialog::OnInitDialog();
	char temp[10]="";
	for(int i=0;i<5;i++)
	if (strcmp(Order[i].Name,"")!=0)
	{
	OrderText[i].Name.Create(Order[i].Name,WS_CHILD|WS_VISIBLE,CRect(135-strlen(Order[i].Name)*4,87+i*30,135+strlen(Order[i].Name)*4,115+i*30),this,1100);
	OrderText[i].Floor.Create(Order[i].Floor,WS_CHILD|WS_VISIBLE,CRect(195,87+i*30,220,115+i*30),this,1100);
	OrderText[i].Score.Create(Order[i].Score,WS_CHILD|WS_VISIBLE,CRect(265,87+i*30,305,115+i*30),this,1100);
	}
	// TODO: Add extra initialization here
	
	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 + -