{"id":18473,"date":"2009-04-23T10:00:00","date_gmt":"2009-04-23T10:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2009\/04\/23\/why-are-there-two-values-for-psh_wizard97\/"},"modified":"2009-04-23T10:00:00","modified_gmt":"2009-04-23T10:00:00","slug":"why-are-there-two-values-for-psh_wizard97","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20090423-00\/?p=18473","title":{"rendered":"Why are there two values for PSH_WIZARD97?"},"content":{"rendered":"<p><P>\n<I>Welcome, Slashdot readers.\nRemember, this Web site is\n<A HREF=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2007\/08\/10\/4315707.aspx\">\nfor entertainment purposes only<\/A>.<\/I>\n<\/P>\n<P>\nIf you go cruising through the <CODE>commctrl.h<\/CODE> header file,\nyou&#8217;ll find that there are two different definitions for\n<CODE>PSH_WIZARD97<\/CODE>:\n<PRE>\n#if (_WIN32_IE &gt;= 0x0400)\n&#8230;\n#if (_WIN32_IE &lt; 0x0500)\n#define PSH_WIZARD97            0x00002000\n#else\n#define PSH_WIZARD97            0x01000000\n#endif\n&#8230;\n<\/PRE>\n<P>\nWhy are there two values for <CODE>PSH_WIZARD97<\/CODE>?\n<\/P>\n<P>\nSet the wayback machine to 1997.\n(Note: Dates are approximate.)\nThe user interface design team studied how Windows&nbsp;95\nwizards have been faring and have begun using what they&#8217;ve\nlearned to develop the next version of the wizard interface,\nwhich they have code-named &#8220;Wizard&nbsp;97&#8221;.\nDevelopment in <CODE>comctl32.dll<\/CODE>\nproceeds based their designs, what with exterior and interior pages,\nheaders and sub-headers, watermarks, all that jazz.\nMeanwhile, work on Internet Explorer&nbsp;4 reaches the homestretch,\nand it&#8217;s a race to the finish line.\n<\/P>\n<P>\nInternet Explorer&nbsp;4 wins the race and is ready to ship\nbefore the work on Wizard&nbsp;97 is complete.\nWhat do you do?\nDo you say &#8220;Um, hi, Internet Explorer team.\nCould you slip your schedule by about half a year so we can finish\nour work on this new wizard design?&#8221;\nYeah, like the Internet Explorer team are going to say,\n&#8220;Oh, sure, no hurry, take your time. We&#8217;ll wait.\nIt&#8217;s not like we&#8217;re going to get ridiculed for being another six months\nlate.&#8221;\n<\/P>\n<P>\nAnd\n<A HREF=\"http:\/\/en.wikipedia.org\/wiki\/Wayne's_World\">\nmonkeys might fly out of my butt<\/A>.\n<\/P>\n<P>\nOut the door it goes, with a Wizard&nbsp;97 design that hadn&#8217;t\ngone through a full usability review.\nTo discourage programmers from using this half-finished wizard,\nput the sentence &#8220;Don&#8217;t use this flag&#8221; in the documentation.\nBoy, that was a close call.\n<\/P>\n<P>\nSince they already &#8220;missed the boat&#8221;, the urgency to complete\nthe work on Wizard&nbsp;97 vanished.\nOne of the things that came up during the usability review was\nthat the full-page watermark wasn&#8217;t such a great idea after all.\nIt made the text hard to read,\nusers had difficulty figuring out what they should do,\nvarious problems like that.\nThe design for Wizard&nbsp;97 changed;\nnow the watermark was just a small picture\nthat goes in the corner of the wizard.\nOf course, the changes weren&#8217;t just design changes;\nthere were also bug fixes.\nAll the work was done in time for Windows&nbsp;2000, yippee.\n<\/P>\n<P>\nAnd then the compatibility bugs started coming in.\n<\/P>\n<P>\nWait, compatibility bugs?\nHow can there be compatibility bugs?\nNobody is using Wizard&nbsp;97 yet; there&#8217;s nobody to be compatible with!\n<\/P>\n<P>\nWell, it turns out that programs were indeed using the\n<CODE>PSH_WIZARD97<\/CODE> flag from Internet Explorer&nbsp;4\nand expecting to get that old half-baked Wizard&nbsp;97 design.\n(After some investigation, I believe we discovered that somebody\nsomewhere had told the MFC folks, &#8220;Hey, there&#8217;s this cool Wizard&nbsp;97\nthing you should use. It&#8217;s pretty awesome.&#8221;\nThat someone was overcome with excitement and didn&#8217;t realize that\nthe work on Wizard&nbsp;97 was not yet finished and that Wizard&nbsp;97\nwas not yet ready for prime time.\nPeople who used MFC to write their programs then said,\n&#8220;Hey, look, MFC has support for this new type of wizard!&#8221;\nand started using it.)\n<\/P>\n<P>\nOh, great, how do you fix this?\n<\/P>\n<P>\nIt wasn&#8217;t pretty, but it had to be done.\n(The preferred first choice,\n<A HREF=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2006\/04\/03\/567318.aspx\">\nusing a time machine<\/A>,\nwas unavailable.)\nThe fix was to have two types of Wizard&nbsp;97;\nthere&#8217;s the &#8220;Internet Explorer&nbsp;4 version&#8221; and the\n&#8220;Windows&nbsp;2000 version&#8221;.\nOf course, nobody wants to officially admit that\nthe Internet Explorer&nbsp;4 version exists, since during\nits brief lifetime, it was documented as &#8220;Don&#8217;t use me!&#8221;\nAll the changes that were made after Internet Explorer&nbsp;4\nshipped had to be revisited.\nEach time there was a code change\n(either to support a new design or just to fix a bug),\na test against the wizard flavor had to be made,\nand the old behavior restored if the old flag was used.\n<\/P>\n<P>\nIf new code was added for the Windows&nbsp;2000 version of\nWizard&nbsp;97,\nwhether it be due to a design change or a bug fix,\nthen it had to be placed behind a check:\n<\/P>\n<PRE>\n    if (program asked for Windows 2000-style Wizard 97) {\n        \/\/ new behavior here\n    }\n<\/PRE>\n<P>\nConversely, if code was deleted, it had to be brought back\nwith a version check:\n<\/P>\n<PRE>\n    if (program asked for Internet Explorer 4-style Wizard 97) {\n        \/\/ old behavior here\n    }\n<\/PRE>\n<P>\nAnd if behavior changed, you need to have both versions:\n<\/P>\n<PRE>\n    if (program asked for Internet Explorer 4-style Wizard 97) {\n        \/\/ old behavior here\n    } else {\n        \/\/ new behavior here\n    }\n<\/PRE>\n<P>\nGiving the old and new Wizard&nbsp;97 flags different values\nallows the property sheet wizard code to tell whether the\nprogram was designed for the\nbogus Internet Explorer&nbsp;4 pre-release version of\nWizard&nbsp;97 or the finished Windows&nbsp;2000 version.\n<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome, Slashdot readers. Remember, this Web site is for entertainment purposes only. If you go cruising through the commctrl.h header file, you&#8217;ll find that there are two different definitions for PSH_WIZARD97: #if (_WIN32_IE &gt;= 0x0400) &#8230; #if (_WIN32_IE &lt; 0x0500) #define PSH_WIZARD97 0x00002000 #else #define PSH_WIZARD97 0x01000000 #endif &#8230; Why are there two values for [&hellip;]<\/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":[2],"class_list":["post-18473","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>Welcome, Slashdot readers. Remember, this Web site is for entertainment purposes only. If you go cruising through the commctrl.h header file, you&#8217;ll find that there are two different definitions for PSH_WIZARD97: #if (_WIN32_IE &gt;= 0x0400) &#8230; #if (_WIN32_IE &lt; 0x0500) #define PSH_WIZARD97 0x00002000 #else #define PSH_WIZARD97 0x01000000 #endif &#8230; Why are there two values for [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/18473","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=18473"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/18473\/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=18473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=18473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=18473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}