Реферат: Курсовая работа по основам программирования. Игра Паровоз
korp.SetRect(0,288,50,300);
kr.SetRect(30,280,40,288);
kr2.SetRect(10,270,25,288);
kol1.SetRect(5,295,15,305);
kol2.SetRect(35,295,45,305);
SetTimer(1,100,NULL);
SetTimer(2,1000,NULL);
InvalidateRect(NULL);
}
BEGIN_MESSAGE_MAP(CMainWnd,CFrameWnd)
ON_COMMAND(IDM_EXIT,OnExit)
ON_COMMAND(IDM_BEGIN,OnBegin)
ON_COMMAND(IDM_RED,OnRed)
ON_COMMAND(IDM_GREEN,OnGreen)
ON_COMMAND(IDM_BLUE,OnBlue)
ON_WM_PAINT()
ON_WM_TIMER()
ON_WM_CHAR()
END_MESSAGE_MAP()
afx_msg void CMainWnd::OnChar( UINT nChar, UINT nRepCnt, UINT nFlags )
{
if(game)
{
switch(nChar)
{
case 234:
{
ns=0;
break;