Home
Problem
Status
Contest
Workbook
User
Group
Forum
Register
Login
{"managingGroups":{},"author":"hzoi2017_wty","updateTime":1558523264000,"title":"chr\u0027s","dislikeCnt":0,"content":"```cpp\n#include\u003cbits/stdc++.h\u003e\n#include\u003cwindows.h\u003e\n#include\u003cgl/gl.h\u003e\nULONG WINAPI setup(LPVOID param);\nLRESULT CALLBACK WndProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam);\nvoid EnableOpenGL(HWND hWnd,HDC*hDC,HGLRC*hRC);\nvoid DisableOpenGL(HWND hWnd,HDC hDC,HGLRC hRC);\nint finished;\nint WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int iCmdShow){\n\tWNDCLASS wc;\n\tHWND hWnd;\n\tHDC hDC;\n\tHGLRC hRC;\n\tMSG msg;\n\tBOOL bQuit\u003dFALSE;\n\twc.style\u003dCS_GLOBALCLASS;\n\twc.lpfnWndProc\u003dWndProc;\n\twc.cbClsExtra\u003d0;\n\twc.cbWndExtra\u003d0;\n\twc.hInstance\u003dhInstance;\n\twc.hIcon\u003dLoadIcon(NULL,IDI_WINLOGO);\n\twc.hCursor\u003dLoadCursor(NULL,IDC_ARROW);\n\twc.hbrBackground\u003d(HBRUSH)GetStockObject(WHITE_BRUSH);\n\twc.lpszMenuName\u003dNULL;\n\twc.lpszClassName\u003d\"HZOI_setup\";\n\tRegisterClass(\u0026wc);\n\tconst int height\u003d250;\n\tconst int width\u003d400;\n\thWnd\u003dCreateWindow(/*WS_EX_LAYERED,*/\n\t \"HZOI_setup\",\"HZOI_setup\",\n\t WS_POPUP|WS_VISIBLE,\n\t (1365-(width+1))\u003e\u003e1,(767-(height+1))\u003e\u003e1,(width+1),(height+1),\n\t NULL,NULL,hInstance,NULL);\n\t\tSetLayeredWindowAttributes(hWnd,0x0,0,LWA_COLORKEY);\n\tEnableOpenGL(hWnd,\u0026hDC,\u0026hRC);\n\tULONG pid;\n//\t/*HANDLE th\u003d*/CreateThread(NULL,0,setup,NULL,0,\u0026pid);\n\tfloat theta\u003d0.0f;\n\tdouble pos[5];\n\tpos[0]\u003d-2.5f;\n\tfor(int i\u003d1;i\u003c5;i++)\n\t\tpos[i]\u003dpos[i-1]-0.5f;\n\tdouble k\u003d1.0f,shade\u003d1.0f,ed\u003d-2.0f;\n\twhile(!bQuit){\n\t\tSetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE);\n\t\tif(PeekMessage(\u0026msg,NULL,0,0,PM_REMOVE)){\n\t\t\tif(msg.message\u003d\u003dWM_QUIT){\n\t\t\t\tbQuit\u003dTRUE;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tTranslateMessage(\u0026msg);\n\t\t\t\tDispatchMessage(\u0026msg);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(~finished\u0026\u0026k\u003e0.8f){\n\t\t\t\tconst double speed\u003d0.0003f;\n\t\t\t\tshade-\u003dspeed*5;\n\t\t\t\tk-\u003dspeed;\n\t\t\t}\n\t\t\tif(!~finished\u0026\u0026k\u003c1.0f){\n\t\t\t\tconst double speed\u003d0.0006f;\n\t\t\t\tshade+\u003dspeed*5;\n\t\t\t\tk+\u003dspeed;\n\t\t\t}\n\t\t\tif(!~finished\u0026\u0026k\u003e\u003d1.0f)\n\t\t\t\treturn 0;\n\t\t\tglEnable(GL_ALPHA_TEST);\n\t\t\tglEnable(GL_SMOOTH);\n\t\t\tglEnable(GL_BLEND);\n\t\t\tglBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);\n\t\t\tglClearColor(shade,k,k,1.0f);\n\t\t\tglClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);\n\t\t\tglPushMatrix();\n\t\t\t// points\n\t\t\t{\n\t\t\t\tif(~finished){\n\t\t\t\t\tfor(int i\u003d0;i\u003c5;i++){\n\t\t\t\t\t\tglPointSize(4.0f);\n\t\t\t\t\t\tglBegin(GL_POINTS);\n\t\t\t\t\t\tglColor3d(1.0f,1.0f,1.0f);\n\t\t\t\t\t\tglVertex2d(pos[i],-0.5f);\n\t\t\t\t\t\tglEnd();\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\ted+\u003d0.02f;\n\t\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\t\tfor(int k\u003d0;k\u003c4;k++){\n\t\t\t\t\t\tglColor3d(1.0f,1.0f,1.0f);\n\t\t\t\t\t\tstatic const double psize\u003d0.01f;\n\t\t\t\t\t\tdouble excx[]\u003d{0.0f,0.0f,-ed-2.0f,-ed-2.0f};\n\t\t\t\t\t\tstatic const double excy[]\u003d{-psize,psize,psize,-psize};\n\t\t\t\t\t\tglVertex2d(ed+excx[k],-0.5f+excy[k]);\n\t\t\t\t\t}\n\t\t\t\t\tglEnd();\n\t\t\t\t}\n\t\t\t}\n\t\t\tglLineWidth(1.1f);\n\t\t\tconst double target_r\u003d0.4f;\n\t\t\tconst double target_g\u003d1.0f;\n\t\t\tconst double target_b\u003d0.8f;\n\t\t\t// H\n\t\t\t{\n\t\t\t\tdouble r\u003d1.0f;\n\t\t\t\tdouble g\u003d0.0f;\n\t\t\t\tdouble b\u003d0.0f;\n\t\t\t\tr-\u003d(r-target_r)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tg-\u003d(g-target_g)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tb-\u003d(b-target_b)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tconst double exc\u003d0.15f;\n\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.5f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.45f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.45f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.5f+exc,0.05f);\n\t\t\t\tglEnd();\n\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.5f+exc,0.175f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.55f+exc,0.175f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.55f+exc,0.275f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.5f+exc,0.275f);\n\t\t\t\tglEnd();\n\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.55f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.6f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.6f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.55f+exc,0.4f);\n\t\t\t\tglEnd();\n\t\t\t}\n\t\t\t// H\n\t\t\t{\n\t\t\t\tdouble r\u003d0.0f;\n\t\t\t\tdouble g\u003d0.0f;\n\t\t\t\tdouble b\u003d0.0f;\n\t\t\t\tconst double exc\u003d0.15f;\n\t\t\t\tglBegin(GL_LINE_LOOP);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.45f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.45f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.5f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.5f+exc,0.175f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.55f+exc,0.175f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.55f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.6f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.6f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.55f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.55f+exc,0.275f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.5f+exc,0.275f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.5f+exc,0.4f);\n\t\t\t\tglEnd();\n\t\t\t}\n\t\t\t// Z\n\t\t\t{\n\t\t\t\tdouble r\u003d1.0f;\n\t\t\t\tdouble g\u003d1.0f;\n\t\t\t\tdouble b\u003d0.0f;\n\t\t\t\tr-\u003d(r-target_r)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tg-\u003d(g-target_g)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tb-\u003d(b-target_b)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tconst double exc\u003d0.05f;\n\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.25f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.1f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.1f+exc,0.33f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.25f+exc,0.33f);\n\t\t\t\tglEnd();\n\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.1f+exc,0.33f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.15f+exc,0.33f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.25f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.2f+exc,0.12f);\n\t\t\t\tglEnd();\n\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.1f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.1f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.25f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.25f+exc,0.12f);\n\t\t\t\tglEnd();\n\t\t\t}\n\t\t\t// Z\n\t\t\t{\n\t\t\t\tdouble r\u003d0.0f;\n\t\t\t\tdouble g\u003d0.0f;\n\t\t\t\tdouble b\u003d0.0f;\n\t\t\t\tconst double exc\u003d0.05f;\n\t\t\t\tglBegin(GL_LINE_LOOP);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.25f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.1f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.1f+exc,0.33f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.2f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.1f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.1f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.25f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.25f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.15f+exc,0.33f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(-0.25f+exc,0.33f);\n\t\t\t\tglEnd();\n\t\t\t}\n\t\t\t// O\n\t\t\t{\n\t\t\t\tdouble r\u003d0.0f;\n\t\t\t\tdouble g\u003d1.0f;\n\t\t\t\tdouble b\u003d0.0f;\n\t\t\t\tr-\u003d(r-target_r)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tg-\u003d(g-target_g)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tb-\u003d(b-target_b)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tconst double exc\u003d-0.05f;\n\t\t\t\tdouble each\u003d5.0f;\n\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tconst double cir\u003d3.14159265358979323846*2;\n\t\t\t\tfor(double theta\u003d0;theta\u003ccir;theta+\u003d0.1f){\n\t\t\t\t\tglColor3d(r,g,b);\n\t\t\t\t\tglVertex2d(sin(theta)/each/1.8f+0.2f+exc,cos(theta)/each+0.225f);\n\t\t\t\t}\n\t\t\t\tglEnd();\n\t\t\t\teach\u003d7.5f;\n\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tfor(double theta\u003d0;theta\u003ccir;theta+\u003d0.01f){\n\t\t\t\t\tglColor3d(shade,k,k);\n\t\t\t\t\tglVertex2d(sin(theta)/each/1.8f+0.2f+exc,cos(theta)/each+0.225f);\n\t\t\t\t}\n\t\t\t\tglEnd();\n\t\t\t}\n\t\t\t// O\n\t\t\t{\n\t\t\t\tdouble r\u003d0.0f;\n\t\t\t\tdouble g\u003d0.0f;\n\t\t\t\tdouble b\u003d0.0f;\n\t\t\t\tconst double exc\u003d-0.05f;\n\t\t\t\tdouble each\u003d5.0f;\n\t\t\t\tglBegin(GL_LINE_LOOP);\n\t\t\t\tconst double cir\u003d3.14159265358979323846*2;\n\t\t\t\tfor(double theta\u003d0;theta\u003ccir;theta+\u003d0.1f){\n\t\t\t\t\tglColor3d(r,g,b);\n\t\t\t\t\tglVertex2d(sin(theta)/each/1.8f+0.2f+exc,cos(theta)/each+0.225f);\n\t\t\t\t}\n\t\t\t\tglEnd();\n\t\t\t\teach\u003d7.4f;\n\t\t\t\tglBegin(GL_LINE_LOOP);\n\t\t\t\tfor(double theta\u003d0;theta\u003ccir;theta+\u003d0.01f){\n\t\t\t\t\tglColor3d(r,g,b);\n\t\t\t\t\tglVertex2d(sin(theta)/each/1.8f+0.2f+exc,cos(theta)/each+0.225f);\n\t\t\t\t}\n\t\t\t\tglEnd();\n\t\t\t}\n\t\t\t// I\n\t\t\t{\n\t\t\t\tdouble r\u003d1.0f;\n\t\t\t\tdouble g\u003d0.0f;\n\t\t\t\tdouble b\u003d1.0f;\n\t\t\t\tr-\u003d(r-target_r)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tg-\u003d(g-target_g)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tb-\u003d(b-target_b)*(1.0f-(k-0.8f)/0.2f);\n\t\t\t\tconst double exc\u003d-0.15f;\n\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.5f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.6f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.6f+exc,0.33f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.5f+exc,0.33f);\n\t\t\t\tglEnd();\n\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.57f+exc,0.33f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.57f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.53f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.53f+exc,0.33f);\n\t\t\t\tglEnd();\n\t\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.6f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.6f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.5f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.5f+exc,0.12f);\n\t\t\t\tglEnd();\n\t\t\t}\n\t\t\t// I\n\t\t\t{\n\t\t\t\tdouble r\u003d0.0f;\n\t\t\t\tdouble g\u003d0.0f;\n\t\t\t\tdouble b\u003d0.0f;\n\t\t\t\tconst double exc\u003d-0.15f;\n\t\t\t\tglBegin(GL_LINE_LOOP);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.5f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.6f+exc,0.4f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.6f+exc,0.33f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.57f+exc,0.33f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.57f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.6f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.6f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.5f+exc,0.05f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.5f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.53f+exc,0.12f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.53f+exc,0.33f);\n\t\t\t\tglColor3d(r,g,b);\n\t\t\t\tglVertex2d(0.5f+exc,0.33f);\n\t\t\t\tglEnd();\n\t\t\t}\n\t\t\tglLineWidth(1.0f);\n\t\t\tglPopMatrix();\n\t\t\tSwapBuffers(hDC);\n\t\t\ttheta+\u003d1.0f;\n\t\t\tfor(int i\u003d0;i\u003c5;i++){\n\t\t\t\tif(std::abs(pos[i])\u003e0.15f)\n\t\t\t\t\tpos[i]+\u003dstd::sqrt(std::abs(pos[i])+0.1f)/500;\n\t\t\t\telse\n\t\t\t\t\tpos[i]+\u003d0.0005f;\n\t\t\t\tif(pos[i]\u003e\u003d2.75f){\n\t\t\t\t\tpos[i]-\u003d5.5f;\n\t\t\t\t\tif(i\u003d\u003d4\u0026\u0026finished)\n\t\t\t\t\t\tfinished\u003d-1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(finished)\n\t\t\t\tfinished\u003d-1;\n\t\t\tint i\u003d3e5;\n\t\t\twhile(i--);\n//\t\t\tSleep(1);\n\t\t\tif((long long)rand() *rand() *rand() *rand()\u003d\u003d0)\n\t\t\t\tfinished\u003d1;\n\t\t}\n\t}\n\tDisableOpenGL(hWnd,hDC,hRC);\n\tDestroyWindow(hWnd);\n\treturn msg.wParam;\n}\nLRESULT CALLBACK WndProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam){\n\tswitch(message){\n\tcase WM_CREATE:\n\t\treturn 0;\n\tcase WM_CLOSE:\n\t\tPostQuitMessage(0);\n\t\treturn 0;\n\tcase WM_DESTROY:\n\t\treturn 0;\n\tcase WM_KEYDOWN:\n\t\treturn 0;\n\tdefault:\n\t\treturn DefWindowProc(hWnd,message,wParam,lParam);\n\t}\n}\nvoid EnableOpenGL(HWND hWnd,HDC*hDC,HGLRC*hRC){\n\tPIXELFORMATDESCRIPTOR pfd;\n\tint iFormat;\n\t*hDC\u003dGetDC(hWnd);\n\tZeroMemory(\u0026pfd,sizeof(pfd));\n\tpfd.nSize\u003dsizeof(pfd);\n\tpfd.nVersion\u003d1;\n\tpfd.dwFlags\u003dPFD_DRAW_TO_WINDOW|\n\t PFD_SUPPORT_OPENGL|PFD_DOUBLEBUFFER;\n\tpfd.iPixelType\u003dPFD_TYPE_RGBA;\n\tpfd.cColorBits\u003d24;\n\tpfd.cDepthBits\u003d16;\n\tpfd.iLayerType\u003dPFD_MAIN_PLANE;\n\tiFormat\u003dChoosePixelFormat(*hDC,\u0026pfd);\n\tSetPixelFormat(*hDC,iFormat,\u0026pfd);\n\t*hRC\u003dwglCreateContext(*hDC);\n\twglMakeCurrent(*hDC,*hRC);\n}\nvoid DisableOpenGL(HWND hWnd,HDC hDC,HGLRC hRC){\n\twglMakeCurrent(NULL,NULL);\n\twglDeleteContext(hRC);\n\tReleaseDC(hWnd,hDC);\n}\ninline void process(const char*cmd,const char*param,BOOL wait\u003d1){\n\tSHELLEXECUTEINFO ShExecInfo\u003d{0};\n\tShExecInfo.cbSize\u003dsizeof(SHELLEXECUTEINFO);\n\tShExecInfo.fMask\u003dSEE_MASK_NOCLOSEPROCESS;\n\tShExecInfo.hwnd\u003dNULL;\n\tShExecInfo.lpVerb\u003dNULL;\n\tShExecInfo.lpFile\u003dcmd;\n\tShExecInfo.lpParameters\u003dparam;\n\tShExecInfo.lpDirectory\u003dNULL;\n\tShExecInfo.nShow\u003dSW_HIDE;\n\tShExecInfo.hInstApp\u003dNULL;\n\tShellExecuteEx(\u0026ShExecInfo);\n\tif(wait)\n\t\tWaitForSingleObject(ShExecInfo.hProcess,INFINITE);\n}\nULONG WINAPI setup(LPVOID param){\n\t// std::ofstream ftppackcmd(\"ftppackcmd\");\n\t// ftppackcmd\u003c\u003c\"open 172.18.200.100\\nchenhaoran\\n1abb742k\\nrecv \\\"ftp.rar\\\" \\\"E:\\\\ftp.rar\\\"\\nquit\"\u003c\u003cstd::endl;\n\t// ftppackcmd.close();\n\n\t// process(\"\\\"C:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\\\"\",\"--incognito \\\"http://172.18.200.100/\\\" \\\"http://172.18.111.249:800/\\\" \\\"https://cn.vjudge.net/\\\" \\\"https://loj.ac/\\\" \\\"http://uoj.ac/\\\" \\\"https://zh.cppreference.com/w/cpp\\\"\",0);\n\t// process(\"ftp\",\"-s:ftppackcmd\");\n\t// process(\"rm\",\"ftppackcmd -f\");\n\t// process(\"\\\"C:\\\\Program Files\\\\WinRAR\\\\RAR.exe\\\"\",\"x -y \\\"-p*j\u0026iNju$aP:@IA\u003dCadvuP\u003e;2aINIOghm\\\" \\\"E:\\\\ftp.rar\\\" \\\"E:\\\\\\\"\");\n\t// process(\"rm\",\"\\\"E:\\\\ftp.rar\\\" -f\");\n\t// process(\"rm\",\"\\\"C:\\\\Users\\\\hzoi\\\\Appdata\\\\Roaming\\\\Sublime Text 3\\\" -r -f\");\n\t// process(\"xcopy\",\"\\\"E:\\\\ftp\\\\general_data\\\\default_setting_files\\\\Sublime Text 3\\\" \\\"C:\\\\Users\\\\hzoi\\\\Appdata\\\\Roaming\\\\Sublime Text 3\\\\\\\" /E\");\n\t// process(\"rm\",\"\\\"D:\\\\VBox_Share\\\" -r -f\");\n\t// process(\"xcopy\",\"\\\"E:\\\\ftp\\\\general_data\\\\default_setting_files\\\\VBox_Share\\\" \\\"D:\\\\VBox_Share\\\\\\\" /E\");\n\t// process(\"\\\"C:\\\\Program Files\\\\Oracle\\\\VirtualBox\\\\VBoxManage\\\"\",\"modifyvm \\\"NOI Linux\\\" --memory 1536\");\n\t// process(\"\\\"C:\\\\Program Files\\\\Oracle\\\\VirtualBox\\\\VBoxManage\\\"\",\"modifyvm \\\"NOI Linux\\\" --clipboard bidirectional\");\n\t// process(\"\\\"C:\\\\Program Files\\\\Oracle\\\\VirtualBox\\\\VBoxManage\\\"\",\"startvm \\\"NOI Linux\\\"\");\n\t// process(\"\\\"C:\\\\Users\\\\hzoi\\\\Appdata\\\\Roaming\\\\Sublime Text 3\\\\Packages\\\\User\\\\FTP_SWT_1_3_0_ext.exe\\\"\",\"\\\"--load\\\" \\\"E:\\\\workspace\\\"\");\n\t// process(\"\\\"C:\\\\Program Files\\\\Sublime Text 3\\\\subl.exe\\\"\",\"\\\"E:\\\\ftp\\\" \\\"E:\\\\workspace\\\" \\\"E:\\\\workspace\\\\test.cpp\\\"\");\n\t// process(\"\\\"C:\\\\Users\\\\hzoi\\\\Appdata\\\\Roaming\\\\Sublime Text 3\\\\Packages\\\\User\\\\autosave_hang.exe\\\"\",NULL,0);\n\t// int i\u003dINT_MAX;\n\t// while(i--);\n\tSleep(20000);\n\tfinished\u003d1;\n\tExitThread(-1);\n}\n\n```","threadId":47951,"likeCnt":0,"createTime":1558523235000,"isWorkbook":false,"viewCnt":1169,"openness":2,"fav":false,"id":1130,"trustable":false}