diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/ReadMe.txt" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/ReadMe.txt" new file mode 100644 index 0000000..3d9d53b --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/ReadMe.txt" @@ -0,0 +1,56 @@ +======================================================================== + WIN32 APPLICATION : TCS +======================================================================== + + +AppWizard has created this TCS application for you. + +This file contains a summary of what you will find in each of the files that +make up your TCS application. + +TCS.cpp + This is the main application source file. + +TCS.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + + +///////////////////////////////////////////////////////////////////////////// +AppWizard has created the following resources: + +TCS.rc + This is a listing of all of the Microsoft Windows resources that the + program uses. It includes the icons, bitmaps, and cursors that are stored + in the RES subdirectory. This file can be directly edited in Microsoft + Visual C++. + +res\TCS.ico + This is an icon file, which is used as the application's icon (32x32). + This icon is included by the main resource file TCS.rc. + +small.ico + %%This is an icon file, which contains a smaller version (16x16) + of the application's icon. This icon is included by the main resource + file TCS.rc. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named TCS.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Visual C++ reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" to indicate parts of the source code you +should add to or customize. + + +///////////////////////////////////////////////////////////////////////////// diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/StdAfx.cpp" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/StdAfx.cpp" new file mode 100644 index 0000000..925ec80 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/StdAfx.cpp" @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// TCS.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/StdAfx.h" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/StdAfx.h" new file mode 100644 index 0000000..1e47eff --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/StdAfx.h" @@ -0,0 +1,32 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) +#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + + +// Windows Header Files: +#include + +// C RunTime Header Files +#include +#include +#include +#include + +// Local Header Files + +// TODO: reference additional headers your program requires here + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.APS" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.APS" new file mode 100644 index 0000000..8799ccc Binary files /dev/null and "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.APS" differ diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.cpp" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.cpp" new file mode 100644 index 0000000..a08fd47 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.cpp" @@ -0,0 +1,478 @@ +// TCS.cpp : Defines the entry point for the application. +// + +#include "StdAfx.h" +#include "resource.h" + +#define MAX_LOADSTRING 100 + +// Global Variables: +HINSTANCE hInst; // current instance +TCHAR szTitle[MAX_LOADSTRING]; // The title bar text +TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text + +//变量声明 +int map[100][100];//地图 +int headx,heady;//蛇头位置 +int dir;//蛇的运动方向 +int game;//游戏结束标志 +int succ;//游戏胜利标志 + +int tmp=0; + +//函数声明 +void init(HWND hWnd);//初始化游戏 +void go();//蛇行动一步 +void apple();//产生新苹果 +void draw(HWND hWnd);//绘图 +void play(HWND hWnd,HDC hdc);//显示游戏结果 +void paint(HWND hWnd,HDC hdc);//绘制游戏界面 + + +// Foward declarations of functions included in this code module: +ATOM MyRegisterClass(HINSTANCE hInstance); +BOOL InitInstance(HINSTANCE, int); +LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); +LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); + +int APIENTRY WinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPSTR lpCmdLine, + int nCmdShow) +{ + // TODO: Place code here. + MSG msg; + HACCEL hAccelTable; + + // Initialize global strings + LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); + LoadString(hInstance, IDC_TCS, szWindowClass, MAX_LOADSTRING); + MyRegisterClass(hInstance); + + + // Perform application initialization: + if (!InitInstance (hInstance, nCmdShow)) + { + return FALSE; + } + + hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_TCS); + + // Main message loop: + while (GetMessage(&msg, NULL, 0, 0)) + { + if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + + return msg.wParam; +} + + + +// +// FUNCTION: MyRegisterClass() +// +// PURPOSE: Registers the window class. +// +// COMMENTS: +// +// This function and its usage is only necessary if you want this code +// to be compatible with Win32 systems prior to the 'RegisterClassEx' +// function that was added to Windows 95. It is important to call this function +// so that the application will get 'well formed' small icons associated +// with it. +// +ATOM MyRegisterClass(HINSTANCE hInstance) +{ + WNDCLASSEX wcex; + + wcex.cbSize = sizeof(WNDCLASSEX); + + wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.lpfnWndProc = (WNDPROC)WndProc; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 0; + wcex.hInstance = hInstance; + wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_TCS); + wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcex.lpszMenuName = (LPCSTR)IDC_TCS; + wcex.lpszClassName = szWindowClass; + wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL); + + return RegisterClassEx(&wcex); +} + +// +// FUNCTION: InitInstance(HANDLE, int) +// +// PURPOSE: Saves instance handle and creates main window +// +// COMMENTS: +// +// In this function, we save the instance handle in a global variable and +// create and display the main program window. +// +BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) +{ + HWND hWnd; + + hInst = hInstance; // Store instance handle in our global variable + + hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, 0, 616, 658, NULL, NULL, hInstance, NULL); + + if (!hWnd) + { + return FALSE; + } + + //游戏初始化 + init(hWnd); + + ShowWindow(hWnd, nCmdShow); + UpdateWindow(hWnd); + + return TRUE; +} + +// +// FUNCTION: WndProc(HWND, unsigned, WORD, LONG) +// +// PURPOSE: Processes messages for the main window. +// +// WM_COMMAND - process the application menu +// WM_PAINT - Paint the main window +// WM_DESTROY - post a quit message and return +// +// +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + int wmId, wmEvent; + + switch (message) + { + case WM_COMMAND: + wmId = LOWORD(wParam); + wmEvent = HIWORD(wParam); + // Parse the menu selections: + switch (wmId) + { + case IDM_ABOUT: + DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About); + break; + case IDM_EXIT: + DestroyWindow(hWnd); + break; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } + break; + case WM_TIMER: + //计时器消息,根据不同计时器消息进行运算 + switch (wParam) + { + case 1: + go();//蛇行动一步 + InvalidateRect(hWnd,NULL,TRUE);//刷新界面 + break; + case 2: + apple();//产生新苹果 + InvalidateRect(hWnd,NULL,TRUE); + break; + } + break; + case WM_KEYDOWN: + //获取键盘按键的值 + if (wParam==VK_F5) + { + //F5键重新开始 + KillTimer(hWnd,1); + KillTimer(hWnd,2); + init(hWnd); + InvalidateRect(hWnd,NULL,TRUE); + } + if (wParam==VK_RIGHT) + { + //右箭头,修改方向 + if (dir==2) break; + dir=0; + InvalidateRect(hWnd,NULL,TRUE); + } + if (wParam==VK_DOWN) + { + //下箭头,修改方向 + if (dir==3) break; + dir=1; + InvalidateRect(hWnd,NULL,TRUE); + } + if (wParam==VK_LEFT) + { + //左箭头,修改方向 + if (dir==0) break; + dir=2; + InvalidateRect(hWnd,NULL,TRUE); + } + if (wParam==VK_UP) + { + //上箭头,修改方向 + if (dir==1) break; + dir=3; + InvalidateRect(hWnd,NULL,TRUE); + } + break; + case WM_PAINT: + draw(hWnd); + break; + case WM_DESTROY: + PostQuitMessage(0); + break; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } + + return 0; +} + +// Mesage handler for about box. +LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG: + return TRUE; + + case WM_COMMAND: + if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) + { + EndDialog(hDlg, LOWORD(wParam)); + return TRUE; + } + break; + } + return FALSE; +} + +void init(HWND hWnd)//初始化游戏 +{ + int i,j,k; + + //初始化地图,把地图四周设置为墙,其余地方为空地。 + for (i=0;i<100;i++) + { + for (j=0;j<100;j++) + { + if (i==0||j==0||i==99||j==99) map[i][j]=-1; + else map[i][j]=0; + } + } + + //随机在地图中间产生蛇头位置 + headx=rand()%50+24; + heady=rand()%50+24; + + //初始化蛇身和蛇的运动方向 + dir=0; + map[headx][heady]=3; + map[headx-1][heady]=2; + map[headx-2][heady]=1; + + //随机产生地图中间的墙 + /* + for (k=0;k<10;k++) + { + i=0;j=0; + while (map[i][j]!=0) + { + i=rand()%98+1; + j=rand()%98+1; + } + map[i][j]=-1; + } + */ + + //随机产生苹果 + for (k=0;k<20;k++) + { + i=0;j=0; + while (map[i][j]!=0) + { + i=rand()%98+1; + j=rand()%98+1; + } + map[i][j]=-2; + } + + //设置计时器 + SetTimer(hWnd,1,200,NULL); + SetTimer(hWnd,2,20000,NULL); + + //将游戏标志设置为开始 + game=1; +} + +void go()//蛇行动一步 +{ + tmp=tmp+6; + int i,j; + int nextx,nexty;//储存蛇下一步的位置 + + //计算蛇下一步的位置 + if (dir==0) + { + nextx=headx+1; + nexty=heady; + } + if (dir==1) + { + nextx=headx; + nexty=heady+1; + } + if (dir==2) + { + nextx=headx-1; + nexty=heady; + } + if (dir==3) + { + nextx=headx; + nexty=heady-1; + } + + //根据蛇下一步所在位置进行判断 + if (map[nextx][nexty]>0) + { + //撞到自己,游戏结束 + //将游戏标志设置为结束 + game=0; + //游戏失败 + succ=0; + } + if (map[nextx][nexty]==0) + { + //没有任何东西,蛇向前走一步 + for (i=1;i<99;i++) + for (j=1;j<99;j++) + if (map[i][j]>0) map[i][j]--; + map[nextx][nexty]=map[headx][heady]+1; + + //更新蛇头位置 + headx=nextx; + heady=nexty; + } + if (map[nextx][nexty]==-1) + { + //碰到墙时蛇身长度为一,则撞墙后长度为零,游戏失败 + if (map[headx][heady]==1) + { + game=0; + succ=0; + } + //碰到墙,长度减一 + for (i=1;i<99;i++) + for (j=1;j<99;j++) + if (map[i][j]>0) map[i][j]--; + + } + if (map[nextx][nexty]==-2) + { + //吃到苹果 + map[nextx][nexty]=map[headx][heady]+1; + + //更新蛇头位置 + headx=nextx; + heady=nexty; + + if (map[headx][heady]>=50) + { + //将游戏标志设置为结束 + game=0; + //游戏胜利 + succ=1; + } + } +} +void apple()//产生新苹果 +{ + int i,j; + + i=0;j=0; + while (map[i][j]!=0) + { + i=rand()%98+1; + j=rand()%98+1; + } + map[i][j]=-2; +} + +void draw(HWND hWnd) +{ + PAINTSTRUCT ps; + HDC hdc; + + hdc = BeginPaint(hWnd, &ps); + + //游戏结束 + if (game==0) + { + play(hWnd,hdc); + } + + //游戏进行中 + if (game==1) + { + paint(hWnd,hdc); + } + + EndPaint(hWnd, &ps); +} + +void play(HWND hWnd,HDC hdc)//显示游戏结果 +{ + //游戏结束,输出游戏结果 + if (succ==0) TextOut(hdc,260,250,"Game Over",10); + if (succ==1) TextOut(hdc,270,250,"You Win",8); +} + +void paint(HWND hWnd,HDC hdc)//绘制游戏界面 +{ + int i,j; + + RECT rect; + //定义各种颜色画笔 + HBRUSH black,red,blue,green; + black=CreateSolidBrush(RGB(0,0,0)); + red=CreateSolidBrush(RGB(255,0,0)); + blue=CreateSolidBrush(RGB(0,0,255)); + green=CreateSolidBrush(RGB(0,255,0)); + + //根据map地图进行绘制 + for (i=0;i<100;i++) + for (j=0;j<100;j++) + { + SetRect(&rect,i*6,j*6,i*6+6,j*6+6); + if (map[i][j]>0) + { + FillRect(hdc,&rect,green); + } + if (map[i][j]==-1) + { + FillRect(hdc,&rect,red); + } + if (map[i][j]==-2) + { + FillRect(hdc,&rect,blue); + } + } + + //画蛇信 + if (dir==0) SetRect(&rect,headx*6+2,heady*6+2,headx*6+9,heady*6+3); + if (dir==1) SetRect(&rect,headx*6+2,heady*6+2,headx*6+3,heady*6+9); + if (dir==2) SetRect(&rect,headx*6-3,heady*6+2,headx*6+3,heady*6+3); + if (dir==3) SetRect(&rect,headx*6+2,heady*6-3,headx*6+3,heady*6+3); + FillRect(hdc,&rect,red); +} diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.dsp" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.dsp" new file mode 100644 index 0000000..388c7a0 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.dsp" @@ -0,0 +1,138 @@ +# Microsoft Developer Studio Project File - Name="TCS" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=TCS - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TCS.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TCS.mak" CFG="TCS - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TCS - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "TCS - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TCS - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x804 /d "NDEBUG" +# ADD RSC /l 0x804 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 + +!ELSEIF "$(CFG)" == "TCS - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x804 /d "_DEBUG" +# ADD RSC /l 0x804 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "TCS - Win32 Release" +# Name "TCS - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\TCS.cpp +# End Source File +# Begin Source File + +SOURCE=.\TCS.rc +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\TCS.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\small.ico +# End Source File +# Begin Source File + +SOURCE=.\TCS.ico +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.dsw" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.dsw" new file mode 100644 index 0000000..1df98e5 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.dsw" @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TCS"=.\TCS.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.h" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.h" new file mode 100644 index 0000000..fe3e0e9 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.h" @@ -0,0 +1,12 @@ + +#if !defined(AFX_TCS_H__BB255921_D52E_49B5_872A_3CC8813CC2A5__INCLUDED_) +#define AFX_TCS_H__BB255921_D52E_49B5_872A_3CC8813CC2A5__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "resource.h" + + +#endif // !defined(AFX_TCS_H__BB255921_D52E_49B5_872A_3CC8813CC2A5__INCLUDED_) diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.ico" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.ico" new file mode 100644 index 0000000..3868835 Binary files /dev/null and "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.ico" differ diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.ncb" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.ncb" new file mode 100644 index 0000000..79d096a Binary files /dev/null and "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.ncb" differ diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.opt" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.opt" new file mode 100644 index 0000000..008ea0c Binary files /dev/null and "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.opt" differ diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.plg" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.plg" new file mode 100644 index 0000000..70b1f93 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.plg" @@ -0,0 +1,34 @@ + + +
+

Build Log

+

+--------------------Configuration: TCS - Win32 Debug-------------------- +

+

Command Lines

+Creating temporary file "C:\Users\Wolf\AppData\Local\Temp\RSPDBBC.tmp" with contents +[ +/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"Debug/TCS.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"C:\Users\Wolf\Desktop\TCS\TCS.cpp" +] +Creating command line "cl.exe @C:\Users\Wolf\AppData\Local\Temp\RSPDBBC.tmp" +Creating temporary file "C:\Users\Wolf\AppData\Local\Temp\RSPDBBD.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/TCS.pdb" /debug /machine:I386 /out:"Debug/TCS.exe" /pdbtype:sept +.\Debug\StdAfx.obj +.\Debug\TCS.obj +.\Debug\TCS.res +] +Creating command line "link.exe @C:\Users\Wolf\AppData\Local\Temp\RSPDBBD.tmp" +

Output Window

+Compiling... +TCS.cpp +Linking... + + + +

Results

+TCS.exe - 0 error(s), 0 warning(s) +
+ + diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.rc" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.rc" new file mode 100644 index 0000000..db32e57 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/TCS.rc" @@ -0,0 +1,135 @@ +//Microsoft Visual C++ generated resource script. +// + +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) +#ifdef _WIN32 +LANGUAGE 4, 2 +#pragma code_page(936) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. + +IDI_TCS ICON DISCARDABLE "TCS.ICO" +IDI_SMALL ICON DISCARDABLE "SMALL.ICO" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDC_TCS MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "E&xit", IDM_EXIT + END + POPUP "&Help" + BEGIN + MENUITEM "&About ...", IDM_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDC_TCS ACCELERATORS MOVEABLE PURE +BEGIN + "?", IDM_ABOUT, ASCII, ALT + "/", IDM_ABOUT, ASCII, ALT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG DISCARDABLE 22, 17, 230, 75 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "About" +FONT 8, "System" +BEGIN + ICON IDI_TCS,IDC_MYICON,14,9,16,16 + LTEXT "TCS Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX + LTEXT "Copyright (C) 2016",IDC_STATIC,49,20,119,8 + DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDC_TCS "TCS" + IDS_APP_TITLE "TCS" + IDS_HELLO "Hello World!" +END + +#endif +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/resource.h" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/resource.h" new file mode 100644 index 0000000..19bcfe4 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/resource.h" @@ -0,0 +1,27 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by TCS.RC +// +#define IDR_MAINFRAME 128 +#define IDD_TCS_DIALOG 102 +#define IDD_ABOUTBOX 103 +#define IDS_APP_TITLE 103 +#define IDM_ABOUT 104 +#define IDM_EXIT 105 +#define IDS_HELLO 106 +#define IDI_TCS 107 +#define IDI_SMALL 108 +#define IDC_TCS 109 +#define IDC_MYICON 2 +#define IDC_STATIC -1 +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS + +#define _APS_NEXT_RESOURCE_VALUE 129 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 110 +#endif +#endif diff --git "a/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/small.ico" "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/small.ico" new file mode 100644 index 0000000..8f94d9a Binary files /dev/null and "b/\345\221\250\345\244\251\345\275\244/\350\264\252\345\220\203\350\233\207/small.ico" differ