{"id":103,"date":"2011-05-11T22:08:09","date_gmt":"2011-05-11T12:08:09","guid":{"rendered":"http:\/\/www.reenadu.com\/?p=103"},"modified":"2011-05-11T22:08:09","modified_gmt":"2011-05-11T12:08:09","slug":"a-funny-joke-application-makes-your-window-dance","status":"publish","type":"post","link":"https:\/\/nickdu.com\/?p=103","title":{"rendered":"A funny joke application makes your window dance"},"content":{"rendered":"<p>These days I am so busy with work, and haven&#8217;t got time to write anything.<\/p>\n<p>This is a funny joke application I wrote long time back. It will make your front window dance. If you press any key, this application will exit.<\/p>\n<p>You can download <a href=\"http:\/\/www.nickdu.com\/tools\/joke.zip\" target=\"_blank\">here<\/a><br \/>\nThis is the code, in case if you want to make your own.<\/p>\n<pre lang=\"c\">#include \"stdafx.h\"\n#include \"math.h\"\n#include \"windows.h\"\n#include \"time.h\"\n#include \"conio.h\"\n\nint _tmain(int argc, _TCHAR* argv[])\n{\n\tRECT rect;\n\tint offset;\n\twhile(!kbhit())\n\t{\n\t\tHWND hWnd = GetForegroundWindow();\n\t\tGetWindowRect(hWnd,&amp;rect);\n\t\toffset = sin((float)rand())*10;\n\t\trect.left += offset;\n\t\trect.bottom += offset;\n\t\trect.right += offset;\n\t\trect.top += offset;\n\t\tMoveWindow(hWnd,rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top,true);\n\t\tSleep(20);\n\t}\n\treturn 0;\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>These days I am so busy with work, and haven&#8217;t got time to write anything. This is a funny joke application I wrote long time back. It will make your front window dance. If you press any key, this application will exit. You can download here This is the code, in case if you want &hellip; <a href=\"https:\/\/nickdu.com\/?p=103\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;A funny joke application makes your window dance&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,2],"tags":[],"class_list":["post-103","post","type-post","status-publish","format-standard","hentry","category-cc","category-it"],"_links":{"self":[{"href":"https:\/\/nickdu.com\/index.php?rest_route=\/wp\/v2\/posts\/103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nickdu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nickdu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nickdu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nickdu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=103"}],"version-history":[{"count":0,"href":"https:\/\/nickdu.com\/index.php?rest_route=\/wp\/v2\/posts\/103\/revisions"}],"wp:attachment":[{"href":"https:\/\/nickdu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nickdu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nickdu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}