{"id":2716,"date":"2025-05-25T06:00:12","date_gmt":"2025-05-24T22:00:12","guid":{"rendered":"https:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/"},"modified":"2025-05-25T06:00:12","modified_gmt":"2025-05-24T22:00:12","slug":"defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/","title":{"rendered":"Defend \u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b"},"content":{"rendered":"<div class=\"article_content clearfix\" id=\"article_content\">\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/kdoc_html_views-1a98987dfd.css\" rel=\"stylesheet\"\/>\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/ck_htmledit_views-704d5b9767.css\" rel=\"stylesheet\"\/>\n<div class=\"htmledit_views atom-one-dark\" id=\"content_views\">\n<p>\n   \u6691\u5047\u51c6\u5907\u505a\u4e2a\u5c0f\u6e38\u620f\uff0c\u5728\u6b64\u628a\u6559\u7a0b\u5199\u51fa\u6765\uff0c\u5e0c\u671b\u5bf9\u522b\u4eba\u6709\u5e2e\u52a9\u3002<br \/>\n   <br \/>\n   \u6e38\u620f\u7684\u57fa\u672c\u60f3\u6cd5\uff1a\u7ed9\u4f60\u4e00\u628a\u67aa(\u5b9e\u9645\u662f\u7528\u76f4\u7ebf\u4ee3\u66ff\u7684)\u5728\u5c4f\u5e55\u7684\u6b63\u4e2d\u592e\u67aa\u53ef\u4ee5\u5c04\u51fa\u5b50\u5f39\uff08\u5b9e\u9645\u4e0a\u4e5f\u662f\u7528\u76f4\u7ebf\u4ee3\u66ff\u7684\uff08\u6211\u627f\u8ba4\u6211\u7684\u56fe\u5f62\u56fe\u50cf\u5f88\u70c2\uff09\uff09\uff0c<br \/>\n   <br \/>\n   \u7136\u540e\u56db\u9762\u516b\u65b9\u4f1a\u6765\u602a\u7269\u5728\u602a\u7269\u78b0\u5230\u4f60\u4e4b\u524d\u628a\u5b83\u6d88\u706d\uff0c\u5426\u5219\u6e38\u620f\u7ed3\u675f\u3002<br \/>\n   <br \/>\n   \u9700\u8981\u7528\u5230\u7684SDK\u529f\u80fd\uff1a\u8ba1\u65f6\u5668\uff0c\u9f20\u6807\uff0c\u8fd8\u6709\u7ed8\u56fe\u51fd\u6570<br \/>\n   <br \/>\n   \u51c6\u5907\u5de5\u4f5c\uff1a\u8981\u6709VC 6.0.\u7136\u540e\u6587\u4ef6-&gt;\u65b0\u5efa-&gt;\u9009\u62e9\u5de5\u7a0b\u680f-&gt;\u9009\u62e9Win32 Application-&gt;\u9009\u4e00\u4e2a\u7a7a\u7684\u5de5\u7a0b<br \/>\n   <br \/>\n   \u7136\u540e\u518d\u9009\u6587\u4ef6-&gt;\u65b0\u5efa-&gt;\u9009\u6587\u4ef6\u4e2d\u7684c++ source file-&gt;\u5728\u6dfb\u52a0\u5230\u5f53\u524d\u5de5\u7a0b\u4e0a\u6253\u52fe-&gt;\u8d77\u4e2a\u540d\u5b57-&gt;\u7136\u540e\u5728File View\u91cc\u7684Source Files\u4e2d\u5c31\u80fd\u627e\u5230<br \/>\n   <br \/>\n   \u5efa\u7684\u7a0b\u5e8f\u6e90\u6587\u4ef6\u4e86\u7136\u540e\u8bf7\u628a\u4e0b\u9762\u7684\u6a21\u677f\u7c98\u4e0a\u53bb\u3002\n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;windows.h&gt;\n#include &lt;windowsx.h&gt;\n#include &lt;math.h&gt;\n#include &lt;stdio.h&gt;\nLRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;\n\nint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, \/\/\u8fd9\u662f\u4e3b\u51fd\u6570\u91cc\u9762\u7684\u4e1c\u897f\u4e0d\u7528\u7ba1\u653e\u7740\u5c31\u884c \n                    PSTR szCmdLine, int iCmdShow)\n{\n     static TCHAR szAppName[] = TEXT (\"BlokOut2\") ;\n     HWND         hwnd ;\n     MSG          msg ;\n     WNDCLASS     wndclass ;\n\n     wndclass.style         = CS_HREDRAW | CS_VREDRAW ;\n     wndclass.lpfnWndProc   = WndProc ;\n     wndclass.cbClsExtra    = 0 ;\n     wndclass.cbWndExtra    = 0 ;\n     wndclass.hInstance     = hInstance ;\n     wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;\n     wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW) ;\n     wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;\n     wndclass.lpszMenuName  = NULL ;\n     wndclass.lpszClassName = szAppName ;\n     \n     if (!RegisterClass (&amp;wndclass))\n     {\n          MessageBox (NULL, TEXT (\"Program requires Windows NT!\"), \n                      szAppName, MB_ICONERROR) ;\n          return 0 ;\n     }\n     \n     hwnd = CreateWindow (szAppName, TEXT (\"Mouse Button &amp; Capture Demo\"),\n                          WS_OVERLAPPEDWINDOW,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          NULL, NULL, hInstance, NULL) ;\n     \n     ShowWindow (hwnd, iCmdShow) ;\n     UpdateWindow (hwnd) ;\n     \n     while (GetMessage (&amp;msg, NULL, 0, 0))\n     {\n          TranslateMessage (&amp;msg) ;\n          DispatchMessage (&amp;msg) ;\n     }\n     return msg.wParam ;\n}\nLRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)\/\/\u6d88\u606f\u56de\u8c03\u51fd\u6570\u4e3b\u8981\u5de5\u4f5c\u90fd\u662f\u5728\u8fd9\u91cc\u5b8c\u6210\u7684 \n{\n     HDC          hdc ;\n     PAINTSTRUCT  ps ;\n\tswitch (message)\n\t{\n\tcase WM_SIZE :\n\n\t\treturn 0;\n\tcase WM_LBUTTONDOWN :\n\t\n\t\treturn 0 ;\n\tcase WM_LBUTTONUP :\n\t\n\t\treturn 0;\n\tcase WM_MOUSEMOVE :\n\t\t\n\t\treturn 0 ;\n\tcase WM_DESTROY :\n\t\tPostQuitMessage (0) ;\n\t\treturn 0 ;\n     }\n     return DefWindowProc (hwnd, message, wParam, lParam) ;\n}\n<\/code><\/pre>\n<p>\n   <br \/>\n   \u9996\u5148\u8981\u5b9e\u73b0\u7684\u529f\u80fd\u5c31\u662f\u67aa\u8ddf\u7740\u9f20\u6807\u8f6c<br \/>\n   <br \/>\n   \u5148\u5b9a\u4e494\u4e2a\u70b9\u53d8\u91cfptBeg, ptEnd,moEnd,fmoEnd;\u5206\u522b\u8868\u793a\u67aa\u7684\u8d77\u59cb\u4f4d\u7f6e\uff0c\u6307\u9488\u7684\u4f4d\u7f6e\uff0c\u67aa\u7684\u672b\u7aef\u4f4d\u7f6e\uff0c\u67aa\u7684\u4e0a\u4e00\u4e2a\u672b\u7aef\u4f4d\u7f6e<br \/>\n   <br \/>\n   \u5f53\u9f20\u6807\u79fb\u52a8\u65f6Windows\u4f1a\u7ed9 WM_MOUSEMOVE \u53d1\u6d88\u606f\uff0c\u8fd9\u6837\u5c31\u80fd\u5f97\u5230\u5f53\u524d\u6307\u9488\u7684\u4f4d\u7f6e\uff0c\u4ece\u800c\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd<br \/>\n   \n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;windows.h&gt;\n#include &lt;windowsx.h&gt;\n#include &lt;math.h&gt;\n#include &lt;stdio.h&gt;\nLRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;\n\nint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,\n                    PSTR szCmdLine, int iCmdShow)\n{\n     static TCHAR szAppName[] = TEXT (\"BlokOut2\") ;\n     HWND         hwnd ;\n     MSG          msg ;\n     WNDCLASS     wndclass ;\n\n     wndclass.style         = CS_HREDRAW | CS_VREDRAW ;\n     wndclass.lpfnWndProc   = WndProc ;\n     wndclass.cbClsExtra    = 0 ;\n     wndclass.cbWndExtra    = 0 ;\n     wndclass.hInstance     = hInstance ;\n     wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;\n     wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW) ;\n     wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;\n     wndclass.lpszMenuName  = NULL ;\n     wndclass.lpszClassName = szAppName ;\n     \n     if (!RegisterClass (&amp;wndclass))\n     {\n          MessageBox (NULL, TEXT (\"Program requires Windows NT!\"), \n                      szAppName, MB_ICONERROR) ;\n          return 0 ;\n     }\n     \n     hwnd = CreateWindow (szAppName, TEXT (\"Mouse Button &amp; Capture Demo\"),\n                          WS_OVERLAPPEDWINDOW,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          NULL, NULL, hInstance, NULL) ;\n     \n     ShowWindow (hwnd, iCmdShow) ;\n     UpdateWindow (hwnd) ;\n     \n     while (GetMessage (&amp;msg, NULL, 0, 0))\n     {\n          TranslateMessage (&amp;msg) ;\n          DispatchMessage (&amp;msg) ;\n     }\n     return msg.wParam ;\n}\nLRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)\n{\n     static POINT ptBeg, ptEnd,moEnd,fmoEnd;\n     HDC          hdc ;\n     PAINTSTRUCT  ps ;\n\t double k;\n\t int R=30;\n\tswitch (message)\n\t{\n\tcase WM_SIZE :  \/\/\u5f53\u7a97\u53e3\u88ab\u521b\u5efa\u65f6windows\u4f1a\u53d1\u6d88\u606f\u5230\u8fd9\u91cc \n\t\tptBeg.x=LOWORD(lParam)\/2;\/\/\u5f97\u5230\u7a97\u53e3\u7684\u4e2d\u95f4\u4f4d\u7f6e LOWORD(lParam)\u662fwindows\u7ed9\u7684\u6d88\u606f\u91cc\u7684\u7a97\u53e3\u5bbd\u5ea6\uff0c\u76f4\u63a5\u7528\u5c31\u884c\uff0c\u4e0d\u7528\u6df1\u7a76\u5176\u4e2d\u95f4\u8fc7\u7a0b \n\t\tptBeg.y=HIWORD(lParam)\/2;\/\/HIWORD(lParam)\u662f\u7a97\u53e3\u9ad8\u5ea6 \u6ce8\u610f\u7a97\u53e3\u5de6\u4e0a\u89d2\u7684\u5750\u6807\u662f0\uff0c0 \n\t\treturn 0;\n\tcase WM_LBUTTONDOWN :\n\t\n\t\treturn 0 ;\n\tcase WM_LBUTTONUP :\n\t\n\t\treturn 0;\n\tcase WM_MOUSEMOVE :\/\/\u5f53\u9f20\u6807\u79fb\u52a8\u65f6windows\u4f1a\u53d1\u6d88\u606f\u5230\u8fd9\u91cc \n\t\thdc=GetDC(hwnd); \/\/\u5f97\u5230\u8bbe\u5907\u73af\u5883\u53e5\u67c4\uff0chwnd\u662f\u7a97\u53e3\u53e5\u67c4\uff0c\u5bf9\u7a97\u53e3\u64cd\u4f5c\u90fd\u9700\u8981\u8fd9\u4e2a\uff0c\u540c\u6837\u4e0d\u7528\u6df1\u7a76\u77e5\u9053\u5c31\u884c\uff0c\u76f4\u63a5\u7528 \n\t\tSelectObject(hdc,GetStockObject(WHITE_PEN)); \/\/\u9009\u62e9\u767d\u8272\u753b\u7b14 \uff0cGetStockObject\u662f\u7528\u6765\u5f97\u5230\u753b\u7b14\u7684\u6570\u503c \n\t\tMoveToEx(hdc,ptBeg.x,ptBeg.y,NULL);\t\t\t\/\/\u8fd9\u662f\u4e00\u4e2a\u753b\u76f4\u7ebf\u7ebf\u51fd\u6570 MoveToEx\u7528\u6765\u8bbe\u7f6e\u8d77\u59cb\u4f4d\u7f6e\uff0c\u53c2\u65701\u662f\u8bbe\u5907\u73af\u5883\u53e5\u67c4\uff0c\u53c2\u65702\u548c3\u662f\u6211\u4eec\u4e0a\u9762\u6c42\u7684\u4e2d\u95f4\u4f4d\u7f6e\uff0c\u6700\u540e\u4e00\u4e2a\u53c2\u6570\u7528\u4e0d\u5230 \n\t\tLineTo(hdc,fmoEnd.x,fmoEnd.y);\t\t\t\t\/\/LineTo\u7528\u6765\u8bbe\u7f6e\u7ebf\u7684\u7ec8\u70b9\u4f4d\u7f6e\uff0c\u540e\u4e24\u4e2a\u53c2\u6570\u662f\u4e0a\u4e00\u4e2a\u67aa\u7684\u7ec8\u70b9\u4f4d\u7f6e\uff0c\u4e0a\u9762\u9009\u62e9\u767d\u8272\u753b\u7b14\u4e5f\u5c31\u662f\u4e3a\u4e86\u628a\u4e0a\u4e00\u4e2a\u67aa\u64e6\u9664 \n\t\tk=sqrt(((LOWORD(lParam)-ptBeg.x)*(LOWORD(lParam)-ptBeg.x)\n\t\t\t+(HIWORD(lParam)-ptBeg.y)*(HIWORD(lParam)-ptBeg.y))\n\t\t\t\/(double)(R*R));\t\t\t\t\t\t\/\/\u8ba1\u7b97\u7f29\u5c0f\u500d\u6570\uff0cLOWORD(lParam)\u5f97\u5230\u5f53\u524d\u9f20\u6807\u7684\u6a2a\u5750\u6807 HIWORD(lParam)\u5f97\u5230\u7eb5\u5750\u6807R\u662f\u67aa\u7684\u957f\u5ea6 \n\t\tif(k==0)\n\t\t{\n\t\t\tmoEnd.x=ptBeg.x;\n\t\t\tmoEnd.y=ptBeg.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmoEnd.x=ptBeg.x+(LOWORD(lParam)-ptBeg.x)\/k;\n\t\t\tmoEnd.y=ptBeg.y+(HIWORD(lParam)-ptBeg.y)\/k;\t\/\/\u7684\u5230\u67aa\u7684\u7ec8\u70b9\u4f4d\u7f6e\t\t\t\t\n\t\t}\n\t\tSelectObject(hdc,GetStockObject(BLACK_PEN));\t\/\/\u9009\u62e9\u9ed1\u8272\u753b\u7b14\u5f00\u59cb\u753b\u67aa\u8ddf\u4e0a\u9762\u4e00\u6837\u5c31\u4e0d\u591a\u8bf4\u4e86 \n\t\tMoveToEx(hdc,ptBeg.x,ptBeg.y,NULL);\n\t\tLineTo(hdc,moEnd.x,moEnd.y);\n\t\tfmoEnd.x=moEnd.x;\n\t\tfmoEnd.y=moEnd.y;\n\t\tReleaseDC(hwnd,hdc);\t\t\/\/\u91ca\u653e\u8bbe\u5907\u73af\u5883\u53e5\u67c4 \n\t\treturn 0 ;\n\n\tcase WM_DESTROY :\n\t\tPostQuitMessage (0) ;\n\t\treturn 0 ;\n     }\n     return DefWindowProc (hwnd, message, wParam, lParam) ;\n}\n<\/code><\/pre>\n<p>\n   <br \/>\n   \u7136\u540e\u5c31\u662f\u5b50\u5f39\u79fb\u52a8\u7684\u6548\u679c\u8fd9\u5c31\u8981\u7528\u5230\u8ba1\u65f6\u5668<br \/>\n   <br \/>\n   \u5148\u5b9a\u4e49\u4e00\u4e2a\u5b50\u5f39\u70b9\u6570\u7ec4 Shot[500][2] \u50a8\u5b58\u6bcf\u4e2a\u5b50\u5f39\u7684\u5f53\u524d\u4f4d\u7f6e\u548c\u5b50\u5f39\u7684\u957f\u5ea6\u3002<br \/>\n   <br \/>\n   \u4e3a\u8ba1\u65f6\u5668\u5199\u4e00\u4e2a\u56de\u8c03\u51fd\u6570MyTimer\u5904\u7406\u5b50\u5f39\u6548\u679c.<br \/>\n   \n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;windows.h&gt;\n#include &lt;windowsx.h&gt;\n#include &lt;math.h&gt;\n#include &lt;stdio.h&gt;\nLRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;\n\nint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,\n                    PSTR szCmdLine, int iCmdShow)\n{\n     static TCHAR szAppName[] = TEXT (\"BlokOut2\") ;\n     HWND         hwnd ;\n     MSG          msg ;\n     WNDCLASS     wndclass ;\n\n     wndclass.style         = CS_HREDRAW | CS_VREDRAW ;\n     wndclass.lpfnWndProc   = WndProc ;\n     wndclass.cbClsExtra    = 0 ;\n     wndclass.cbWndExtra    = 0 ;\n     wndclass.hInstance     = hInstance ;\n     wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;\n     wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW) ;\n     wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;\n     wndclass.lpszMenuName  = NULL ;\n     wndclass.lpszClassName = szAppName ;\n     \n     if (!RegisterClass (&amp;wndclass))\n     {\n          MessageBox (NULL, TEXT (\"Program requires Windows NT!\"), \n                      szAppName, MB_ICONERROR) ;\n          return 0 ;\n     }\n     \n     hwnd = CreateWindow (szAppName, TEXT (\"Mouse Button &amp; Capture Demo\"),\n                          WS_OVERLAPPEDWINDOW,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          NULL, NULL, hInstance, NULL) ;\n     \n     ShowWindow (hwnd, iCmdShow) ;\n     UpdateWindow (hwnd) ;\n     \n     while (GetMessage (&amp;msg, NULL, 0, 0))\n     {\n          TranslateMessage (&amp;msg) ;\n          DispatchMessage (&amp;msg) ;\n     }\n     return msg.wParam ;\n}\nPOINT Shot[500][2],Boundary;\nint nShot;\nvoid CALLBACK MyTimer(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime) \/\/\u8fd9\u5c31\u662f\u8ba1\u65f6\u5668\u7684\u56de\u8c03\u51fd\u6570 \n{\n\tHDC hdc=GetDC(hwnd);\n\tint i=0;\n\tSelectObject(hdc,GetStockObject(WHITE_PEN));\t\n\tfor(i=0;i&lt;nShot;i++)  \t\/\/\u5427\u7a97\u53e3\u4e2d\u6240\u6709\u7684\u5b50\u5f39\u6e05\u9664\u6389 \n\t{\n\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t}\n\tfor(i=0;i&lt;nShot;i++)\t\/\/\u5982\u679c\u5b50\u5f39\u5230\u8fbe\u8fb9\u754c\u5219\u6e05\u9664\u5b50\u5f39 \n\t{\n\t\tif(Shot[i][0].x&gt;Boundary.x||Shot[i][0].x&lt;0\n\t\t\t||Shot[i][0].y&gt;Boundary.y||Shot[i][0].y&lt;0)\n\t\t{\n\t\t\tint j=i;\n\t\t\tfor(;j&lt;nShot-1;j++)\n\t\t\t{\n\t\t\t\tShot[j][0].x=Shot[j+1][0].x;\n\t\t\t\tShot[j][0].y=Shot[j+1][0].y;\n\t\t\t\tShot[j][1].x=Shot[j+1][1].x;\n\t\t\t\tShot[j][1].y=Shot[j+1][1].y;\n\t\t\t}\n\t\t\tnShot--;\n\t\t\ti--;\n\t\t}\n\t}\n\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\tfor(i=0;i&lt;nShot;i++)\t\/\/\u628a\u5168\u90e8\u65b0\u7684\u5b50\u5f39\u753b\u5728\u7a97\u53e3\u91cc \n\t{\n\t\tShot[i][0].x+=Shot[i][1].x\/2;\n\t\tShot[i][0].y+=Shot[i][1].y\/2;\n\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t}\n\tReleaseDC(hwnd,hdc);\n}\nLRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)\n{\n     static POINT ptBeg, ptEnd,moEnd,fmoEnd;\n     HDC          hdc ;\n     PAINTSTRUCT  ps ;\n\t double k;\n\t int R=30;\n\tswitch (message)\n\t{\n\tcase WM_SIZE :\n\t\tnShot=0;\n\t\tSetTimer(hwnd,0,30,MyTimer);\/\/\u8bbe\u5b9a\u8ba1\u65f6\u5668\uff0c\u53c2\u65701\u662f\u7a97\u53e3\u53e5\u67c4\uff0c\u53c2\u65702\u662f\u8ba1\u65f6\u5668\u7f16\u53f7\uff0c\u53c2\u65703\u662f\u8c03\u7528\u95f4\u9694\uff0c\u53c2\u65704\u662f\u56de\u8c03\u51fd\u6570\u540d\u5b57 \n\t\tptBeg.x=LOWORD(lParam)\/2;\n\t\tptBeg.y=HIWORD(lParam)\/2;\n\t\tBoundary.x=LOWORD(lParam);\/\/\u628a\u8fb9\u754c\u4fdd\u5b58\u4e0b\u6765\u4e3a\u5b50\u5f39\u5904\u7406\u505a\u51c6\u5907 \n\t\tBoundary.y=HIWORD(lParam);\n\t\treturn 0;\n\tcase WM_LBUTTONDOWN :\/\/\u9f20\u6807\u5de6\u952e\u70b9\u51fb\u65f6windows\u4f1a\u53d1\u6d88\u606f\u5230\u8fd9\u91cc \n\t\thdc=GetDC(hwnd);\t\/\/\u4e0b\u9762\u7684\u4ee3\u7801\u662f\u753b\u5b50\u5f39\u7684\u8d77\u59cb\u4f4d\u7f6e\u7ec6\u8282\u8ddf\u524d\u9762\u4e00\u6837\u524d\u9762\u5df2\u7ecf\u8bb2\u8fc7\u8fd9\u91cc\u5c31\u4e0d\u591a\u8bb2\u4e86 \n\t\tptEnd.x = GET_X_LPARAM (lParam) ;\n\t\tptEnd.y = GET_Y_LPARAM (lParam) ;\n\t\tk=sqrt(((ptEnd.x-ptBeg.x)*(ptEnd.x-ptBeg.x)\n\t\t\t+(ptEnd.y-ptBeg.y)*(ptEnd.y-ptBeg.y))\n\t\t\t\/(double)(R*R));\n\t\tif(k==0)\n\t\t{\n\t\t\tptEnd.x=ptBeg.x;\n\t\t\tptEnd.y=ptBeg.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tptEnd.x=ptBeg.x+(ptEnd.x-ptBeg.x)\/k*2;\n\t\t\tptEnd.y=ptBeg.y+(ptEnd.y-ptBeg.y)\/k*2;\t\t\t\t\t\n\t\t}\n\t\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\t\tMoveToEx(hdc,(ptBeg.x+ptEnd.x)\/2,(ptBeg.y+ptEnd.y)\/2,NULL);\n\t\tLineTo(hdc,ptEnd.x,ptEnd.y);\n\t\tReleaseDC(hwnd,hdc);\n\t\tShot[nShot][0].x=(ptBeg.x+ptEnd.x)\/2;\t\/\/\u4fdd\u5b58\u5b50\u5f39\u7684\u8d77\u59cb\u4f4d\u7f6e \n\t\tShot[nShot][0].y=(ptBeg.y+ptEnd.y)\/2;\n\t\tShot[nShot][1].x=ptEnd.x-(ptEnd.x+ptBeg.x)\/2;\t\/\/\u4fdd\u5b58\u5b50\u5f39\u7684\u5c3a\u5bf8 \n\t\tShot[nShot][1].y=ptEnd.y-(ptEnd.y+ptBeg.y)\/2;\n\t\tnShot++;\n\t\treturn 0 ;\n\tcase WM_MOUSEMOVE :\n\t\thdc=GetDC(hwnd); \n\t\tSelectObject(hdc,GetStockObject(WHITE_PEN));\n\t\tMoveToEx(hdc,ptBeg.x,ptBeg.y,NULL);\n\t\tLineTo(hdc,fmoEnd.x,fmoEnd.y);\n\t\tk=sqrt(((LOWORD(lParam)-ptBeg.x)*(LOWORD(lParam)-ptBeg.x)\n\t\t\t+(HIWORD(lParam)-ptBeg.y)*(HIWORD(lParam)-ptBeg.y))\n\t\t\t\/(double)(R*R));\n\t\tif(k==0)\n\t\t{\n\t\t\tmoEnd.x=ptBeg.x;\n\t\t\tmoEnd.y=ptBeg.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmoEnd.x=ptBeg.x+(LOWORD(lParam)-ptBeg.x)\/k;\n\t\t\tmoEnd.y=ptBeg.y+(HIWORD(lParam)-ptBeg.y)\/k;\t\t\t\t\t\n\t\t}\n\t\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\t\tMoveToEx(hdc,ptBeg.x,ptBeg.y,NULL);\n\t\tLineTo(hdc,moEnd.x,moEnd.y);\n\t\tfmoEnd.x=moEnd.x;\n\t\tfmoEnd.y=moEnd.y;\n\t\tReleaseDC(hwnd,hdc);\n\t\treturn 0 ;\n\tcase WM_DESTROY :\n\t\tPostQuitMessage (0) ;\n\t\treturn 0 ;\n     }\n     return DefWindowProc (hwnd, message, wParam, lParam) ;\n}\n<\/code><\/pre>\n<p>\n   <br \/>\n   \u7136\u540e\u8fd8\u8981\u6a21\u62df\u4e00\u76f4\u6309\u7740\u9f20\u6807\u5de6\u952e\u7136\u540e\u626b\u5c04\u7684\u6548\u679c<br \/>\n   <br \/>\n   \u9996\u5148\u5b9a\u4e49\u4e00\u4e2a\u5168\u5c40\u53d8\u91cfisLeftDown\u6765\u8868\u793a\u9f20\u6807\u5de6\u952e\u662f\u5426\u88ab\u6309\u4e0b\u7136\u540e\u518d\u5199\u4e00\u4e2a\u8ba1\u65f6\u5668\u7528\u6765\u9f20\u6807\u6309\u4e0b\u65f6\u6bcf\u9694\u4e00\u6bb5\u65f6\u95f4\u5c31\u5c04\u51fa\u4e00\u4e2a\u5b50\u5f39<br \/>\n   <br \/>\n   \u7528addShot\u6570\u7ec4\u6765\u9884\u5b58\u5b50\u5f39\u6700\u540e\u8fd8\u8981\u6a21\u62df\u4e00\u76f4\u6309\u7740\u9f20\u6807\u5de6\u952e\u7136\u540e\u626b\u5c04\u7684\u6548\u679c\n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;windows.h&gt;\n#include &lt;windowsx.h&gt;\n#include &lt;math.h&gt;\n#include &lt;stdio.h&gt;\nLRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;\n\nint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,\n                    PSTR szCmdLine, int iCmdShow)\n{\n     static TCHAR szAppName[] = TEXT (\"BlokOut2\") ;\n     HWND         hwnd ;\n     MSG          msg ;\n     WNDCLASS     wndclass ;\n\n     wndclass.style         = CS_HREDRAW | CS_VREDRAW ;\n     wndclass.lpfnWndProc   = WndProc ;\n     wndclass.cbClsExtra    = 0 ;\n     wndclass.cbWndExtra    = 0 ;\n     wndclass.hInstance     = hInstance ;\n     wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;\n     wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW) ;\n     wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;\n     wndclass.lpszMenuName  = NULL ;\n     wndclass.lpszClassName = szAppName ;\n     \n     if (!RegisterClass (&amp;wndclass))\n     {\n          MessageBox (NULL, TEXT (\"Program requires Windows NT!\"), \n                      szAppName, MB_ICONERROR) ;\n          return 0 ;\n     }\n     \n     hwnd = CreateWindow (szAppName, TEXT (\"Mouse Button &amp; Capture Demo\"),\n                          WS_OVERLAPPEDWINDOW,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          NULL, NULL, hInstance, NULL) ;\n     \n     ShowWindow (hwnd, iCmdShow) ;\n     UpdateWindow (hwnd) ;\n     \n     while (GetMessage (&amp;msg, NULL, 0, 0))\n     {\n          TranslateMessage (&amp;msg) ;\n          DispatchMessage (&amp;msg) ;\n     }\n     return msg.wParam ;\n}\nPOINT Shot[500][2],Boundary,addShot[2];\nint nShot,isLeftDown;\nvoid CALLBACK MyTimer(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tHDC hdc=GetDC(hwnd);\n\tint i=0;\n\tSelectObject(hdc,GetStockObject(WHITE_PEN));\t\n\tfor(i=0;i&lt;nShot;i++)\n\t{\n\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t}\n\tfor(i=0;i&lt;nShot;i++)\n\t{\n\t\tif(Shot[i][0].x&gt;Boundary.x||Shot[i][0].x&lt;0\n\t\t\t||Shot[i][0].y&gt;Boundary.y||Shot[i][0].y&lt;0)\n\t\t{\n\t\t\tint j=i;\n\t\t\tfor(;j&lt;nShot-1;j++)\n\t\t\t{\n\t\t\t\tShot[j][0].x=Shot[j+1][0].x;\n\t\t\t\tShot[j][0].y=Shot[j+1][0].y;\n\t\t\t\tShot[j][1].x=Shot[j+1][1].x;\n\t\t\t\tShot[j][1].y=Shot[j+1][1].y;\n\t\t\t}\n\t\t\tnShot--;\n\t\t\ti--;\n\t\t}\n\t}\n\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\tfor(i=0;i&lt;nShot;i++)\n\t{\n\t\tShot[i][0].x+=Shot[i][1].x\/2;\n\t\tShot[i][0].y+=Shot[i][1].y\/2;\n\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t}\n\tReleaseDC(hwnd,hdc);\n}\nvoid CALLBACK AddShot(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\/\/\u7528\u6765\u6dfb\u52a0\u5b50\u5f39\u7684\u7b2c\u4e8c\u4e2a\u8ba1\u65f6\u5668\u56de\u8c03\u51fd\u6570 \n{\n\tif(isLeftDown)  \/\/\u53ea\u8981\u5de6\u952e\u4e00\u76f4\u88ab\u6309\u4e0b\uff0c\u6bcf\u9694150\u6beb\u79d2\u5c31\u628a\u5f53\u524d\u9884\u5b58\u5b50\u5f39\u52a0\u5165\u5230\u5df2\u5c04\u51fa\u7684\u5b50\u5f39\u5e8f\u5217\u4e2d \n\t{\n\t\tShot[nShot][0].x=addShot[0].x;\n\t\tShot[nShot][0].y=addShot[0].y;\n\t\tShot[nShot][1].x=addShot[1].x;\n\t\tShot[nShot][1].y=addShot[1].y;\n\t\tnShot++;\n\t}\n}\nLRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)\n{\n     static POINT ptBeg, ptEnd,moEnd,fmoEnd;\n     HDC          hdc ;\n     PAINTSTRUCT  ps ;\n\t double k;\n\t int R=30;\n\t char s[100];\n\tswitch (message)\n\t{\n\tcase WM_SIZE :\n\t\tnShot=0;isLeftDown=0;\n\t\tSetTimer(hwnd,0,30,MyTimer);\n\t\tSetTimer(hwnd,1,150,AddShot);\n\t\tptBeg.x=LOWORD(lParam)\/2;\n\t\tptBeg.y=HIWORD(lParam)\/2;\n\t\tBoundary.x=LOWORD(lParam);\n\t\tBoundary.y=HIWORD(lParam);\n\t\treturn 0;\n\tcase WM_LBUTTONDOWN :\n\t\thdc=GetDC(hwnd);\n\n\t\tptEnd.x = GET_X_LPARAM (lParam) ;\n\t\tptEnd.y = GET_Y_LPARAM (lParam) ;\n\t\tk=sqrt(((ptEnd.x-ptBeg.x)*(ptEnd.x-ptBeg.x)\n\t\t\t+(ptEnd.y-ptBeg.y)*(ptEnd.y-ptBeg.y))\n\t\t\t\/(double)(R*R));\n\t\tif(k==0)\n\t\t{\n\t\t\tptEnd.x=ptBeg.x;\n\t\t\tptEnd.y=ptBeg.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tptEnd.x=ptBeg.x+(ptEnd.x-ptBeg.x)\/k*2;\n\t\t\tptEnd.y=ptBeg.y+(ptEnd.y-ptBeg.y)\/k*2;\t\t\t\t\t\n\t\t}\n\t\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\t\tMoveToEx(hdc,(ptBeg.x+ptEnd.x)\/2,(ptBeg.y+ptEnd.y)\/2,NULL);\n\t\tLineTo(hdc,ptEnd.x,ptEnd.y);\n\t\tReleaseDC(hwnd,hdc);\n\t\taddShot[0].x=Shot[nShot][0].x=(ptBeg.x+ptEnd.x)\/2;\n\t\taddShot[0].y=Shot[nShot][0].y=(ptBeg.y+ptEnd.y)\/2;\n\t\taddShot[1].x=Shot[nShot][1].x=ptEnd.x-(ptEnd.x+ptBeg.x)\/2;\n\t\taddShot[1].y=Shot[nShot][1].y=ptEnd.y-(ptEnd.y+ptBeg.y)\/2;\n\t\tnShot++;\n\t\tisLeftDown=1;\/\/\u5de6\u952e\u5df2\u7ecf\u88ab\u6309\u4e0b \n\n\t\treturn 0 ;\n\tcase WM_LBUTTONUP : \/\/\u5de6\u952e\u88ab\u5f39\u8d77\u65f6windows\u56de\u53d1\u6d88\u606f\u5230\u8fd9\u91cc \n\t\tisLeftDown=0;\n\t\treturn 0;\n\tcase WM_MOUSEMOVE :\n\t\thdc=GetDC(hwnd); \n\t\tSelectObject(hdc,GetStockObject(WHITE_PEN));\n\t\tMoveToEx(hdc,ptBeg.x,ptBeg.y,NULL);\n\t\tLineTo(hdc,fmoEnd.x,fmoEnd.y);\n\t\tk=sqrt(((LOWORD(lParam)-ptBeg.x)*(LOWORD(lParam)-ptBeg.x)\n\t\t\t+(HIWORD(lParam)-ptBeg.y)*(HIWORD(lParam)-ptBeg.y))\n\t\t\t\/(double)(R*R));\n\t\tif(k==0)\n\t\t{\n\t\t\tmoEnd.x=ptBeg.x;\n\t\t\tmoEnd.y=ptBeg.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmoEnd.x=ptBeg.x+(LOWORD(lParam)-ptBeg.x)\/k;\n\t\t\tmoEnd.y=ptBeg.y+(HIWORD(lParam)-ptBeg.y)\/k;\t\t\t\t\t\n\t\t}\n\n\t\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\t\tMoveToEx(hdc,ptBeg.x,ptBeg.y,NULL);\n\t\tLineTo(hdc,moEnd.x,moEnd.y);\n\t\tfmoEnd.x=moEnd.x;\n\t\tfmoEnd.y=moEnd.y;\n\t\tReleaseDC(hwnd,hdc);\n\t\tif(isLeftDown)\t\t\/\/\u6dfb\u52a0\u9884\u5b58\u5b50\u5f39 \n\t\t{\n\t\t\taddShot[0].x=moEnd.x;\n\t\t\taddShot[0].y=moEnd.y;\n\t\t\taddShot[1].x=moEnd.x-ptBeg.x;\n\t\t\taddShot[1].y=moEnd.y-ptBeg.y;\n\t\t}\n\t\treturn 0 ;\n\n\tcase WM_DESTROY :\n\t\tPostQuitMessage (0) ;\n\t\treturn 0 ;\n     }\n     return DefWindowProc (hwnd, message, wParam, lParam) ;\n}\n<\/code><\/pre>\n<p>\n   \u63a5\u4e0b\u6765\u662f\u6dfb\u52a0\u602a\u7269\uff0c\u7528\u7684\u90fd\u662f\u4e0a\u9762\u7684\u77e5\u8bc6\uff0c\u5c31\u4e0d\u591a\u8bf4\u4e86\uff0c\u76f4\u63a5\u4ee3\u7801\n  <\/p>\n<p>\n   \n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;windows.h&gt;\n#include &lt;windowsx.h&gt;\n#include &lt;math.h&gt;\n#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n#include &lt;time.h&gt;\nLRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;\n\nint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,\n                    PSTR szCmdLine, int iCmdShow)\n{\n     static TCHAR szAppName[] = TEXT (\"BlokOut2\") ;\n     HWND         hwnd ;\n     MSG          msg ;\n     WNDCLASS     wndclass ;\n\n     wndclass.style         = CS_HREDRAW | CS_VREDRAW ;\n     wndclass.lpfnWndProc   = WndProc ;\n     wndclass.cbClsExtra    = 0 ;\n     wndclass.cbWndExtra    = 0 ;\n     wndclass.hInstance     = hInstance ;\n     wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;\n     wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW) ;\n     wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;\n     wndclass.lpszMenuName  = NULL ;\n     wndclass.lpszClassName = szAppName ;\n     \n     if (!RegisterClass (&amp;wndclass))\n     {\n          MessageBox (NULL, TEXT (\"Program requires Windows NT!\"), \n                      szAppName, MB_ICONERROR) ;\n          return 0 ;\n     }\n     \n     hwnd = CreateWindow (szAppName, TEXT (\"Mouse Button &amp; Capture Demo\"),\n                          WS_OVERLAPPEDWINDOW,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          NULL, NULL, hInstance, NULL) ;\n     \n     ShowWindow (hwnd, iCmdShow) ;\n     UpdateWindow (hwnd) ;\n     \n     while (GetMessage (&amp;msg, NULL, 0, 0))\n     {\n          TranslateMessage (&amp;msg) ;\n          DispatchMessage (&amp;msg) ;\n     }\n     return msg.wParam ;\n}\nPOINT Shot[500][2],Boundary,addShot[2],Box[1000][2];\nint nShot,isLeftDown,BoxHp[1000],nBox,BoxSpeed[1000];\nvoid DrawBox (HWND hwnd, POINT ptBeg, POINT ptEnd,HGDIOBJ a)\n{\n     HDC hdc ;\n     hdc = GetDC (hwnd) ;\n\t SelectObject (hdc,GetStockObject(NULL_PEN));\n     SelectObject (hdc, a) ;\n     Rectangle (hdc, ptBeg.x, ptBeg.y, ptEnd.x, ptEnd.y) ;\n     ReleaseDC (hwnd, hdc) ;\n}\nvoid CALLBACK MyTimer(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tHDC hdc=GetDC(hwnd);\n\tint i=0;\n\tSelectObject(hdc,GetStockObject(WHITE_PEN));\t\n\tfor(i=0;i&lt;nShot;i++)\n\t{\n\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t}\n\tfor(i=0;i&lt;nShot;i++)\n\t{\n\t\tif(Shot[i][0].x&gt;Boundary.x||Shot[i][0].x&lt;0\n\t\t\t||Shot[i][0].y&gt;Boundary.y||Shot[i][0].y&lt;0)\n\t\t{\n\t\t\tint j=i;\n\t\t\tfor(;j&lt;nShot-1;j++)\n\t\t\t{\n\t\t\t\tShot[j][0].x=Shot[j+1][0].x;\n\t\t\t\tShot[j][0].y=Shot[j+1][0].y;\n\t\t\t\tShot[j][1].x=Shot[j+1][1].x;\n\t\t\t\tShot[j][1].y=Shot[j+1][1].y;\n\t\t\t}\n\t\t\tnShot--;\n\t\t\ti--;\n\t\t}\n\t}\n\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\tfor(i=0;i&lt;nShot;i++)\n\t{\n\t\tShot[i][0].x+=Shot[i][1].x\/2;\n\t\tShot[i][0].y+=Shot[i][1].y\/2;\n\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t}\n\tReleaseDC(hwnd,hdc);\n}\nvoid CALLBACK AddShot(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tif(isLeftDown)\n\t{\n\t\tShot[nShot][0].x=addShot[0].x;\n\t\tShot[nShot][0].y=addShot[0].y;\n\t\tShot[nShot][1].x=addShot[1].x;\n\t\tShot[nShot][1].y=addShot[1].y;\n\t\tnShot++;\n\t}\n}\nvoid CALLBACK AddBox(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tint a=rand()%4,b,c=30+rand()%100*7\/10;\n\tif(a==0)\n\t{\n\t\tb=rand()%Boundary.x;\n\t\tBox[nBox][0].x=b-c;\n\t\tBox[nBox][0].y=-c;\n\t\tBox[nBox][1].x=b+c;\n\t\tBox[nBox][1].y=c;\n\t}\n\telse if(a==1)\n\t{\n\t\tb=rand()%Boundary.y;\n\t\tBox[nBox][0].x=Boundary.x-c;\n\t\tBox[nBox][0].y=b-c;\n\t\tBox[nBox][1].x=Boundary.x+c;\n\t\tBox[nBox][1].y=b+c;\n\t}\n\telse if(a==2)\n\t{\n\t\tb=rand()%Boundary.x;\n\t\tBox[nBox][0].x=b-c;\n\t\tBox[nBox][0].y=Boundary.y-c;\n\t\tBox[nBox][1].x=b+c;\n\t\tBox[nBox][1].y=Boundary.y+c;\n\t}\n\telse if(a==3)\n\t{\n\t\tb=rand()%Boundary.y;\n\t\tBox[nBox][0].x=-c;\n\t\tBox[nBox][0].y=b-c;\n\t\tBox[nBox][1].x=c;\n\t\tBox[nBox][1].y=b+c;\n\t}\n\tBoxSpeed[nBox]=2;\n\tBoxHp[nBox]=1+c\/25;\n\tDrawBox(hwnd,Box[nBox][0],Box[nBox][1],GetStockObject(BLACK_BRUSH));\n\tnBox++;\n}\nvoid CALLBACK BoxMove(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tint i,j;\n\tfor(i=0;i&lt;nBox;i++)\n\t{\n\t\tDrawBox(hwnd,Box[i][0],Box[i][1],GetStockObject(WHITE_BRUSH));\n\t}\n\tfor(i=0;i&lt;nBox;i++)\n\t{\n\t\tif(BoxHp[i]&lt;=0)\n\t\t{\n\t\t\tfor(j=i;j&lt;nBox-1;j++)\n\t\t\t{\n\t\t\t\tBoxHp[j]=BoxHp[j+1];\n\t\t\t\tBoxSpeed[j]=BoxSpeed[j+1];\n\t\t\t\tBox[j][0].x=Box[j+1][0].x;\n\t\t\t\tBox[j][0].y=Box[j+1][0].y;\n\t\t\t\tBox[j][1].x=Box[j+1][1].x;\n\t\t\t\tBox[j][1].y=Box[j+1][1].y;\n\t\t\t}\n\t\t\tnBox--;\n\t\t\ti--;\n\t\t}\n\t}\n\tfor(i=0;i&lt;nBox;i++)\n\t{\n\t\tj=sqrt(((Box[i][0].x+Box[i][1].x)\/2-Boundary.x\/2)*((Box[i][0].x+Box[i][1].x)\/2-Boundary.x\/2)\n\t\t\t+((Box[i][0].y+Box[i][1].y)\/2-Boundary.y\/2)*((Box[i][0].y+Box[i][1].y)\/2-Boundary.y\/2))\/BoxSpeed[i];\n\t\tint a=(Boundary.x\/2-(Box[i][0].x+Box[i][1].x)\/2)\/j;\n\t\tint b=(Boundary.y\/2-(Box[i][0].y+Box[i][1].y)\/2)\/j;\n\t\tBox[i][0].x+=a;\n\t\tBox[i][1].x+=a;\n\t\tBox[i][0].y+=b;\n\t\tBox[i][1].y+=b;\n\t}\n\tfor(i=0;i&lt;nBox;i++)\n\t{\n\t\tDrawBox(hwnd,Box[i][0],Box[i][1],GetStockObject(BLACK_BRUSH));\n\t}\n}\nvoid CALLBACK isShot(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tint i,j;\n\tHDC hdc=GetDC(hwnd);\n\tfor(i=0;i&lt;nShot;i++)\n\t{\n\t\tfor(j=0;j&lt;nBox;j++)\n\t\t{\n\t\t\tif(Shot[i][0].x+Shot[i][1].x&gt;=Box[j][0].x&amp;&amp;Shot[i][0].x+Shot[i][1].x&lt;=Box[j][1].x\n\t\t\t\t&amp;&amp;Shot[i][0].y+Shot[i][1].y&gt;=Box[j][0].y&amp;&amp;Shot[i][0].y+Shot[i][1].y&lt;=Box[j][1].y)\n\t\t\t{\n\t\t\t\tBoxHp[j]--;\n\t\t\t\tSelectObject(hdc,GetStockObject(WHITE_PEN));\t\n\t\t\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\t\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t\t\t\tint k=i;\n\t\t\t\tfor(;k&lt;nShot-1;k++)\n\t\t\t\t{\n\t\t\t\t\tShot[k][0].x=Shot[k+1][0].x;\n\t\t\t\t\tShot[k][0].y=Shot[k+1][0].y;\n\t\t\t\t\tShot[k][1].x=Shot[k+1][1].x;\n\t\t\t\t\tShot[k][1].y=Shot[k+1][1].y;\n\t\t\t\t}\n\t\t\t\tnShot--;\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t}\n\tReleaseDC(hwnd,hdc);\n}\nLRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)\n{\n     static POINT ptBeg, ptEnd,moEnd,fmoEnd;\n     HDC          hdc ;\n     PAINTSTRUCT  ps ;\n\t double k;\n\t int R=30;\n\t char s[100];\n\tswitch (message)\n\t{\n\tcase WM_CREATE:\n\t\tsrand((unsigned)time(NULL));\n\t\tnShot=nBox=0;isLeftDown=0;\n\t\tSetTimer(hwnd,0,30,MyTimer);\n\t\tSetTimer(hwnd,1,150,AddShot);\n\t\tSetTimer(hwnd,2,150,BoxMove);\n\t\tSetTimer(hwnd,3,1000,AddBox);\n\t\tSetTimer(hwnd,4,20,isShot);\n\tcase WM_SIZE :\n\t\tptBeg.x=LOWORD(lParam)\/2;\n\t\tptBeg.y=HIWORD(lParam)\/2;\n\t\tBoundary.x=LOWORD(lParam);\n\t\tBoundary.y=HIWORD(lParam);\t\n\t\treturn 0;\n\tcase WM_LBUTTONDOWN :\n\t\thdc=GetDC(hwnd);\n\t\tptEnd.x = GET_X_LPARAM (lParam) ;\n\t\tptEnd.y = GET_Y_LPARAM (lParam) ;\n\t\tk=sqrt(((ptEnd.x-ptBeg.x)*(ptEnd.x-ptBeg.x)\n\t\t\t+(ptEnd.y-ptBeg.y)*(ptEnd.y-ptBeg.y))\n\t\t\t\/(double)(R*R));\n\t\tif(k==0)\n\t\t{\n\t\t\tptEnd.x=ptBeg.x;\n\t\t\tptEnd.y=ptBeg.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tptEnd.x=ptBeg.x+(ptEnd.x-ptBeg.x)\/k*2;\n\t\t\tptEnd.y=ptBeg.y+(ptEnd.y-ptBeg.y)\/k*2;\t\t\t\t\t\n\t\t}\n\t\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\t\tMoveToEx(hdc,(ptBeg.x+ptEnd.x)\/2,(ptBeg.y+ptEnd.y)\/2,NULL);\n\t\tLineTo(hdc,ptEnd.x,ptEnd.y);\n\t\tReleaseDC(hwnd,hdc);\n\t\taddShot[0].x=Shot[nShot][0].x=(ptBeg.x+ptEnd.x)\/2;\n\t\taddShot[0].y=Shot[nShot][0].y=(ptBeg.y+ptEnd.y)\/2;\n\t\taddShot[1].x=Shot[nShot][1].x=ptEnd.x-(ptEnd.x+ptBeg.x)\/2;\n\t\taddShot[1].y=Shot[nShot][1].y=ptEnd.y-(ptEnd.y+ptBeg.y)\/2;\n\t\tnShot++;\n\t\tisLeftDown=1;\n\t\treturn 0 ;\n\tcase WM_LBUTTONUP :\n\t\tisLeftDown=0;\n\t\treturn 0;\n\tcase WM_MOUSEMOVE :\n\t\thdc=GetDC(hwnd);\n\t\tSelectObject(hdc,GetStockObject(WHITE_PEN));\n\t\tMoveToEx(hdc,ptBeg.x,ptBeg.y,NULL);\n\t\tLineTo(hdc,fmoEnd.x,fmoEnd.y);\n\t\tk=sqrt(((LOWORD(lParam)-ptBeg.x)*(LOWORD(lParam)-ptBeg.x)\n\t\t\t+(HIWORD(lParam)-ptBeg.y)*(HIWORD(lParam)-ptBeg.y))\n\t\t\t\/(double)(R*R));\n\t\tif(k==0)\n\t\t{\n\t\t\tmoEnd.x=ptBeg.x;\n\t\t\tmoEnd.y=ptBeg.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmoEnd.x=ptBeg.x+(LOWORD(lParam)-ptBeg.x)\/k;\n\t\t\tmoEnd.y=ptBeg.y+(HIWORD(lParam)-ptBeg.y)\/k;\t\t\t\t\t\n\t\t}\n\t\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\t\tMoveToEx(hdc,ptBeg.x,ptBeg.y,NULL);\n\t\tLineTo(hdc,moEnd.x,moEnd.y);\n\t\tfmoEnd.x=moEnd.x;\n\t\tfmoEnd.y=moEnd.y;\n\t\tReleaseDC(hwnd,hdc);\n\t\tif(isLeftDown)\n\t\t{\n\t\t\taddShot[0].x=moEnd.x;\n\t\t\taddShot[0].y=moEnd.y;\n\t\t\taddShot[1].x=moEnd.x-ptBeg.x;\n\t\t\taddShot[1].y=moEnd.y-ptBeg.y;\n\t\t}\n\t\treturn 0 ;\n\tcase WM_DESTROY :\n\t\tPostQuitMessage (0) ;\n\t\treturn 0 ;\n     }\n     return DefWindowProc (hwnd, message, wParam, lParam) ;\n}\n<\/code><\/pre>\n<p>\n   <br \/>\n   \u6700\u540e\u5c31\u662f\u5b8c\u5584\u5de5\u4f5c\uff0c\u8d34\u4e0a\u6700\u540e\u7684\u4ee3\u7801\n  <\/p>\n<pre><code class=\"language-cpp\">#include &lt;windows.h&gt;\n#include &lt;windowsx.h&gt;\n#include &lt;math.h&gt;\n#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n#include &lt;time.h&gt;\nLRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;\n\nint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,\n                    PSTR szCmdLine, int iCmdShow)\n{\n     static TCHAR szAppName[] = TEXT (\"BlokOut2\") ;\n     HWND         hwnd ;\n     MSG          msg ;\n     WNDCLASS     wndclass ;\n\n     wndclass.style         = CS_HREDRAW | CS_VREDRAW ;\n     wndclass.lpfnWndProc   = WndProc ;\n     wndclass.cbClsExtra    = 0 ;\n     wndclass.cbWndExtra    = 0 ;\n     wndclass.hInstance     = hInstance ;\n     wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;\n     wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW) ;\n     wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;\n     wndclass.lpszMenuName  = NULL ;\n     wndclass.lpszClassName = szAppName ;\n\n     if (!RegisterClass (&amp;wndclass))\n     {\n          MessageBox (NULL, TEXT (\"Program requires Windows NT!\"), \n                      szAppName, MB_ICONERROR) ;\n          return 0 ;\n     }\n    \n     hwnd = CreateWindow (szAppName, TEXT (\"defend 1.0\"),\n                          WS_OVERLAPPEDWINDOW,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          CW_USEDEFAULT, CW_USEDEFAULT,\n                          NULL, NULL, hInstance, NULL) ;\n     \n     ShowWindow (hwnd, SW_SHOWMAXIMIZED) ;\n     UpdateWindow (hwnd) ;\n     \n     while (GetMessage (&amp;msg, NULL, 0, 0))\n     {\n          TranslateMessage (&amp;msg) ;\n          DispatchMessage (&amp;msg) ;\n     }\n     return msg.wParam ;\n}\nPOINT Shot[50000][2],Boundary,addShot[2],Box[1000][2];\nint R,nShot,isLeftDown,BoxHp[1000],nBox,BoxSpeed[1000],weapen[5],peopleHp,weapenNum[5],boxNum,Step,isStar,isBoom;\nvoid DrawBox (HWND hwnd, POINT ptBeg, POINT ptEnd,HGDIOBJ a)\n{\n     HDC hdc ;\n     hdc = GetDC (hwnd) ;\n\t SelectObject (hdc,GetStockObject(NULL_PEN));\n     SelectObject (hdc, a) ;\n     Rectangle (hdc, ptBeg.x, ptBeg.y, ptEnd.x, ptEnd.y) ;\n     ReleaseDC (hwnd, hdc) ;\n}\nvoid CALLBACK PrintInfo(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tif(!isStar) return;\n\tHDC hdc=GetDC(hwnd);\n\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\tRectangle(hdc,Boundary.x\/2-50,10,Boundary.x\/2+50,30);\n\tSelectObject(hdc,(HBRUSH)CreateSolidBrush(RGB(255,0,0)));\n\tSelectObject(hdc,GetStockObject(NULL_PEN));\n\tif(peopleHp&lt;=0) peopleHp=0;\n\tRectangle(hdc,Boundary.x\/2-50,10,Boundary.x\/2-50+peopleHp,30);\n\tif(peopleHp==0)\n\t{\n\t\tSelectObject(hdc,GetStockObject(WHITE_BRUSH));\n\t\tRectangle(hdc,0,0,Boundary.x,Boundary.y);\n\t\tisStar=0;\n\t\tpeopleHp=100;\n\t\tif(MessageBox(NULL,TEXT(\"\u4f60\u6302\u4e86!\\n\u6309OK\u91cd\u65b0\u5f00\u59cb\"),TEXT(\"\u8f93\"),MB_OK)==IDOK)\n\t\t{\n\t\t\tMessageBox(NULL,TEXT(\"\u63091,2,3,4\u5207\u67aa\\n\u5728\u8fd9\u4e00\u5173\u4f60\u53ea\u80fd\u4f7f\u7528\u673a\u67aa\uff0c\u5b50\u5f39\u65e0\u9650\\n\u6309\u5de6\u952e\u653b\u51fb\"),TEXT(\"step 1\"),MB_OK);\n\t\t}\n\t\tnShot=nBox=0;isLeftDown=0;\n\t\tmemset(weapen,0,sizeof(weapen));\n\t\tmemset(weapenNum,0,sizeof(weapenNum[5]));\n\t\tboxNum=10;\n\t\tStep=0;\n\t\tisStar=isBoom=0;\n\t\tweapen[1]=1;\n\t\tBoxHp[0]=4;\n\t\tBoxSpeed[0]=2;\n\t\tpeopleHp=100;\n\t\tisStar=1;\n\t\tStep=1;\n\t}\n\tTCHAR s[100];\n\tint a,i;\n\tfor(i=2;i&lt;5;i++)\n\tif(weapen[i])\n\t{\n\t\ta=weapenNum[i];\n\t\tbreak;\n\t}\n\tif(weapen[1])\n\tsprintf(s,\"%d      |%d      |\u221e    \\0\",Step,boxNum);\n\telse   \n\tsprintf(s,\"%d      |%d      |%d     \\0\",Step,boxNum,a);\n\tif(weapen[1])\n\tTextOut(hdc,Boundary.x\/2-50,31,\"\u5173\u5361 \u602a\u7269 \u5f39\u836f\",strlen(\"\u5173\u5361 \u602a\u7269 \u5f39\u836f\"));\n\telse if(weapen[2])\n\tTextOut(hdc,Boundary.x\/2-50,31,\"\u5173\u5361 \u602a\u7269 \u6563\u5c04\",strlen(\"\u5173\u5361 \u602a\u7269 \u6563\u5c04\"));\n\telse if(weapen[3])\n\tTextOut(hdc,Boundary.x\/2-50,31,\"\u5173\u5361 \u602a\u7269 \u6fc0\u5149\",strlen(\"\u5173\u5361 \u602a\u7269 \u6fc0\u5149\"));\n\telse if(weapen[4])\n\tTextOut(hdc,Boundary.x\/2-50,31,\"\u5173\u5361 \u602a\u7269 \u6838\u7206\",strlen(\"\u5173\u5361 \u602a\u7269 \u6838\u7206\"));\n\t\/\/s[0]='1';s[1]='\\0';\n\tTextOut(hdc,Boundary.x\/2-50,46,s,strlen(s));\n\tif(boxNum&lt;=0) \n\t{\n\t\tisStar=0;\n\t\tnBox=0;\n\t\tnShot=0;\n\t\tSelectObject(hdc,GetStockObject(NULL_PEN));\n\t\tSelectObject(hdc,GetStockObject(WHITE_BRUSH));\n\t\tRectangle(hdc,0,0,Boundary.x,Boundary.y);\n\t\tif(Step==1)\n\t\t{\n\t\t\tMessageBox(NULL,TEXT(\"\u606d\u559c\u4f60\u901a\u8fc7\u7b2c\u4e00\u5173\\n\u4f60\u89e3\u9501\u4e86\u6563\u5c04\u67aa\u63092\u5207\u6362\"),TEXT(\"step 2\"),MB_OK);\n\t\t\tboxNum=20;\n\t\t\tmemset(weapenNum,0,sizeof(weapenNum));\n\t\t\tweapenNum[2]=1000;\n\t\t\tBoxSpeed[0]=5;\n\t\t\tBoxHp[0]=5;\n\t\t\tisBoom=0;\n\t\t\tisStar=1;\n\t\t\tStep=2;\n\t\t}\n\t\telse if(Step==2)\n\t\t{\n\t\t\tMessageBox(NULL,TEXT(\"\u606d\u559c\u4f60\u901a\u8fc7\u7b2c\u4e8c\u5173\\n\u4f60\u89e3\u9501\u4e86\u6fc0\u5149\u67aa\u63093\u5207\u6362\"),TEXT(\"step 3\"),MB_OK);\n\t\t\tboxNum=30;\n\t\t\tmemset(weapenNum,0,sizeof(weapenNum));\n\t\t\tweapenNum[2]=1000;\n\t\t\tweapenNum[3]=2000;\n\t\t\tBoxSpeed[0]=6;\n\t\t\tBoxHp[0]=15;\n\t\t\tisBoom=0;\n\t\t\tisStar=1;\n\t\t\tStep=3;\n\t\t}\n\t\telse if(Step==3)\n\t\t{\n\t\t\tMessageBox(NULL,TEXT(\"\u606d\u559c\u4f60\u901a\u8fc7\u7b2c\u4e09\u5173\\n\u4f60\u89e3\u9501\u4e86\u6838\u7206\uff01\u63094\u5207\u6362\\n\u53ea\u6709\u4e00\u6b21\uff0c\u8bf7\u8c28\u614e\u4f7f\u7528\"),TEXT(\"step 4\"),MB_OK);\n\t\t\tboxNum=40;\n\t\t\tmemset(weapenNum,0,sizeof(weapenNum));\n\t\t\tweapenNum[2]=4000;\n\t\t\tweapenNum[3]=6000;\n\t\t\tweapenNum[4]=1;\n\t\t\tBoxSpeed[0]=10;\n\t\t\tBoxHp[0]=40;\n\t\t\tisBoom=0;\n\t\t\tisStar=1;\n\t\t\tStep=4;\n\t\t}\n\t\telse if(Step==4)\n\t\t{\n\t\t\tMessageBox(NULL,TEXT(\"\u606d\u559c\u4f60\u901a\u8fc7\u7b2c\u56db\u5173\\n\"),TEXT(\"step 5\"),MB_OK);\n\t\t\tboxNum=40;\n\t\t\tmemset(weapenNum,0,sizeof(weapenNum));\n\t\t\tweapenNum[2]=6000;\n\t\t\tweapenNum[3]=7000;\n\t\t\tweapenNum[4]=1;\n\t\t\tBoxSpeed[0]=20;\n\t\t\tBoxHp[0]=60;\n\t\t\tisBoom=0;\n\t\t\tisStar=1;\n\t\t\tStep=5;\n\t\t}\n\t\telse if(Step==5)\n\t\t{\n\t\t\tMessageBox(NULL,TEXT(\"\u606d\u559c\u4f60\u901a\u8fc7\u7b2c\u4e94\u5173\\n\u656c\u8bf7\u671f\u5f85defend 2.0\"),TEXT(\"step 5\"),MB_OK);\n\t\t\tboxNum=10;\n\t\t\tmemset(weapenNum,0,sizeof(weapenNum));\n\t\t\tweapenNum[2]=1000;\n\t\t\tweapenNum[3]=2000;\n\t\t\tweapenNum[4]=1;\n\t\t\tBoxSpeed[0]=5;\n\t\t\tBoxHp[0]=40;\n\t\t\tisBoom=0;\n\t\t}\n\t}\n\tReleaseDC(hwnd,hdc);\n}\nvoid CALLBACK MyTimer(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tif(!isStar) return;\n\tHDC hdc=GetDC(hwnd);\n\tif(!weapen[4]||!isBoom)\n\t{\n\t\tint i=0;\n\t\tSelectObject(hdc,GetStockObject(WHITE_PEN));\t\n\t\tfor(i=isBoom;i&lt;nShot;i++)\n\t\t{\n\t\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t\t}\n\t\tfor(i=isBoom;i&lt;nShot;i++)\n\t\t{\n\t\t\tif(Shot[i][0].x&gt;Boundary.x||Shot[i][0].x&lt;0\n\t\t\t\t||Shot[i][0].y&gt;Boundary.y||Shot[i][0].y&lt;0)\n\t\t\t{\n\t\t\t\tint j=i;\n\t\t\t\tfor(;j&lt;nShot-1;j++)\n\t\t\t\t{\n\t\t\t\t\tShot[j][0].x=Shot[j+1][0].x;\n\t\t\t\t\tShot[j][0].y=Shot[j+1][0].y;\n\t\t\t\t\tShot[j][1].x=Shot[j+1][1].x;\n\t\t\t\t\tShot[j][1].y=Shot[j+1][1].y;\n\t\t\t\t}\n\t\t\t\tnShot--;\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\t\tfor(i=isBoom;i&lt;nShot;i++)\n\t\t{\n\t\t\tShot[i][0].x+=Shot[i][1].x\/2;\n\t\t\tShot[i][0].y+=Shot[i][1].y\/2;\n\t\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t\t}\n\t}\n\tif(isBoom)\n\t{\n\t\tint i,j;\n\t\tSelectObject(hdc,GetStockObject(WHITE_PEN));\n\t\tSelectObject(hdc,GetStockObject(NULL_BRUSH));\n\t\tfor(i=0;i&lt;isBoom;i++)\n\t\t{\n\t\t\tEllipse(hdc,Shot[i][0].x,Shot[i][0].y,Shot[i][1].x,Shot[i][1].y);\n\t\t\tShot[i][0].x-=2;\n\t\t\tShot[i][0].y-=2;\n\t\t\tShot[i][1].x+=2;\n\t\t\tShot[i][1].y+=2;\n\t\t}\n\t\tfor(i=0;i&lt;isBoom;i++)\n\t\t{\n\t\t\tif(Shot[i][1].x&gt;Boundary.x)\n\t\t\t{\n\t\t\t\tfor(j=i;j&lt;nShot-1;j++)\n\t\t\t\t{\n\t\t\t\t\tShot[j][0].x=Shot[j+1][0].x;\n\t\t\t\t\tShot[j][0].y=Shot[j+1][0].y;\n\t\t\t\t\tShot[j][1].x=Shot[j+1][1].x;\n\t\t\t\t\tShot[j][1].y=Shot[j+1][1].y;\n\t\t\t\t}\n\t\t\t\ti--;\n\t\t\t\tnShot--;\n\t\t\t\tisBoom--;\n\t\t\t}\n\t\t}\n\t\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\t\tfor(i=0;i&lt;isBoom;i++)\n\t\t{\n\t\t\tEllipse(hdc,Shot[i][0].x,Shot[i][0].y,Shot[i][1].x,Shot[i][1].y);\n\t\t}\n\t}\n\tReleaseDC(hwnd,hdc);\n}\nvoid CALLBACK AddShot(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tif(!isStar) return;\n\tif(isLeftDown)\n\t{\n\t\tif(weapen[1])\n\t\t{\n\t\t\tShot[nShot][0].x=addShot[0].x;\n\t\t\tShot[nShot][0].y=addShot[0].y;\n\t\t\tShot[nShot][1].x=addShot[1].x;\n\t\t\tShot[nShot][1].y=addShot[1].y;\n\t\t\tnShot++;\n\t\t}\n\t\telse if(weapen[2]&amp;&amp;weapenNum[2]&gt;0)\n\t\t{\n\t\t\tweapenNum[2]-=11;\n\t\t\tdouble a;\n\t\t\tif(addShot[0].x-Boundary.x\/2==0)\n\t\t\t{\n\t\t\t\ta=3.14159\/2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ta=atan((addShot[0].y-Boundary.y\/2)*1.0\/(addShot[0].x-Boundary.x\/2));\n\t\t\t}\n\t\t\tif((addShot[0].x-Boundary.x\/2)&lt;0) a+=3.1415926;\n\t\t\tShot[nShot][0].x=Boundary.x\/2+R*cos(a);\n\t\t\tShot[nShot][0].y=Boundary.y\/2+R*sin(a);\n\t\t\tShot[nShot][1].x=R*cos(a);\n\t\t\tShot[nShot][1].y=R*sin(a);\n\t\t\tnShot++;\n\t\t\tfor(int i=1;i&lt;=5;i++)\n\t\t\t{\n\t\t\t\tdouble b=a+i*3.14159\/60;\n\t\t\t\tif(b&gt;2*3.14159) b-=2*3.14159;\n\t\t\t\tShot[nShot][0].x=Boundary.x\/2+R*cos(b);\n\t\t\t\tShot[nShot][0].y=Boundary.y\/2+R*sin(b);\n\t\t\t\tShot[nShot][1].x=R*cos(b);\n\t\t\t\tShot[nShot][1].y=R*sin(b);\n\t\t\t\tnShot++;\n\t\t\t\tb=a-i*3.14159\/60;\n\t\t\t\tif(b&lt;0) b+=2*3.14159;\n\t\t\t\tShot[nShot][0].x=Boundary.x\/2+R*cos(b);\n\t\t\t\tShot[nShot][0].y=Boundary.y\/2+R*sin(b);\n\t\t\t\tShot[nShot][1].x=R*cos(b);\n\t\t\t\tShot[nShot][1].y=R*sin(b);\n\t\t\t\tnShot++;\n\t\t\t}\n\n\t\t}\n\t\telse if(weapen[3]&amp;&amp;weapenNum[3]&gt;0)\n\t\t{\n\t\t\tweapenNum[3]-=90;\n\t\t\tint i,j;\n\t\t\tfor(i=0;;i++)\n\t\t\t{\n\t\t\t\tif(addShot[0].x+addShot[1].x*i&gt;Boundary.x||addShot[0].x+addShot[1].x*i&lt;0\n\t\t\t\t\t||addShot[0].y+addShot[1].y*i&gt;Boundary.y||addShot[0].y+addShot[1].y*i&lt;0)\n\t\t\t\t\tbreak;\n\t\t\t\tfor(j=0;j&lt;10;j++)\n\t\t\t\t{\n\t\t\t\t\tShot[nShot][0].x=addShot[0].x+addShot[1].x*i;\n\t\t\t\t\tShot[nShot][0].y=addShot[0].y+addShot[1].y*i;\n\t\t\t\t\tShot[nShot][1].x=addShot[1].x;\n\t\t\t\t\tShot[nShot][1].y=addShot[1].y;\n\t\t\t\t\tnShot++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\nvoid CALLBACK AddBox(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tif(!isStar||boxNum&lt;=0) return;\n\tint a=rand()%4,b,c=30+rand()%100*7\/10;\n\tif(a==0)\n\t{\n\t\tb=rand()%Boundary.x;\n\t\tBox[nBox][0].x=b-c;\n\t\tBox[nBox][0].y=-c;\n\t\tBox[nBox][1].x=b+c;\n\t\tBox[nBox][1].y=c;\n\t}\n\telse if(a==1)\n\t{\n\t\tb=rand()%Boundary.y;\n\t\tBox[nBox][0].x=Boundary.x-c;\n\t\tBox[nBox][0].y=b-c;\n\t\tBox[nBox][1].x=Boundary.x+c;\n\t\tBox[nBox][1].y=b+c;\n\t}\n\telse if(a==2)\n\t{\n\t\tb=rand()%Boundary.x;\n\t\tBox[nBox][0].x=b-c;\n\t\tBox[nBox][0].y=Boundary.y-c;\n\t\tBox[nBox][1].x=b+c;\n\t\tBox[nBox][1].y=Boundary.y+c;\n\t}\n\telse if(a==3)\n\t{\n\t\tb=rand()%Boundary.y;\n\t\tBox[nBox][0].x=-c;\n\t\tBox[nBox][0].y=b-c;\n\t\tBox[nBox][1].x=c;\n\t\tBox[nBox][1].y=b+c;\n\t}\n\tBoxSpeed[nBox]=BoxSpeed[0];\n\t\/\/BoxHp[nBox]=1+c\/25;\n\tBoxHp[nBox]=Step*5;\n\tDrawBox(hwnd,Box[nBox][0],Box[nBox][1],GetStockObject(BLACK_BRUSH));\n\tnBox++;\n}\nvoid CALLBACK BoxMove(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tif(!isStar) return;\n\tint i,j;\n\tfor(i=0;i&lt;nBox;i++)\n\t{\n\t\tDrawBox(hwnd,Box[i][0],Box[i][1],GetStockObject(WHITE_BRUSH));\n\t}\n\tfor(i=0;i&lt;nBox;i++)\n\t{\n\t\tif(sqrt(((Box[i][0].x+Box[i][1].x)\/2-Boundary.x\/2)*((Box[i][0].x+Box[i][1].x)\/2-Boundary.x\/2)\n\t\t\t+((Box[i][0].y+Box[i][1].y)\/2-Boundary.y\/2)*((Box[i][0].y+Box[i][1].y)\/2-Boundary.y\/2))&lt;=50)\n\t\t{peopleHp-=10;BoxHp[i]=0;}\n\t\tif(BoxHp[i]&lt;=0)\n\t\t{\n\t\t\tboxNum--;\n\t\t\tfor(j=i;j&lt;nBox-1;j++)\n\t\t\t{\n\t\t\t\tBoxHp[j]=BoxHp[j+1];\n\t\t\t\tBoxSpeed[j]=BoxSpeed[j+1];\n\t\t\t\tBox[j][0].x=Box[j+1][0].x;\n\t\t\t\tBox[j][0].y=Box[j+1][0].y;\n\t\t\t\tBox[j][1].x=Box[j+1][1].x;\n\t\t\t\tBox[j][1].y=Box[j+1][1].y;\n\t\t\t}\n\t\t\tnBox--;\n\t\t\ti--;\n\t\t}\n\t}\n\tfor(i=0;i&lt;nBox;i++)\n\t{\n\t\tj=sqrt(((Box[i][0].x+Box[i][1].x)\/2-Boundary.x\/2)*((Box[i][0].x+Box[i][1].x)\/2-Boundary.x\/2)\n\t\t\t+((Box[i][0].y+Box[i][1].y)\/2-Boundary.y\/2)*((Box[i][0].y+Box[i][1].y)\/2-Boundary.y\/2))\/BoxSpeed[i];\n\t\tint a=(Boundary.x\/2-(Box[i][0].x+Box[i][1].x)\/2)\/j;\n\t\tint b=(Boundary.y\/2-(Box[i][0].y+Box[i][1].y)\/2)\/j;\n\t\tBox[i][0].x+=a;\n\t\tBox[i][1].x+=a;\n\t\tBox[i][0].y+=b;\n\t\tBox[i][1].y+=b;\n\t}\n\tfor(i=0;i&lt;nBox;i++)\n\t{\n\t\tDrawBox(hwnd,Box[i][0],Box[i][1],GetStockObject(BLACK_BRUSH));\n\t}\n}\nvoid CALLBACK isShot(HWND hwnd,UINT message ,UINT iTimerID,DWORD dwTime)\n{\n\tif(!isStar) return;\n\tint i,j;\n\tHDC hdc=GetDC(hwnd);\n\tif(!weapen[4]||!isBoom)\n\t{\n\t\tfor(i=isBoom;i&lt;nShot;i++)\n\t\t{\n\t\t\tfor(j=0;j&lt;nBox;j++)\n\t\t\t{\n\t\t\t\tif(Shot[i][0].x+Shot[i][1].x&gt;=Box[j][0].x&amp;&amp;Shot[i][0].x+Shot[i][1].x&lt;=Box[j][1].x\n\t\t\t\t\t&amp;&amp;Shot[i][0].y+Shot[i][1].y&gt;=Box[j][0].y&amp;&amp;Shot[i][0].y+Shot[i][1].y&lt;=Box[j][1].y)\n\t\t\t\t{\n\t\t\t\t\tBoxHp[j]--;\n\t\t\t\t\tSelectObject(hdc,GetStockObject(WHITE_PEN));\t\n\t\t\t\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\t\t\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t\t\t\t\tint k=i;\n\t\t\t\t\tfor(;k&lt;nShot-1;k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tShot[k][0].x=Shot[k+1][0].x;\n\t\t\t\t\t\tShot[k][0].y=Shot[k+1][0].y;\n\t\t\t\t\t\tShot[k][1].x=Shot[k+1][1].x;\n\t\t\t\t\t\tShot[k][1].y=Shot[k+1][1].y;\n\t\t\t\t\t}\n\t\t\t\t\tnShot--;\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(isBoom)\n\t{\n\t\tfor(i=0;i&lt;isBoom;i++)\n\t\t{\n\t\t\tdouble a=((Shot[i][1].x-Boundary.x\/2)*(Shot[i][1].x-Boundary.x\/2));\n\t\t\tfor(j=0;j&lt;nBox;j++)\n\t\t\t{\n\t\t\t\tdouble b=(((Box[j][0].x+Box[j][1].x)\/2-Boundary.x\/2)*((Box[j][0].x+Box[j][1].x)\/2-Boundary.x\/2)+\n\t\t\t\t\t\t\t ((Box[j][0].y+Box[j][1].y)\/2-Boundary.y\/2)*((Box[j][0].y+Box[j][1].y)\/2-Boundary.y\/2));\n\t\t\t\tif(a&gt;=b)\n\t\t\t\t{\n\t\t\t\t\tBoxHp[j]=0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tReleaseDC(hwnd,hdc);\n}\nLRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)\n{\n     static POINT ptBeg, ptEnd,moEnd,fmoEnd;\n     HDC          hdc ;\n     PAINTSTRUCT  ps ;\n\t double k;\n\t char s[100];\n\tswitch (message)\n\t{\n\tcase WM_CREATE:\n\t\tsrand((unsigned)time(NULL));\n\t\tnShot=nBox=0;isLeftDown=0;\n\t\tSetTimer(hwnd,0,30,MyTimer);\n\t\tSetTimer(hwnd,1,150,AddShot);\n\t\tSetTimer(hwnd,2,150,BoxMove);\n\t\tSetTimer(hwnd,3,1000,AddBox);\n\t\tSetTimer(hwnd,4,20,isShot);\n\t\tSetTimer(hwnd,5,20,PrintInfo);\n\t\tmemset(weapen,0,sizeof(weapen));\n\t\tpeopleHp=100;\n\t\tmemset(weapenNum,0,sizeof(weapenNum[5]));\n\t\tboxNum=10;\n\t\tStep=0;\n\t\tisStar=isBoom=0;\n\t\tweapen[1]=1;\n\t\tBoxHp[0]=4;\n\t\tBoxSpeed[0]=4;\n\t\tR=30;\n\t\tif(MessageBox(NULL,TEXT(\"\u63091,2,3,4\u5207\u67aa\\n\u5728\u8fd9\u4e00\u5173\u4f60\u53ea\u80fd\u4f7f\u7528\u673a\u67aa\uff0c\u5b50\u5f39\u65e0\u9650\\n\u6309\u5de6\u952e\u653b\u51fb\"),TEXT(\"step 1\"),MB_OK)==IDOK) \n\t\t{\n\t\t\tisStar=1;\n\t\t\tStep=1;\n\t\t}\n\t\treturn 0;\n\tcase WM_SIZE :\n\t\tptBeg.x=LOWORD(lParam)\/2;\n\t\tptBeg.y=HIWORD(lParam)\/2;\n\t\tBoundary.x=LOWORD(lParam);\n\t\tBoundary.y=HIWORD(lParam);\t\n\t\treturn 0;\n\tcase WM_LBUTTONDOWN :\n\t\tif(!isStar) return 0;\n\t\thdc=GetDC(hwnd);\n\t\tptEnd.x = GET_X_LPARAM (lParam) ;\n\t\tptEnd.y = GET_Y_LPARAM (lParam) ;\n\t\tif(weapen[1])\n\t\t{\n\t\t\tk=sqrt(((ptEnd.x-ptBeg.x)*(ptEnd.x-ptBeg.x)\n\t\t\t\t+(ptEnd.y-ptBeg.y)*(ptEnd.y-ptBeg.y))\n\t\t\t\t\/(double)(R*R));\n\t\t\tif(k==0)\n\t\t\t{\n\t\t\t\tptEnd.x=ptBeg.x;\n\t\t\t\tptEnd.y=ptBeg.y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tptEnd.x=ptBeg.x+(ptEnd.x-ptBeg.x)\/k*2;\n\t\t\t\tptEnd.y=ptBeg.y+(ptEnd.y-ptBeg.y)\/k*2;\t\t\t\t\t\n\t\t\t}\n\t\t\taddShot[0].x=Shot[nShot][0].x=(ptBeg.x+ptEnd.x)\/2;\n\t\t\taddShot[0].y=Shot[nShot][0].y=(ptBeg.y+ptEnd.y)\/2;\n\t\t\taddShot[1].x=Shot[nShot][1].x=ptEnd.x-(ptEnd.x+ptBeg.x)\/2;\n\t\t\taddShot[1].y=Shot[nShot][1].y=ptEnd.y-(ptEnd.y+ptBeg.y)\/2;\n\t\t\tnShot++;\n\t\t}\n\t\telse if(weapen[2]&amp;&amp;weapenNum[2]&gt;0)\n\t\t{\n\t\t\tdouble a;\n\t\t\tweapenNum[2]-=11;\n\t\t\tif(ptEnd.x-ptBeg.x==0)\n\t\t\t{\n\t\t\t\ta=3.14159\/2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ta=atan((ptEnd.y-ptBeg.y)*1.0\/(ptEnd.x-ptBeg.x));\n\t\t\t}\n\t\t\tif((ptEnd.x-ptBeg.x)&lt;0) a+=3.1415926;\n\t\t\taddShot[0].x=ptEnd.x;\n\t\t\taddShot[0].y=ptEnd.y;\n\t\t\tShot[nShot][0].x=ptBeg.x+R*cos(a);\n\t\t\tShot[nShot][0].y=ptBeg.y+R*sin(a);\n\t\t\tShot[nShot][1].x=R*cos(a);\n\t\t\tShot[nShot][1].y=R*sin(a);\n\t\t\tnShot++;\n\t\t\tfor(int i=1;i&lt;=5;i++)\n\t\t\t{\n\t\t\t\tdouble b=a+i*3.14159\/60;\n\t\t\t\tif(b&gt;2*3.14159) b-=2*3.14159;\n\t\t\t\tShot[nShot][0].x=ptBeg.x+R*cos(b);\n\t\t\t\tShot[nShot][0].y=ptBeg.y+R*sin(b);\n\t\t\t\tShot[nShot][1].x=R*cos(b);\n\t\t\t\tShot[nShot][1].y=R*sin(b);\n\t\t\t\tnShot++;\n\t\t\t\tb=a-i*3.14159\/60;\n\t\t\t\tif(b&lt;0) b+=2*3.14159;\n\t\t\t\tShot[nShot][0].x=ptBeg.x+R*cos(b);\n\t\t\t\tShot[nShot][0].y=ptBeg.y+R*sin(b);\n\t\t\t\tShot[nShot][1].x=R*cos(b);\n\t\t\t\tShot[nShot][1].y=R*sin(b);\n\t\t\t\tnShot++;\n\t\t\t}\n\t\t}\n\t\telse if(weapen[3]&amp;&amp;weapenNum[3]&gt;0)\n\t\t{\n\t\t\tweapenNum[3]-=90;\n\t\t\tk=sqrt(((ptEnd.x-ptBeg.x)*(ptEnd.x-ptBeg.x)\n\t\t\t\t+(ptEnd.y-ptBeg.y)*(ptEnd.y-ptBeg.y))\n\t\t\t\t\/(double)(R*R));\n\t\t\tif(k==0)\n\t\t\t{\n\t\t\t\tptEnd.x=ptBeg.x;\n\t\t\t\tptEnd.y=ptBeg.y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tptEnd.x=ptBeg.x+(ptEnd.x-ptBeg.x)\/k*2;\n\t\t\t\tptEnd.y=ptBeg.y+(ptEnd.y-ptBeg.y)\/k*2;\t\t\t\t\t\n\t\t\t}\n\t\t\taddShot[0].x=Shot[nShot][0].x=(ptBeg.x+ptEnd.x)\/2;\n\t\t\taddShot[0].y=Shot[nShot][0].y=(ptBeg.y+ptEnd.y)\/2;\n\t\t\taddShot[1].x=Shot[nShot][1].x=(ptEnd.x-ptBeg.x)\/2;\n\t\t\taddShot[1].y=Shot[nShot][1].y=(ptEnd.y-ptBeg.y)\/2;\n\t\t\tnShot++;\n\t\t\tint i,j;\n\t\t\tfor(i=0;;i++)\n\t\t\t{\n\t\t\t\tif((ptBeg.x+ptEnd.x)\/2+(ptEnd.x-ptBeg.x)\/2*i&gt;Boundary.x||(ptBeg.x+ptEnd.x)\/2+(ptEnd.x-ptBeg.x)\/2*i&lt;0\n\t\t\t\t\t||(ptBeg.y+ptEnd.y)\/2+(ptEnd.y-ptBeg.y)\/2*i&gt;Boundary.y||(ptBeg.y+ptEnd.y)\/2+(ptEnd.y-ptBeg.y)\/2*i&lt;0)\n\t\t\t\t\tbreak;\n\t\t\t\tfor(j=0;j&lt;10;j++)\n\t\t\t\t{\n\t\t\t\t\tShot[nShot][0].x=(ptBeg.x+ptEnd.x)\/2+(ptEnd.x-ptBeg.x)\/2*i;\n\t\t\t\t\tShot[nShot][0].y=(ptBeg.y+ptEnd.y)\/2+(ptEnd.y-ptBeg.y)\/2*i;\n\t\t\t\t\tShot[nShot][1].x=(ptEnd.x-ptBeg.x)\/2;\n\t\t\t\t\tShot[nShot][1].y=(ptEnd.y-ptBeg.y)\/2;\n\t\t\t\t\tnShot++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(weapen[4]&amp;&amp;weapenNum[4]&gt;0)\n\t\t{\n\t\t\tweapenNum[4]--;\n\t\t\tint i;\n\t\t\tSelectObject(hdc,GetStockObject(WHITE_PEN));\t\n\t\t\tfor(i=0;i&lt;nShot;i++)\n\t\t\t{\n\t\t\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\t\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t\t\t}\n\t\t\tnShot=0;\n\t\t\tfor(i=0;i&lt;10;i++)\n\t\t\t{\n\t\t\t\tShot[nShot][0].x=ptBeg.x-20-5*i;\n\t\t\t\tShot[nShot][0].y=ptBeg.y-20-5*i;\n\t\t\t\tShot[nShot][1].x=ptBeg.x+20+5*i;\n\t\t\t\tShot[nShot][1].y=ptBeg.y+20+5*i;\n\t\t\t\tnShot++;\n\t\t\t}\n\t\t\tisBoom=10;\n\t\t}\n\t\tReleaseDC(hwnd,hdc);\n\t\tisLeftDown=1;\n\t\treturn 0 ;\n\tcase WM_LBUTTONUP :\n\t\tisLeftDown=0;\n\t\treturn 0;\n\tcase WM_MOUSEMOVE :\n\t\tif(!isStar) return 0;\n\t\thdc=GetDC(hwnd);\n\t\tSelectObject(hdc,GetStockObject(WHITE_PEN));\n\t\tMoveToEx(hdc,ptBeg.x,ptBeg.y,NULL);\n\t\tLineTo(hdc,fmoEnd.x,fmoEnd.y);\n\t\tk=sqrt(((LOWORD(lParam)-ptBeg.x)*(LOWORD(lParam)-ptBeg.x)\n\t\t\t+(HIWORD(lParam)-ptBeg.y)*(HIWORD(lParam)-ptBeg.y))\n\t\t\t\/(double)(R*R));\n\t\tif(k==0)\n\t\t{\n\t\t\tmoEnd.x=ptBeg.x;\n\t\t\tmoEnd.y=ptBeg.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmoEnd.x=ptBeg.x+(LOWORD(lParam)-ptBeg.x)\/k;\n\t\t\tmoEnd.y=ptBeg.y+(HIWORD(lParam)-ptBeg.y)\/k;\t\t\t\t\t\n\t\t}\n\t\t\/*sprintf(s,\"%d  %d  %lf  %d  %d  %d  %d  %d\",ptBeg.x,ptBeg.y,k,(LOWORD(lParam)-ptBeg.x)*(LOWORD(lParam)-ptBeg.x)\n\t\t\t+(HIWORD(lParam)-ptBeg.y)*(HIWORD(lParam)-ptBeg.y),moEnd.x,moEnd.y,LOWORD(lParam),HIWORD(lParam));\n\t\tMessageBox(NULL,s,TEXT(\"\u8c03\u8bd5\"),NULL);*\/\n\t\tSelectObject(hdc,GetStockObject(BLACK_PEN));\n\t\tMoveToEx(hdc,ptBeg.x,ptBeg.y,NULL);\n\t\tLineTo(hdc,moEnd.x,moEnd.y);\n\t\tfmoEnd.x=moEnd.x;\n\t\tfmoEnd.y=moEnd.y;\n\t\tReleaseDC(hwnd,hdc);\n\t\tif(isLeftDown)\n\t\t{\n\t\t\taddShot[0].x=moEnd.x;\n\t\t\taddShot[0].y=moEnd.y;\n\t\t\taddShot[1].x=moEnd.x-ptBeg.x;\n\t\t\taddShot[1].y=moEnd.y-ptBeg.y;\n\t\t}\n\t\treturn 0 ;\n\tcase WM_RBUTTONDOWN:\n\t\t\n\t\treturn 0 ;\n \n\tcase WM_CHAR :\n\t\tswitch (wParam)\n\t\t{\n\t\t\tcase '1':\n\t\t\tmemset(weapen,0,sizeof(weapen));\n\t\t\tweapen[1]=1;\n\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\tmemset(weapen,0,sizeof(weapen));\n\t\t\tweapen[2]=1;\n\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\tmemset(weapen,0,sizeof(weapen));\n\t\t\tweapen[3]=1;\n\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\tif(!isStar) break;\n\t\t\tmemset(weapen,0,sizeof(weapen));\n\t\t\thdc=GetDC(hwnd);\n\t\t\tif(weapenNum[4]&gt;0&amp;&amp;isLeftDown)\n\t\t\t{\n\t\t\t\tweapenNum[4]--;\n\t\t\t\tint i;\n\t\t\t\tSelectObject(hdc,GetStockObject(WHITE_PEN));\t\n\t\t\t\tfor(i=0;i&lt;nShot;i++)\n\t\t\t\t{\n\t\t\t\t\tMoveToEx(hdc,Shot[i][0].x,Shot[i][0].y,NULL);\n\t\t\t\t\tLineTo(hdc,Shot[i][0].x+Shot[i][1].x,Shot[i][0].y+Shot[i][1].y);\n\t\t\t\t}\n\t\t\t\tnShot=0;\n\t\t\t\tfor(i=0;i&lt;10;i++)\n\t\t\t\t{\n\t\t\t\t\tShot[nShot][0].x=ptBeg.x-20-5*i;\n\t\t\t\t\tShot[nShot][0].y=ptBeg.y-20-5*i;\n\t\t\t\t\tShot[nShot][1].x=ptBeg.x+20+5*i;\n\t\t\t\t\tShot[nShot][1].y=ptBeg.y+20+5*i;\n\t\t\t\t\tnShot++;\n\t\t\t\t}\n\t\t\t\tisBoom=10;\n\t\t\t}\n\t\t\tweapen[4]=1;\n\t\t\tReleaseDC(hwnd,hdc);\n\t\t\tbreak;\n\t\t}\n\t\treturn 0 ;\n  \n\tcase WM_PAINT :\n\t\thdc = BeginPaint (hwnd, &amp;ps) ;\n\t\tEndPaint (hwnd, &amp;ps) ;\n\t\treturn 0 ;\n\n\tcase WM_DESTROY :\n\t\tPostQuitMessage (0) ;\n\t\treturn 0 ;\n     }\n     return DefWindowProc (hwnd, message, wParam, lParam) ;\n}\n<\/code><\/pre>\n<p>\n   \n  <\/p>\n<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6691\u5047\u51c6\u5907\u505a\u4e2a\u5c0f\u6e38\u620f\uff0c\u5728\u6b64\u628a\u6559\u7a0b\u5199\u51fa\u6765\uff0c\u5e0c\u671b\u5bf9\u522b\u4eba\u6709\u5e2e\u52a9\u3002 \u6e38\u620f\u7684\u57fa\u672c\u60f3\u6cd5\uff1a\u7ed9\u4f60\u4e00\u628a\u67aa(\u5b9e\u9645\u662f\u7528\u76f4\u7ebf\u4ee3\u66ff\u7684)\u5728\u5c4f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":215,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-2716","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-23"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Defend \u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-\u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Defend \u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"og:description\" content=\"\u6691\u5047\u51c6\u5907\u505a\u4e2a\u5c0f\u6e38\u620f\uff0c\u5728\u6b64\u628a\u6559\u7a0b\u5199\u51fa\u6765\uff0c\u5e0c\u671b\u5bf9\u522b\u4eba\u6709\u5e2e\u52a9\u3002 \u6e38\u620f\u7684\u57fa\u672c\u60f3\u6cd5\uff1a\u7ed9\u4f60\u4e00\u628a\u67aa(\u5b9e\u9645\u662f\u7528\u76f4\u7ebf\u4ee3\u66ff\u7684)\u5728\u5c4f [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-\u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-24T22:00:12+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"260\" \/>\n\t<meta property=\"og:image:height\" content=\"180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin@wunen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@wunen\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"28 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/\"},\"author\":{\"name\":\"admin@wunen\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\"},\"headline\":\"Defend \u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b\",\"datePublished\":\"2025-05-24T22:00:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/\"},\"wordCount\":39,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/www.wunen.com\/#organization\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"articleSection\":[\"\u5c04\u51fb\u6e38\u620f\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/\",\"url\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/\",\"name\":\"Defend \u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"isPartOf\":{\"@id\":\"http:\/\/www.wunen.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"datePublished\":\"2025-05-24T22:00:12+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#primaryimage\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"width\":260,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/www.wunen.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Defend \u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.wunen.com\/#website\",\"url\":\"http:\/\/www.wunen.com\/\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"description\":\"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9\",\"publisher\":{\"@id\":\"http:\/\/www.wunen.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.wunen.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/www.wunen.com\/#organization\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"url\":\"http:\/\/www.wunen.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"width\":1024,\"height\":1024,\"caption\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\",\"name\":\"admin@wunen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"caption\":\"admin@wunen\"},\"sameAs\":[\"http:\/\/www.wunen.com\"],\"url\":\"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Defend \u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-\u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b\/","og_locale":"zh_CN","og_type":"article","og_title":"Defend \u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","og_description":"\u6691\u5047\u51c6\u5907\u505a\u4e2a\u5c0f\u6e38\u620f\uff0c\u5728\u6b64\u628a\u6559\u7a0b\u5199\u51fa\u6765\uff0c\u5e0c\u671b\u5bf9\u522b\u4eba\u6709\u5e2e\u52a9\u3002 \u6e38\u620f\u7684\u57fa\u672c\u60f3\u6cd5\uff1a\u7ed9\u4f60\u4e00\u628a\u67aa(\u5b9e\u9645\u662f\u7528\u76f4\u7ebf\u4ee3\u66ff\u7684)\u5728\u5c4f [&hellip;]","og_url":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-\u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b\/","og_site_name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","article_published_time":"2025-05-24T22:00:12+00:00","og_image":[{"width":260,"height":180,"url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","type":"image\/jpeg"}],"author":"admin@wunen","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin@wunen","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"28 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#article","isPartOf":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/"},"author":{"name":"admin@wunen","@id":"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8"},"headline":"Defend \u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b","datePublished":"2025-05-24T22:00:12+00:00","mainEntityOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/"},"wordCount":39,"commentCount":0,"publisher":{"@id":"http:\/\/www.wunen.com\/#organization"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","articleSection":["\u5c04\u51fb\u6e38\u620f"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/","url":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/","name":"Defend \u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","isPartOf":{"@id":"http:\/\/www.wunen.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#primaryimage"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","datePublished":"2025-05-24T22:00:12+00:00","breadcrumb":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#primaryimage","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","width":260,"height":180},{"@type":"BreadcrumbList","@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/25\/defend-%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f%e6%95%99%e7%a8%8b\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/www.wunen.com\/"},{"@type":"ListItem","position":2,"name":"Defend \u5c04\u51fb\u5c0f\u6e38\u620f\u6559\u7a0b"}]},{"@type":"WebSite","@id":"http:\/\/www.wunen.com\/#website","url":"http:\/\/www.wunen.com\/","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","description":"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9","publisher":{"@id":"http:\/\/www.wunen.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.wunen.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"http:\/\/www.wunen.com\/#organization","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","url":"http:\/\/www.wunen.com\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","width":1024,"height":1024,"caption":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51"},"image":{"@id":"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8","name":"admin@wunen","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","caption":"admin@wunen"},"sameAs":["http:\/\/www.wunen.com"],"url":"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/"}]}},"_links":{"self":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/2716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/comments?post=2716"}],"version-history":[{"count":0,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/2716\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media\/215"}],"wp:attachment":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media?parent=2716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/categories?post=2716"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/tags?post=2716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}