{"id":555,"date":"2008-05-13T06:23:17","date_gmt":"2008-05-13T06:23:17","guid":{"rendered":"http:\/\/6teen.ru\/?p=418"},"modified":"2008-05-13T06:23:17","modified_gmt":"2008-05-13T06:23:17","slug":"6216","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=555","title":{"rendered":"\u041a\u0430\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c bmp (32&#215;32) \u0432 ico"},"content":{"rendered":"<p>\u041a\u0430\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c bmp (32&#215;32) \u0432 ico<br \/>\n<!--more--><\/p>\n<pre class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset; width:580px; height:320px; overflow:auto\"><div>\u041a\u0430\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c bmp (32x32) \u0432 ico\n\nunit main;\n\ninterface\n\nuses\nwindows, messages, sysutils, classes, graphics, controls,\nforms,dialogs,extctrls, stdctrls;\n\ntype\ntform1 = class(tform)\nbutton1: tbutton;\nimage1: timage;\nimage2: timage;\nprocedure button1click(sender: tobject);\nprocedure formcreate(sender: tobject);\nprivate\n{ private declarations }\npublic\n{ public declarations }\nend;\n\nvar\nform1: tform1;\n\nimplementation\n\n{$r *.dfm}\n\nprocedure tform1.button1click(sender: tobject);\nvar windc, srcdc, destdc : hdc;\noldbitmap : hbitmap;\niinfo : ticoninfo;\nbegin\ngeticoninfo(image1.picture.icon.handle, iinfo);\n\nwindc := getdc(handle);\nsrcdc := createcompatibledc(windc);\ndestdc := createcompatibledc(windc);\noldbitmap := selectobject(destdc, iinfo.hbmcolor);\noldbitmap := selectobject(srcdc, iinfo.hbmmask);\n\nbitblt(destdc, 0, 0, image1.picture.icon.width,\nimage1.picture.icon.height,\nsrcdc, 0, 0, srcpaint);\nimage2.picture.bitmap.handle := selectobject(destdc, oldbitmap);\ndeletedc(destdc);\ndeletedc(srcdc);\ndeletedc(windc);\n\nimage2.picture.bitmap.savetofile(extractfilepath(application.exename)\n+ 'myfile.bmp');\nend;\n\nprocedure tform1.formcreate(sender: tobject);\nbegin\nimage1.picture.icon.loadfromfile('c:\\myicon.ico');\nend;\n\nend.\n<\/div><\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c bmp (32&#215;32) \u0432 ico<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[428,444],"tags":[1096,491,1145,1604],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/555"}],"collection":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=555"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/555\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=555"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}