{"id":219,"date":"2014-06-13T16:58:51","date_gmt":"2014-06-13T07:58:51","guid":{"rendered":"http:\/\/csharp.ihavenomoney.co.kr\/?p=219"},"modified":"2014-06-13T16:59:16","modified_gmt":"2014-06-13T07:59:16","slug":"gdi%ed%95%a8%ec%88%98%ec%9d%98-%eb%9e%98%ed%8d%bc%ed%81%b4%eb%9e%98%ec%8a%a4-%ec%a0%9c%ec%9e%91%ec%9c%bc%eb%a1%9c-sine-%ea%b3%a1%ec%84%a0%ea%b7%b8%eb%a6%ac%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/csharp.ihavenomoney.co.kr\/?p=219","title":{"rendered":"GDI\ud568\uc218\uc758 \ub798\ud37c\ud074\ub798\uc2a4 \uc81c\uc791\uc73c\ub85c Sine \uace1\uc120\uadf8\ub9ac\uae30"},"content":{"rendered":"<p><a href=\"http:\/\/csharp.ihavenomoney.co.kr\/wp-content\/uploads\/2014\/06\/sine.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/csharp.ihavenomoney.co.kr\/wp-content\/uploads\/2014\/06\/sine-300x246.png\" alt=\"sine\" width=\"300\" height=\"246\" class=\"alignnone size-medium wp-image-220\" srcset=\"https:\/\/csharp.ihavenomoney.co.kr\/wp-content\/uploads\/2014\/06\/sine-300x246.png 300w, https:\/\/csharp.ihavenomoney.co.kr\/wp-content\/uploads\/2014\/06\/sine.png 446w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><pre id=\"code_snippet_62\" style=\"position:relative;width:100%;border:0;padding:0;\">#include &lt;windows.h&gt;\r\n#include &lt;math.h&gt;\r\n#include &quot;stdafx.h&quot;\r\n#include &quot;CView.h&quot;\r\n#include &quot;DC.h&quot;\r\n\r\nCView app;\r\n\r\n\/\/{{AFX_MESSAGE\r\nBEGIN_MESSAGE_MAP(CView)\r\n    {WM_CREATE,&amp;CView::OnCreate},\r\n\t{WM_PAINT,&amp;CView::OnDraw},\r\n\t{WM_DESTROY,&amp;CView::OnDestroy},\r\n\t{WM_SIZE,&amp;CView::OnSize},\r\n\t{WM_LBUTTONDOWN,&amp;CView::OnLButtonDown},\r\nEND_MESSAGE_MAP()\r\n\/\/}}AFX_MESSAGE\r\n\r\nLRESULT CView::OnCreate(WPARAM wParam,LPARAM lParam){\r\n\treturn 0L;\r\n}\r\n\r\nLRESULT CView::OnDraw(WPARAM wParam,LPARAM lParam){\r\n\tHDC hdc;\r\n\tPAINTSTRUCT ps;\r\n\tRECT rect;\r\n\r\n\thdc=BeginPaint(hwnd,&amp;ps);\r\n\tGetClientRect(hwnd,&amp;rect);\r\n\tDrawText(hdc,&quot;Hello Window&quot;,-1,&amp;rect,DT_SINGLELINE|DT_CENTER|DT_VCENTER);\r\n\tEndPaint(hwnd,&amp;ps);\r\n\treturn 0L;\r\n}\r\n\r\nLRESULT CView::OnDestroy(WPARAM wParam,LPARAM lParam){\r\n\tPostQuitMessage(0);\r\n\treturn 0L;\r\n}\r\n\r\nLRESULT CView::OnLButtonDown(WPARAM wParam,LPARAM lParam) {\r\n\t\/\/PostQuitMessage(0);\r\n\t\/\/{{SCHEO\r\n\tint i;\r\n\t\/\/hdc = GetDC(hwnd);\t\r\n\tCDC dc(this);\r\n\t\/\/MoveToEx(hdc,0,cyClient\/2,NULL);\r\n\t\/\/LineTo(hdc,cxClient,cyClient\/2);\r\n\tdc.MoveToEx(0,cyClient\/2,NULL);\r\n\tdc.LineTo(cxClient,cyClient\/2);\r\n\tfor(i=1;i&lt;NUM;i++)\r\n\t{\r\n\t\tpt[i].x = i * cxClient \/ NUM;\r\n\t\tpt[i].y = (int)(cyClient\/2 * (1-sin((TWOPI*i)\/NUM)));\r\n\t}\r\n\t\/\/Polyline(hdc,pt,NUM);\r\n\tdc.Polyline(pt,NUM);\r\n\t\/\/ReleaseDC(hwnd,hdc);\r\n\t\/\/}}SCHEO\r\n\treturn 0L;\r\n}\r\n\r\n\/\/{{SCHEO\r\nLRESULT CView::OnSize(WPARAM wParma,LPARAM lParam)\r\n{\r\n\/\/#define LOWORD(a) ( (a) &amp; 0x0000ffff)\r\n\/\/#define HIWORD(a) ( ((a) &amp; 0xffff0000) &gt;&gt; 16)\r\n\tcxClient = LOWORD(lParam);\r\n\tcyClient = HIWORD(lParam);\r\n\t\t\r\n\treturn 0L;\r\n}\r\n\/\/}}SCHE<\/pre><\/p>\n<p><a href=\"http:\/\/csharp.ihavenomoney.co.kr\/wp-content\/uploads\/2014\/06\/template.zip\">\uc18c\uc2a4 \ub2e4\uc6b4\ub85c\ub4dc<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc18c\uc2a4 \ub2e4\uc6b4\ub85c\ub4dc<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-c"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=219"}],"version-history":[{"count":2,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":223,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions\/223"}],"wp:attachment":[{"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}