Структура вычислительной системы: трехмерная с размерностью 4х4х3, страница 13

                  //}}AFX_MSG

                  DECLARE_MESSAGE_MAP()

};

// MainFrm.cpp : implementation of the CMainFrame class

//

#include "stdafx.h"

#include "vkss1.h"

#include "MainFrm.h"

#ifdef _DEBUG

#define new DEBUG_NEW

#undef THIS_FILE

static char THIS_FILE[] = __FILE__;

#endif

/////////////////////////////////////////////////////////////////////////////

// CMainFrame

IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)

BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)

                  //{{AFX_MSG_MAP(CMainFrame)

                  ON_WM_CREATE()

                  //}}AFX_MSG_MAP

END_MESSAGE_MAP()

static UINT indicators[] =

{

                  ID_SEPARATOR,           // status line indicator

                  ID_INDICATOR_CAPS,

                  ID_INDICATOR_NUM,

                  ID_INDICATOR_SCRL,

};

/////////////////////////////////////////////////////////////////////////////

// CMainFrame construction/destruction

CMainFrame::CMainFrame()

{for(int i=0;i<48;i++){pcpumf[i]=NULL;}

//VDlg1=NULL;

for(int k=0;k<16;k++)

{pl1[k][0]=pl1[k][1]=pl1[k][2]=pl1[k][3]=0;

pl2[k][0]=pl2[k][1]=pl2[k][2]=pl2[k][3]=0;

pl3[k][0]=pl3[k][1]=pl3[k][2]=pl3[k][3]=0;

}

 x=60;y=420;dx=48;dy=22;dxpl=250;

pl3[0][0]=dxpl+(pl2[0][0]=dxpl+(pl1[0][0]=x));

pl3[0][1]=pl2[0][1]=pl1[0][1]=y;

pl3[1][0]=dxpl+(pl2[1][0]=dxpl+(pl1[1][0]=x+dx));

pl3[1][1]=pl2[1][1]=pl1[1][1]=y-dy;

pl3[2][0]=dxpl+(pl2[2][0]=dxpl+(pl1[2][0]=x+2*dx));

pl3[2][1]=pl2[2][1]=pl1[2][1]=y-2*dy;

pl3[3][0]=dxpl+(pl2[3][0]=dxpl+(pl1[3][0]=x+3*dx));

pl3[3][1]=pl2[3][1]=pl1[3][1]=y-3*dy;

pl3[4][0]=dxpl+(pl2[4][0]=dxpl+(pl1[4][0]=x));

pl3[4][1]=pl2[4][1]=pl1[4][1]=y-5*dy;

pl3[5][0]=dxpl+(pl2[5][0]=dxpl+(pl1[5][0]=x+dx));

pl3[5][1]=pl2[5][1]=pl1[5][1]=y-6*dy;

pl3[6][0]=dxpl+(pl2[6][0]=dxpl+(pl1[6][0]=x+2*dx));

pl3[6][1]=pl2[6][1]=pl1[6][1]=y-7*dy;

pl3[7][0]=dxpl+(pl2[7][0]=dxpl+(pl1[7][0]=x+3*dx));

pl3[7][1]=pl2[7][1]=pl1[7][1]=y-8*dy;

pl3[8][0]=dxpl+(pl2[8][0]=dxpl+(pl1[8][0]=x));

pl3[8][1]=pl2[8][1]=pl1[8][1]=y-10*dy;

pl3[9][0]=dxpl+(pl2[9][0]=dxpl+(pl1[9][0]=x+dx));

pl3[9][1]=pl2[9][1]=pl1[9][1]=y-11*dy;

pl3[10][0]=dxpl+(pl2[10][0]=dxpl+(pl1[10][0]=x+2*dx));

pl3[10][1]=pl2[10][1]=pl1[10][1]=y-12*dy;

pl3[11][0]=dxpl+(pl2[11][0]=dxpl+(pl1[11][0]=x+3*dx));

pl3[11][1]=pl2[11][1]=pl1[11][1]=y-13*dy;

pl3[12][0]=dxpl+(pl2[12][0]=dxpl+(pl1[12][0]=x));

pl3[12][1]=pl2[12][1]=pl1[12][1]=y-15*dy;

pl3[13][0]=dxpl+(pl2[13][0]=dxpl+(pl1[13][0]=x+dx));

pl3[13][1]=pl2[13][1]=pl1[13][1]=y-16*dy;

pl3[14][0]=dxpl+(pl2[14][0]=dxpl+(pl1[14][0]=x+2*dx));

pl3[14][1]=pl2[14][1]=pl1[14][1]=y-17*dy;

pl3[15][0]=dxpl+(pl2[15][0]=dxpl+(pl1[15][0]=x+3*dx));

pl3[15][1]=pl2[15][1]=pl1[15][1]=y-18*dy;

}

CMainFrame::~CMainFrame()

{

}

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)

{

                  if (CFrameWnd::OnCreate(lpCreateStruct) == -1)

                                    return -1;

                  if (!m_wndStatusBar.Create(this) ||

                                    !m_wndStatusBar.SetIndicators(indicators,

                                      sizeof(indicators)/sizeof(UINT)))

                  {

                                    TRACE0("Failed to create status bar\n");

                                    return -1;      // fail to create

                  }

                  return 0;

}

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)

{

                  if( !CFrameWnd::PreCreateWindow(cs) )

                                    return FALSE;

                  return TRUE;

}

/////////////////////////////////////////////////////////////////////////////

// CMainFrame diagnostics

#ifdef _DEBUG

void CMainFrame::AssertValid() const

{

                  CFrameWnd::AssertValid();

}

void CMainFrame::Dump(CDumpContext& dc) const

{

                  CFrameWnd::Dump(dc);

}