{"id":41893,"date":"2003-11-10T03:53:00","date_gmt":"2003-11-10T03:53:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2003\/11\/10\/homework-assignment-about-window-subclassing\/"},"modified":"2003-11-10T03:53:00","modified_gmt":"2003-11-10T03:53:00","slug":"homework-assignment-about-window-subclassing","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20031110-00\/?p=41893","title":{"rendered":"Homework assignment about window subclassing"},"content":{"rendered":"<p>\nWindow subclassing is trickier than you think.\nConsider this code sketch:\n<\/p>\n<pre>\n\/\/ Subclass the window for a little while\nWNDPROC OldWndProc = SubclassWindow(hwnd, NewWndProc);\n... do stuff ...\n\/\/ Okay all done, remove our subclass by\n\/\/ restoring the previous window procedure\nSubclassWindow(hwnd, OldWndProc);\n<\/pre>\n<p>What could go wrong?\n<a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2003\/11\/11\/55653.aspx\">\nWe&#8217;ll discuss it tomorrow<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Window subclassing is trickier than you think. Consider this code sketch: \/\/ Subclass the window for a little while WNDPROC OldWndProc = SubclassWindow(hwnd, NewWndProc); &#8230; do stuff &#8230; \/\/ Okay all done, remove our subclass by \/\/ restoring the previous window procedure SubclassWindow(hwnd, OldWndProc); What could go wrong? We&#8217;ll discuss it tomorrow.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-41893","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Window subclassing is trickier than you think. Consider this code sketch: \/\/ Subclass the window for a little while WNDPROC OldWndProc = SubclassWindow(hwnd, NewWndProc); &#8230; do stuff &#8230; \/\/ Okay all done, remove our subclass by \/\/ restoring the previous window procedure SubclassWindow(hwnd, OldWndProc); What could go wrong? We&#8217;ll discuss it tomorrow.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/41893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=41893"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/41893\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=41893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=41893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=41893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}