91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 4.99MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-10-23
  • 語言: C/C++
  • 標簽: 五子棋??

資源簡介

用VC6.0寫的MFC五子棋代碼,有人人和人機

資源截圖

代碼片段和文件信息

//?STA.cpp?:?implementation?file
//

#include?“stdafx.h“
#include?“Test.h“
#include?“STA.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
#define?IDC_HAND????????????MAKEINTRESOURCE(32649)
/////////////////////////////////////////////////////////////////////////////
//?CSTA
CSTA::CSTA()
{
m_Width=300;
m_Height=300;
m_OneNum=10;
m_nMod=0;
m_MapType=1;
m_pox=NULL;
m_poy=NULL;
m_DrawType=NULL;
m_Result=““;
}

CSTA::~CSTA()
{
}


BEGIN_MESSAGE_MAP(CSTA?CStatic)
//{{AFX_MSG_MAP(CSTA)
ON_WM_PAINT()
ON_WM_SETCURSOR()
ON_WM_LBUTTONDOWN()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
//?CSTA?message?handlers

void?CSTA::OnPaint()?
{
CPaintDC?dc(this);?//?device?context?for?painting
CPen?pen(PS_SOLID1RGB(111));
CPen?*oldpen=dc.Selectobject(&pen);
CRect?rect;
rect.left=0;
rect.top=0;
rect.bottom=m_Height+1;
rect.right=m_Width+1;
this->MoveWindow(&rectTRUE);
DrawMap(m_Widthm_Heightm_OneNumdc);
dc.Selectobject(oldpen);

//////////歷史重繪/////////
CPen?newPen;
CPen?*pNewPen=NULL;
int?xSize=m_Width/m_OneNum;
int?ySize=m_Height/m_OneNum;
int?xySize=(xSize+ySize)/2;
if(m_pox!=NULL?&&?m_poy!=NULL?&&?m_DrawType!=NULL)
{
for(int?i=0;i {
if(m_DrawType[i]==0)
{
newPen.CreatePen(PS_SOLIDxySizeRGB(255255255));
}
else?if(m_DrawType[i]==1)
{
newPen.CreatePen(PS_SOLIDxySizeRGB(000));
}
pNewPen=dc.Selectobject(&newPen);
dc.Ellipse(m_pox[i]m_poy[i]m_pox[i]+1m_poy[i]+1);
dc.Selectobject(pNewPen);
newPen.Deleteobject();
}
}
///////////////////////////
//?TODO:?Add?your?message?handler?code?here
//?Do?not?call?CStatic::OnPaint()?for?painting?messages
}
void?CSTA::DrawMap(int?nWidthint?nHeightint?nNumCPaintDC?&dc)
{
CRect?rect;
this->GetClientRect(&rect);
int?nOneWidth=nWidth/nNum;
int?nOneHeight=nHeight/nNum;
if?(m_pox==NULL?&&?m_poy==NULL?&&?m_DrawType==NULL)
{
m_pox=new?int[nOneHeight*nOneWidth];
m_poy=new?int[nOneHeight*nOneWidth];
m_DrawType=new?int[nOneHeight*nOneWidth];
}
if(m_MapType==1)
{
for?(int?x=0;x<=nWidth;x+=nOneWidth)
{
dc.MoveTo(x0);
dc.LineTo(xrect.Height());
}
for?(int?y=0;y<=nHeight;y+=nOneHeight)
{
dc.MoveTo(0y);
dc.LineTo(rect.Width()y);
}
}
else?if(m_MapType==0)
{
for?(int?x=0;x<=nWidth;x+=nOneWidth/2)
{
dc.MoveTo(x0);
dc.LineTo(xrect.Height());
}
for?(int?y=0;y<=nHeight;y+=nOneHeight/2)
{
dc.MoveTo(0y);
dc.LineTo(rect.Width()y);
}
}
}


BOOL?CSTA::OnSetCursor(CWnd*?pWnd?UINT?nHitTest?UINT?message)?
{
//?TODO:?Add?your?message?handler?code?here?and/or?call?default
::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_HAND));
return?TRUE;
return?CStatic::OnSetCursor(pWnd?nHitTest?message);
}

void?CSTA::OnLButtonDown(UINT?nF

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????31512??2010-12-24?09:35??MFC五子棋\Debug\STA.obj

?????文件??????????0??2010-12-24?09:35??MFC五子棋\Debug\STA.sbr

?????文件?????105632??2010-12-24?09:35??MFC五子棋\Debug\StdAfx.obj

?????文件????1355560??2010-12-24?09:35??MFC五子棋\Debug\StdAfx.sbr

?????文件????3130368??2010-12-24?09:54??MFC五子棋\Debug\Test.bsc

?????文件????2134067??2010-12-24?09:54??MFC五子棋\Debug\Test.exe

?????文件????2491804??2010-12-24?09:54??MFC五子棋\Debug\Test.ilk

?????文件??????12818??2010-12-24?09:54??MFC五子棋\Debug\Test.obj

?????文件????6968980??2010-12-24?09:35??MFC五子棋\Debug\Test.pch

?????文件????4088832??2010-12-24?09:54??MFC五子棋\Debug\Test.pdb

?????文件???????8956??2010-12-24?09:54??MFC五子棋\Debug\Test.res

?????文件??????????0??2010-12-24?09:54??MFC五子棋\Debug\Test.sbr

?????文件??????34276??2010-12-24?09:54??MFC五子棋\Debug\TestDlg.obj

?????文件??????????0??2010-12-24?09:54??MFC五子棋\Debug\TestDlg.sbr

?????文件?????197632??2010-12-24?10:02??MFC五子棋\Debug\vc60.idb

?????文件?????372736??2010-12-24?09:54??MFC五子棋\Debug\vc60.pdb

?????文件????????766??2008-09-26?14:17??MFC五子棋\icon1.ico

?????文件???????3543??2008-09-24?09:27??MFC五子棋\ReadMe.txt

?????文件???????1078??2008-09-24?09:27??MFC五子棋\res\Test.ico

?????文件????????396??2008-09-24?09:27??MFC五子棋\res\Test.rc2

?????文件???????1096??2010-12-24?09:54??MFC五子棋\resource.h

?????文件??????10030??2008-09-26?13:29??MFC五子棋\STA.cpp

?????文件???????1607??2008-09-26?13:18??MFC五子棋\STA.h

?????文件????????206??2008-09-24?09:27??MFC五子棋\StdAfx.cpp

?????文件???????1054??2008-09-24?09:27??MFC五子棋\StdAfx.h

?????文件??????36596??2010-12-24?09:54??MFC五子棋\Test.aps

?????文件???????2099??2010-12-24?10:04??MFC五子棋\Test.clw

?????文件???????2035??2008-09-24?09:27??MFC五子棋\Test.cpp

?????文件???????4274??2008-09-26?15:25??MFC五子棋\Test.dsp

?????文件????????533??2008-09-24?20:55??MFC五子棋\Test.dsw

............此處省略14個文件信息

評論

共有 條評論