{"id":127,"date":"2006-12-02T11:39:13","date_gmt":"2006-12-02T09:39:13","guid":{"rendered":"https:\/\/alax.info\/blog\/127"},"modified":"2021-02-13T12:29:48","modified_gmt":"2021-02-13T10:29:48","slug":"how-to-add-features-to-standard-message-boxes-in-atl-and-wtl","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/127","title":{"rendered":"How to add features to standard message boxes in ATL and WTL"},"content":{"rendered":"<p><a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/winui\/winui\/windowsuserinterface\/windowing\/dialogboxes\/dialogboxreference\/dialogboxfunctions\/messagebox.asp?frame=true\">MessageBox function<\/a> is easy to use but it sometimes lacks features. They can be added through a hook, however. This sample demonstrates three features for message boxes:<\/p>\n<ol>\n<li><em>AtlMessageBoxEx<\/em> shows message box centered by parent window<\/li>\n<li><em>AtlTimedMessageBoxEx<\/em> shows message box with countdown timer to close<\/li>\n<li><em>AtlOptionalMessageBoxEx<\/em> shows message box with checkbox to suppress the box in future (the setting is stored into registry)<\/li>\n<\/ol>\n<p><!--more--><\/p>\n<p><em>AtlTimedMessageBoxEx:<\/em><\/p>\n<p><img decoding=\"async\" id=\"image128\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2006\/12\/image202.png\" alt=\"image202.png\" \/><\/p>\n<p><em>AtlOptionalMessageBoxEx:<\/em><\/p>\n<p><img decoding=\"async\" id=\"image129\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2006\/12\/image203.png\" alt=\"image203.png\" \/><\/p>\n<p>Visual C++.NET 2003 source code can be downloaded <a id=\"p113\" title=\"scrollingpropertypage01.zip\" href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2006\/12\/advancedmessageboxes01.zip\">here<\/a>, compiled binary &#8211; <a id=\"p114\" href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2006\/12\/advancedmessageboxes01exe.zip\">here<\/a>.<\/p>\n<p>UPDATE 2021-Feb-13: The code is re-published as a github repository: <a href=\"https:\/\/github.com\/roman380\/AdvancedMessageBoxes01\">roman380\/AdvancedMessageBoxes01: How to add features to standard message boxes in ATL and WTL (github.com)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MessageBox function is easy to use but it sometimes lacks features. They can be added through a hook, however. This sample demonstrates three features for message boxes: AtlMessageBoxEx shows message box centered by parent window AtlTimedMessageBoxEx shows message box with countdown timer to close AtlOptionalMessageBoxEx shows message box with checkbox to suppress the box in&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/127\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,13,20],"tags":[],"class_list":["post-127","post","type-post","status-publish","format-standard","hentry","category-atl","category-source","category-wtl"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}