{"id":41903,"date":"2003-11-10T03:52:00","date_gmt":"2003-11-10T03:52:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2003\/11\/10\/how-much-do-you-expect-from-a-framework-layer\/"},"modified":"2003-11-10T03:52:00","modified_gmt":"2003-11-10T03:52:00","slug":"how-much-do-you-expect-from-a-framework-layer","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20031110-00\/?p=41903","title":{"rendered":"How much do you expect from a framework layer?"},"content":{"rendered":"\n<p>         If a framework exposes functionality provided by a lower layer, how hard should the         framework try to insulate you from all the quirks and limitations of the lower layer?      <\/p>\n<p>         Instinctively, of course, you would say, &#8220;The framework should insulate me completely.&#8221;         But be careful what you ask for. If a framework insulated you completely, then every         limitation of the underlying layer needs to be worked around in some manner or other.         This would mean writing a lot of code to emulate missing functionality or removing         a limitation, just in case somebody using the framework actually runs into that limitation.      <\/p>\n<p>         Let&#8217;s take for example <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/cpref\/html\/frlrfSystemWindowsFormsToolTipClassAutoPopDelayTopic.asp\">the         ToolTip.AutoPopDelay property<\/a>. <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/cpref\/html\/frlrfSystemWindowsFormsToolTipClassTopic.asp\">The         ToolTip class<\/a> is a Windows Forms wrapper around <a href=\"http:\/\/msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/shellcc\/platform\/commctls\/tooltip\/tooltipintro.asp\">the         Common Controls ToolTip window class<\/a>. If you look at <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/shellcc\/platform\/commctls\/tooltip\/messages\/ttm_setdelaytime.asp\">the         documentation for the TTM_SETDELAYTIME<\/a> message, you&#8217;ll see that the delay time         (<i>iTime<\/i>) is passed in the low word of the <i>lParam<\/i> parameter. Consequently,         it is limited to a 16-bit value, and in this case, it&#8217;s a signed 16-bit value since         negative values for <i>iTime<\/i> have special meaning (as noted in the documentation).      <\/p>\n<p>         Since the maximum value for a signed 16-bit integer is 32767, the maximum value you         can set for the delay time is a little over 32 seconds.      <\/p>\n<p>     So if you try to set your ToolTip.AutoPopDelay to something longer, like 60 seconds,     you will find that the delay time is not properly set, since the ToolTip class merely     passes the delay value through to the underlying control. And until you understood     the underlying control, you would never understand why.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>If a framework exposes functionality provided by a lower layer, how hard should the framework try to insulate you from all the quirks and limitations of the lower layer? Instinctively, of course, you would say, &#8220;The framework should insulate me completely.&#8221; But be careful what you ask for. If a framework insulated you completely, then [&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":[26],"class_list":["post-41903","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-other"],"acf":[],"blog_post_summary":"<p>If a framework exposes functionality provided by a lower layer, how hard should the framework try to insulate you from all the quirks and limitations of the lower layer? Instinctively, of course, you would say, &#8220;The framework should insulate me completely.&#8221; But be careful what you ask for. If a framework insulated you completely, then [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/41903","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=41903"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/41903\/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=41903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=41903"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=41903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}