{"id":235,"date":"2009-10-12T23:16:04","date_gmt":"2009-10-12T17:46:04","guid":{"rendered":"http:\/\/techtwaddle.net\/?p=235"},"modified":"2011-04-12T23:16:24","modified_gmt":"2011-04-12T17:46:24","slug":"applications-painting-problems-with-windowed-directdraw-app","status":"publish","type":"post","link":"https:\/\/techtwaddle.co.in\/blog\/2009\/10\/12\/applications-painting-problems-with-windowed-directdraw-app\/","title":{"rendered":"Applications: Painting problems with windowed directdraw app"},"content":{"rendered":"<div style=\"text-align: justify;\"><span style=\"font-family: Comic Sans MS;\">Well, the painting problem that I mentioned in my <a href=\"geekswithblogs.net\/TechTwaddle\/archive\/2009\/09\/25\/applications-creating-a-windowed-directdraw-application.aspx\">last post<\/a> is solved. Thanks to <a href=\"http:\/\/j2i.net\/blogs\/home\/archive\/tags\/Windows\/default.aspx\">Joel<\/a> for helping me out (:<\/span><\/div>\n<p>&nbsp;<\/p>\n<div style=\"text-align: justify;\"><span style=\"font-family: Comic Sans MS;\">When I look in retrospect, the answer was in the question all the time. Painting problem, <span style=\"font-family: Verdana; color: rgb(0, 0, 128);\">WM_PAINT<\/span> message. It was stupid of me to have missed that (; But looking at the bright side I have a much better understanding of how <span style=\"font-family: Verdana; color: rgb(0, 0, 128);\">WM_PAINT<\/span> works now. The only thing that I needed to do was to display the frame every time my window got a <span style=\"font-family: Verdana; color: rgb(0, 0, 128);\">WM_PAINT<\/span> message. So that our client area is re-drawn and is displayed correctly. Just call <span style=\"font-family: Verdana; color: rgb(0, 0, 128);\">DisplayFrame()<\/span> inside <span style=\"font-family: Verdana; color: rgb(0, 0, 128);\">WM_PAINT<\/span>. That is all.<\/span><\/div>\n<p>&nbsp;<\/p>\n<div style=\"text-align: justify;\"><span style=\"font-family: Comic Sans MS;\">Here&#8217;s a video of how things are working now, pretty smooth (:<\/span><\/div>\n<p>&nbsp;<\/p>\n<p><object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/zqOyjZ3-G6s&amp;hl=en&amp;fs=1&amp;\" \/><param name=\"allowFullScreen\" value=\"true\" \/><param name=\"allowscriptaccess\" value=\"always\" \/><\/object><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, the painting problem that I mentioned in my last post is solved. Thanks to Joel for helping me out (: &nbsp; When I look in retrospect, the answer was in the question all the time. Painting problem, WM_PAINT message. It was stupid of me to have missed that (; But looking at the bright &hellip; <a href=\"https:\/\/techtwaddle.co.in\/blog\/2009\/10\/12\/applications-painting-problems-with-windowed-directdraw-app\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Applications: Painting problems with windowed directdraw app<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[1],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1ktFF-3N","_links":{"self":[{"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/posts\/235"}],"collection":[{"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/comments?post=235"}],"version-history":[{"count":1,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/posts\/235\/revisions"}],"predecessor-version":[{"id":236,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/posts\/235\/revisions\/236"}],"wp:attachment":[{"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/media?parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/categories?post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/tags?post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}