diff --git "a/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/ReadMe.txt" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/ReadMe.txt" new file mode 100644 index 0000000..3509a68 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/ReadMe.txt" @@ -0,0 +1,56 @@ +======================================================================== + WIN32 APPLICATION : Win_learn +======================================================================== + + +AppWizard has created this Win_learn application for you. + +This file contains a summary of what you will find in each of the files that +make up your Win_learn application. + +Win_learn.cpp + This is the main application source file. + +Win_learn.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: + +Win_learn.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\Win_learn.ico + This is an icon file, which is used as the application's icon (32x32). + This icon is included by the main resource file Win_learn.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 Win_learn.rc. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named Win_learn.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/\346\233\262\347\272\277/StdAfx.cpp" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/StdAfx.cpp" new file mode 100644 index 0000000..d12c445 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/StdAfx.cpp" @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// Win_learn.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/\346\233\262\347\272\277/StdAfx.h" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/StdAfx.h" new file mode 100644 index 0000000..b2ba8da --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/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 +#define _WIN32_WINNT 0x0400 + +// 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/\346\233\262\347\272\277/Win_learn.aps" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.aps" new file mode 100644 index 0000000..bd5ef87 Binary files /dev/null and "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.aps" differ diff --git "a/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.cpp" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.cpp" new file mode 100644 index 0000000..f6cbc00 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.cpp" @@ -0,0 +1,345 @@ +// Win_learn.cpp : Defines the entry point for the application. +// + +#include "StdAfx.h" +#include "resource.h" +#include + +#define MAX_LOADSTRING 100 + +//常量声明 +#define PI (acos(-1.0)) +const double n=90.0; +const int gridsize=12;//网格大小 + +// Global Variables: +HINSTANCE hInst; // current instance +TCHAR szTitle[MAX_LOADSTRING]; // The title bar text +TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text + +//变量声明 +POINT apt[7200];//放置散点 +int left,right,pos; +int cxClient,cyClient,midyClient;//储存窗口大小 +int sinsize;//正弦函数幅度 +HPEN GreenPen,gridPen;//绿色画笔 + +// 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); +LRESULT CALLBACK Set(HWND, UINT, WPARAM, LPARAM); + +//函数声明 +void init(HWND hWnd);//自定义的初始化函数 +void next();//增加新粒子并计算当前粒子位置 + +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_WIN_LEARN, szWindowClass, MAX_LOADSTRING); + MyRegisterClass(hInstance); + + + DialogBox(hInst, (LPCTSTR)IDD_Set, NULL, (DLGPROC)Set); + + // Perform application initialization: + if (!InitInstance (hInstance, nCmdShow)) + { + return FALSE; + } + + hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_WIN_LEARN); + + // 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_WIN_LEARN); + wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hbrBackground = CreateSolidBrush(RGB(0,0,0));//使用黑色背景 + wcex.lpszMenuName = (LPCSTR)IDC_WIN_LEARN; + 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, cxClient, cyClient, 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; + PAINTSTRUCT ps; + HDC hdc; + TCHAR szHello[MAX_LOADSTRING]; + LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING); + + int xpos,ypos; + + short Delta; + + 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: + next();//压入新粒子 + break; + case 2: + InvalidateRect(hWnd,NULL,TRUE);//刷新界面 + break; + } + break; + case WM_MOUSEWHEEL: + //鼠标中键滑动 + Delta = HIWORD(wParam); + if (Delta>0) + { + //向上滑动鼠标中键,正弦函数幅度变大 + while (Delta>0) + { + sinsize+=10; + Delta-=120; + if (sinsize>midyClient) sinsize=midyClient; + } + } + else if (Delta<0) + { + //向下滑动鼠标中键,正弦函数幅度变小 + while (Delta<0) + { + sinsize-=10; + Delta+=120; + if (sinsize<1) sinsize=1; + } + } + break; + case WM_PAINT: + hdc = BeginPaint(hWnd, &ps); + //绘制网格 + SelectObject (hdc,gridPen); + for (xpos=pos;xpos<=cxClient;xpos+=gridsize) + { + MoveToEx(hdc,xpos,0,NULL); + LineTo(hdc,xpos,cyClient); + } + for (ypos=0;ypos<=cyClient;ypos+=gridsize) + { + MoveToEx(hdc,0,ypos,NULL); + LineTo(hdc,cxClient,ypos); + } + //使用绿色画笔 + SelectObject (hdc,GreenPen); + //根据散点绘制正弦函数 + Polyline (hdc,apt+left,right-left); + EndPaint(hWnd, &ps); + 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; +} + +LRESULT CALLBACK Set(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + char str[100]; + switch (message) + { + case WM_INITDIALOG: + return TRUE; + + case WM_COMMAND: + if (LOWORD(wParam) == IDOK) + { + + GetDlgItemText(hDlg,IDC_EDIT_H,str,100); + cyClient=atoi(str); + GetDlgItemText(hDlg,IDC_EDIT_W,str,100); + cxClient=atoi(str); + } + if (LOWORD(wParam) == IDOK )//|| LOWORD(wParam) == IDCANCEL) + { + + EndDialog(hDlg,LOWORD(wParam)); + return TRUE; + } + break; + } + return FALSE; +} + +void init(HWND hWnd) +{ + int i; + midyClient=cyClient/2;//计算界面中间位置 + //初始化网格位置 + pos=gridsize-cxClient%gridsize; + //初始化正弦函数幅度 + sinsize=100; + //初始化粒子位置 + left=3600-1-cxClient;right=3600; + for (i=left;i +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Win_learn - 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 "Win_learn.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 "Win_learn.mak" CFG="Win_learn - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Win_learn - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Win_learn - 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)" == "Win_learn - 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)" == "Win_learn - 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" /FR /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 "Win_learn - Win32 Release" +# Name "Win_learn - 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=.\Win_learn.cpp +# End Source File +# Begin Source File + +SOURCE=.\Win_learn.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=.\Win_learn.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=.\Win_learn.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/\346\233\262\347\272\277/Win_learn.dsw" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.dsw" new file mode 100644 index 0000000..dcfd634 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.dsw" @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# 警告: 不能编辑或删除该工作区文件! + +############################################################################### + +Project: "Win_learn"=.\Win_learn.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/\346\233\262\347\272\277/Win_learn.h" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.h" new file mode 100644 index 0000000..16e7eda --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.h" @@ -0,0 +1,12 @@ + +#if !defined(AFX_WIN_LEARN_H__698714A8_7E1B_47E6_8343_004E505AE796__INCLUDED_) +#define AFX_WIN_LEARN_H__698714A8_7E1B_47E6_8343_004E505AE796__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "resource.h" + + +#endif // !defined(AFX_WIN_LEARN_H__698714A8_7E1B_47E6_8343_004E505AE796__INCLUDED_) diff --git "a/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.ico" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.ico" new file mode 100644 index 0000000..3868835 Binary files /dev/null and "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.ico" differ diff --git "a/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.ncb" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.ncb" new file mode 100644 index 0000000..25207b0 Binary files /dev/null and "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.ncb" differ diff --git "a/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.opt" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.opt" new file mode 100644 index 0000000..6c9b0cc Binary files /dev/null and "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.opt" differ diff --git "a/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.plg" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.plg" new file mode 100644 index 0000000..b5dc187 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.plg" @@ -0,0 +1,37 @@ + + +
+

Build Log

+

+--------------------Configuration: Win_learn - Win32 Debug-------------------- +

+

Command Lines

+Creating temporary file "C:\Users\Wolf\AppData\Local\Temp\RSP612E.tmp" with contents +[ +/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR"Debug/" /Fp"Debug/Win_learn.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"C:\Users\Wolf\Desktop\Win_learn\Win_learn.cpp" +] +Creating command line "cl.exe @C:\Users\Wolf\AppData\Local\Temp\RSP612E.tmp" +Creating temporary file "C:\Users\Wolf\AppData\Local\Temp\RSP612F.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/Win_learn.pdb" /debug /machine:I386 /out:"Debug/Win_learn.exe" /pdbtype:sept +.\Debug\StdAfx.obj +.\Debug\Win_learn.obj +.\Debug\Win_learn.res +] +Creating command line "link.exe @C:\Users\Wolf\AppData\Local\Temp\RSP612F.tmp" +

Output Window

+Compiling... +Win_learn.cpp +Linking... +Creating command line "bscmake.exe /nologo /o"Debug/Win_learn.bsc" .\Debug\StdAfx.sbr .\Debug\Win_learn.sbr" +Creating browse info file... +

Output Window

+ + + +

Results

+Win_learn.exe - 0 error(s), 0 warning(s) +
+ + diff --git "a/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.rc" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.rc" new file mode 100644 index 0000000..0685fb0 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/Win_learn.rc" @@ -0,0 +1,172 @@ +//Microsoft Developer Studio 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 +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Chinese (中国) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) +#ifdef _WIN32 +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +#pragma code_page(936) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_WIN_LEARN ICON DISCARDABLE "Win_learn.ICO" +IDI_SMALL ICON DISCARDABLE "SMALL.ICO" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDC_WIN_LEARN MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "E&xit", IDM_EXIT + END + POPUP "&Help" + BEGIN + MENUITEM "&About ...", IDM_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDC_WIN_LEARN 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_WIN_LEARN,IDC_MYICON,14,9,16,16 + LTEXT "Win_learn 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 + +IDD_Set DIALOG DISCARDABLE 0, 0, 187, 96 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Set" +FONT 9, "宋体" +BEGIN + DEFPUSHBUTTON "确定",IDOK,35,75,50,14 + PUSHBUTTON "取消",IDCANCEL,95,75,50,14 + LTEXT "高度:",IDC_STATIC,68,21,25,8 + LTEXT "宽度:",IDC_STATIC,68,44,25,8 + EDITTEXT IDC_EDIT_H,95,18,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_W,95,41,40,14,ES_AUTOHSCROLL +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 + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_Set, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 180 + TOPMARGIN, 7 + BOTTOMMARGIN, 89 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APP_TITLE "Win_learn" + IDS_HELLO "Hello World!" + IDC_WIN_LEARN "WIN_LEARN" +END + +#endif // Chinese (中国) resources +///////////////////////////////////////////////////////////////////////////// + + + +#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/\346\233\262\347\272\277/resource.h" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/resource.h" new file mode 100644 index 0000000..c1cf908 --- /dev/null +++ "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/resource.h" @@ -0,0 +1,30 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Win_learn.rc +// +#define IDC_MYICON 2 +#define IDD_WIN_LEARN_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_WIN_LEARN 107 +#define IDI_SMALL 108 +#define IDC_WIN_LEARN 109 +#define IDR_MAINFRAME 128 +#define IDD_Set 129 +#define IDC_EDIT_H 1000 +#define IDC_EDIT_W 1001 +#define IDC_STATIC -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1002 +#define _APS_NEXT_SYMED_VALUE 110 +#endif +#endif diff --git "a/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/small.ico" "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/small.ico" new file mode 100644 index 0000000..8f94d9a Binary files /dev/null and "b/\345\221\250\345\244\251\345\275\244/\346\233\262\347\272\277/small.ico" differ