<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Full of BS &#187; Internet Explorer</title>
	<atom:link href="http://fullof.bs/category/internet-explorer/feed/" rel="self" type="application/rss+xml" />
	<link>http://fullof.bs</link>
	<description>He just never stops talking</description>
	<lastBuildDate>Mon, 19 Oct 2009 15:08:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Checklist for Embedded IE</title>
		<link>http://fullof.bs/checklist-for-embedded-ie/</link>
		<comments>http://fullof.bs/checklist-for-embedded-ie/#comments</comments>
		<pubDate>Thu, 24 Aug 2006 02:13:56 +0000</pubDate>
		<dc:creator>John Haugeland</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[ECMA / Javascript]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools and Libraries]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web and Web Standards]]></category>

		<guid isPermaLink="false">http://blog.sc.tri-bit.com/archives/163</guid>
		<description><![CDATA[MSHTML is an awesome user interface tool, but it has a whole lot of standard behaviors, many of which aren&#8217;t what one wants for an application (since it&#8217;s designed for the web.)  This is a list of stuff you need to do to embed IE COM and have it behave like a normal application. [...]]]></description>
			<content:encoded><![CDATA[<p>MSHTML is an awesome user interface tool, but it has a whole lot of standard behaviors, many of which aren&#8217;t what one wants for an application (since it&#8217;s designed for the web.)  This is a list of stuff you need to do to embed IE COM and have it behave like a normal application.  There&#8217;s more than a person might expect.</p>
<p><span id="more-153"></span></p>
<ul>
<li>Suppress the user interface.  IE starts with most of its interface turned off, but a few things aren&#8217;t.  Notable things to include are to suppress the context menu and keyboard navigation.</li>
<ul>
<li>There are several ways to suppress the context menu.  The easiest way is to do it in the html.  Add <u>oncontextmenu=&#8221;return false;&#8221;</u> to your &lt;body&gt; and the problem just goes away, and it&#8217;s easily manually overridden for specific elements later.</li>
<li>Alternately, you can override the interface programmatically through <a title="IDocHostUIHandler Interface" href="http://msdn.microsoft.com/workshop/browser/hosting/reference/ifaces/idochostuihandler/idochostuihandler.asp">IDocHostUIHandler</a>.</li>
</ul>
<li>Get rid of the OnNavigate noise (the clicking sound when you hit a link.)  <a title="Suppressing OnNavigate" href="http://blog.sc.tri-bit.com/archives/162">This is harder than it should be</a>.</li>
<li>Prevent keyboard navigation.  If you only ever navigate once, and then do everything else in DHTML, this isn&#8217;t an issue, because there&#8217;s nothing to go forward or back to.  However, if you need to, the way to do this is to capture <a title="BeforeNavigate2" href="http://windowssdk.msdn.microsoft.com/en-us/library/ms628868.aspx">DWebBrowserEvents2::BeforeNavigate2()</a> and fill its last parameter, VARIANT_BOOL*&amp; Cancel, to true.  For security reasons this can&#8217;t be done in HTML without a garish ugly dialog box confirmation.</li>
<li>Prevent dragging and dropping links.  Do this with BeforeNavigate2() just like keyboard navigation.</li>
<li>Prevent selection.  The easiest way to do that is in the HTML by adding <u>onselectstart=&#8221;return false;&#8221;</u> to the &lt;body&gt;, which is also easily overridden for child elements where appropriate.  If you need it programmatically, such as a block which can be turned from and to editability, that&#8217;s in IDocHostUIHandler.</li>
<li>Handle some keys directly.  Particularly often, control keys, tab and f-keys need very different interpretations in applications than are the defaults in IE.  Some keys can be reliably intercepted in JScript, but not all of them.  For lightweight stuff, use JScript; it&#8217;ll be less painful.  However, if you need real control, you need to provide an <a title="Handle keypresses" href="http://msdn.microsoft.com/workshop/browser/hosting/reference/ifaces/idochostuihandler/translateaccelerator.asp">IDocHostUIHandler::TranslateAccelerator()</a> implementation.</li>
<li>Suppress the interior border.  People are often surprised that they turn off the window border in IE, and yet it seems to still appear.  That&#8217;s because IE&#8217;s default stylesheet puts an inset bevel on every web page.  Turn that off in CSS by writing <u>body { border: 0; }</u>.</li>
<li>Begin to embed your images and other support media as resources, and access them with <a title="The res protocol" href="http://msdn.microsoft.com/workshop/networking/predefined/res.asp">the res:// protocol</a>.</li>
<ul>
<li>One ugly caveat: I have never found any variation of the DirectX PNG alpha filter hack which works with res://, and I&#8217;ve looked often and at some very weird variations.  It is my current belief that a PNG cannot be embedded through res:// and still be fixed for alpha.  This leads to the unfortunate case of requiring at least part of your resources on disk.  If anyone knows a way around this, a heads-up would be <em>greatly</em> appreciated.</li>
</ul>
<li>Set up a system to exchange messages between IE DOM/DHTML/JScript and your application.  There are a bujillion ways to do this, but I tend to use a combination of intercepted element events (mostly OnClick in <a title="NO U INVOKE" href="http://msdn.microsoft.com/workshop/browser/webbrowser/reference/ifaces/dwebbrowserevents/dwebbrowserevents.asp">WebBrowserEvents Invoke</a>,) DOM extension behaviors that allow me to call C++ directly from JScript through <a title="The missing link" href="http://msdn.microsoft.com/workshop/browser/hosting/reference/ifaces/idochostuihandler/getexternal.asp">IDocHostUIHandler::GetExternal()</a>, and executing scripts directly on the DOM object through <a title="Do what I say, DOM" href="http://msdn.microsoft.com/workshop/browser/mshtml/reference/ifaces/window2/execscript.asp">IHTMLWindow2::execScript()</a>.</li>
<li>Build everything in the to be inside a container; make the body itself <u>overflow: none</u>.  This prevents several ugly re-layout quirks which we&#8217;re used to on the web but not in applications, when content gets long.</li>
<ul>
<li>Start the container invisible, and make the black.  That way, during the lag while resources are being loaded, you have a reasonable appearance.  Black flashes look correct.  White flashes look broken.</li>
<li>Set an <u>onload=&#8221;HandleLoad();&#8221;</u> function for the &lt;body&gt;.  That way, you know when all resources are loaded, and thus when it&#8217;s safe to take the invisible clause off of the main container.</li>
<li>Set the main container <u>position:relative</u>, to make absolute positioning of contained elements easier.</li>
</ul>
<li>Build your web page in as a resource, and load it through <a title="How to load a document without about:blank and its white flash." href="http://msdn.microsoft.com/workshop/browser/mshtml/reference/ifaces/document2/write.asp">IHtmlDocument2::write()</a>.  This allows you to load a document at runtime without using about:blank (which most people use, but which causes a brief white flash before your application loads; very unprofessional looking.)  You&#8217;ll need <a title="SafeArrayAccessData" href="http://windowssdk.msdn.microsoft.com/en-us/library/ms221620.aspx">SafeArrayAccessData()</a> and <a title="SafeArrayUnaccessData" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat/html/61b482cb-f0a3-4efb-9a68-f373f241e89a.asp">SafeArrayUnaccessData()</a> to use write() safely.  When it comes time to skin or internationalize, and when you&#8217;re dealing with a compile cycle which is just linking, you&#8217;ll thank me for this.</li>
<li>Suppress dragging on links and buttons.  If you don&#8217;t, people will be able to drag them outside the app and onto the desktop as shortcuts, and when followed those shortcuts will lead into your HTML page from the outside (which is, surprisingly, legal.)</li>
<li>Consider compressing your executable, such as with <a title="Universal Packer for Executables" href="http://upx.sourceforge.net/">UPX</a>, which makes resources unreadable externally.</li>
<li>Set an id on your &lt;body&gt;.  The is considered the origin of most events which don&#8217;t have a clear origin, and that means that catching these events is a lot easier (catching by id is the most straightforward way to sort out sources.)</li>
<li>Resist the urge to use runtime styles.  They&#8217;re not worth the problems they cause.</li>
</ul>
<p>That should get the new IE user through some common foibles.  I&#8217;ve probably missed stuff; if you can think of something, lemme know.  I do not currently know of a way to embed flash, unfortunately, without leaving available an extra file.</p>
]]></content:encoded>
			<wfw:commentRss>http://fullof.bs/checklist-for-embedded-ie/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oh, Neat: A Hack To Fix The IE Click Problem</title>
		<link>http://fullof.bs/oh-neat-a-hack-to-fix-the-ie-click-problem/</link>
		<comments>http://fullof.bs/oh-neat-a-hack-to-fix-the-ie-click-problem/#comments</comments>
		<pubDate>Thu, 24 Aug 2006 01:08:44 +0000</pubDate>
		<dc:creator>John Haugeland</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://blog.sc.tri-bit.com/archives/162</guid>
		<description><![CDATA[I always wondered how applications suppressed that god-awful clicking sound in embedded IE.  Usually you catch them screwing with user preferences, but there&#8217;s a utility I have which never showed any apparent method of getting rid of the goddamned noise.  I always assumed they just styled text to look like a link.
Well, I [...]]]></description>
			<content:encoded><![CDATA[<p>I always wondered how applications suppressed that god-awful clicking sound in embedded IE.  Usually you catch them screwing with user preferences, but there&#8217;s a utility I have which never showed any apparent method of getting rid of the goddamned noise.  I always assumed they just styled text to look like a link.</p>
<p>Well, I still don&#8217;t know what he does, but I found a way.</p>
<p><span id="more-152"></span></p>
<p>Back in post #141, <a title="More IE Woes - This Time, from the Inside" href="http://blog.sc.tri-bit.com/archives/141">More IE Woes</a>, I documented several problems.  One was that <a title="LIES!  DIRTY LIES!" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;201901">MSDN claims this noise cannot be suppressed</a>.  Indeed, by design, IE6 refuses to allow you to suppress that sound (god knows why.)  That MSDN article goes as far as to tell you to <em>override the user&#8217;s sound preferences to turn the noise off</em>.  How badbear is that?  Anyway, IE7 <strong>finally </strong>has an interface to turn that off, called <a title="It's about freaking time" href="http://msdn.microsoft.com/workshop/security/szone/overview/sec_featurecontrols.asp">FEATURE_DISABLE_NAVIGATION_SOUNDS</a>.  However, people like me who are reluctant to make their applications non-functional without IE7 will not like that answer.</p>
<p>It turns out there&#8217;s a better way.</p>
<p>There&#8217;s a moderately obscure interface from IE5 for IDocHostUIHandler called <a title="Pay attention, padamon." href="http://msdn.microsoft.com/workshop/browser/hosting/wbcustomization.asp#GetOptionKeyPath">GetOptionKeyPath</a>.  The superficial purpose of this is to allow the IE embedder to create a fake user, so that they can set defaults for IE like the basic font size, background color and so on.  This is generally completely ignored in favor of some CSS, but it turns out that this thing actually covers the sound effect scheme too.</p>
<p>All you need to do is use GetOptionKeyPath, create a fake user, override the OnNavigate sound (and maybe some others) to nothing, and let the rest alone, to default to the user&#8217;s preferences.</p>
<p>Bang: no more clicky noise, and no overriding preferences, breaking other applications and risking corrupting preferences on crash.</p>
<p>Very clean.  <img src='http://fullof.bs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://fullof.bs/oh-neat-a-hack-to-fix-the-ie-click-problem/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>More IE Woes &#8211; This Time, from the Inside</title>
		<link>http://fullof.bs/more-ie-woes-this-time-from-the-inside/</link>
		<comments>http://fullof.bs/more-ie-woes-this-time-from-the-inside/#comments</comments>
		<pubDate>Fri, 23 Jun 2006 02:01:24 +0000</pubDate>
		<dc:creator>John Haugeland</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools and Libraries]]></category>
		<category><![CDATA[Web and Web Standards]]></category>

		<guid isPermaLink="false">http://blog.sc.tri-bit.com/archives/141</guid>
		<description><![CDATA[Wow.  I haven&#8217;t had such mixed feelings about IE in years.

On the one hand, MSHTML &#8211; the COM component that implements IE &#8211; is actually pretty awesome.  I&#8217;ve been able to roll applications using it in hours that would normally have taken weeks.  It&#8217;s an impressive feat of engineering, and though I disagree with some [...]]]></description>
			<content:encoded><![CDATA[<p>Wow.  I haven&#8217;t had such mixed feelings about IE in years.</p>
<p><span id="more-134"></span></p>
<p>On the one hand, MSHTML &#8211; the COM component that implements IE &#8211; is actually pretty awesome.  I&#8217;ve been able to roll applications using it in hours that would normally have taken weeks.  It&#8217;s an impressive feat of engineering, and though I disagree with some design decisions, the usability of the embeddable component is actually pretty spectacular, if you&#8217;re familiar with COM.  In particular, the res:// protocol strikes me as borderline brilliant; binary behaviors are awesome; extensible tags have a lot of untapped potential; BHOs would be great except there are too many spamming scum abusing them.</p>
<p>On the other hand, there are problems.  There&#8217;s one outright boneheaded mistake, and the documentation is sadly lacking.</p>
<ul>
<li>The OnNavigate sound &#8211; that click you hear when you get a link &#8211; <a title="I'm not joking - it's impossible" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;201901" target="_blank">cannot be suppressed</a>.  I&#8217;m not joking &#8211; by design, IE refuses to let you get rid of it.  Their suggestions are to override the user&#8217;s global IE preferences, shut off sound, or to hide the browser before you follow any click and then re-show it after the click.  Given how much Microsoft blabbed about how this should be usable as a transparent control, it leaves me flabbergasted that they haven&#8217;t fixed this until IE7 with FEATURE_DISABLE_NAVIGATION_SOUNDS.  Just amazing.</li>
<ul>
<li><strong>Update: </strong><a title="MSDN is teh wrongs" href="http://blog.sc.tri-bit.com/archives/162"><strong>I found a way</strong></a><strong>.  MSDN is wrong about this; it is indeed fixable.</strong></li>
</ul>
<li>This bit about being unable to touch innerHTML on several tag types (notably table and tbody, where it&#8217;s hella useful) pisses me off, but since I can work through DOM, it&#8217;s annoying rather than important.</li>
<li>One of the particularly wootastic things MS did was to generate an interface called IDocHostUIHandler by which one can inject new functions into JS&#8217; purview through the DOM and window.external , allowing you to effectively provide new interfaces just by implementing a COM object with the automation interfaces in IDispatch.  Of course, I can&#8217;t find a complete example in pure-c++ without ATL, WTL, MFC or some other ignorant wrapper nonsense to save my life, so I&#8217;m pretty stuck.  I have a mostly-complete implementation, but when I try to install it, window.external turns to null, suggesting a flaw.  Of course, all the error handling is in window.external, where I can&#8217;t get at it, so your guess is as good as mine about what&#8217;s actually going on.</li>
</ul>
<p>With some extra documentation and if they hadn&#8217;t been such tards about that clicking noise, MSHTML would be a much more wonderful playground than it actually is.  (I&#8217;m pretty sure there is in fact a way to disable those noises &#8211; several commercial applications do it just fine &#8211; but MSDN insists it&#8217;s unpossible, which suggests it&#8217;s probably some undocumented interface somewhere.  Hell.)</p>
]]></content:encoded>
			<wfw:commentRss>http://fullof.bs/more-ie-woes-this-time-from-the-inside/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sometimes I Forget</title>
		<link>http://fullof.bs/sometimes-i-forget/</link>
		<comments>http://fullof.bs/sometimes-i-forget/#comments</comments>
		<pubDate>Sun, 01 Jan 2006 06:24:58 +0000</pubDate>
		<dc:creator>John Haugeland</dc:creator>
				<category><![CDATA[Blog Meta]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[skin]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[ugly]]></category>

		<guid isPermaLink="false">http://blog.sc.tri-bit.com/?p=7</guid>
		<description><![CDATA[Sometimes I forget just how bad my homepage looks in IE. I&#8217;ve just performed a few fixit hacks, but I&#8217;m still not happy.

So, I just measured, and approximately 7% of the blogosphere is nonsense whining about Internet Explorer.
Since I&#8217;ve just caved and set up a blog, why resist being another one of the sheople? I [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes I forget just how bad <a title="StoneCypher's webpage" href="http://sc.tri-bit.com/">my homepage</a> looks in IE. I&#8217;ve just performed a few fixit hacks, but I&#8217;m still not happy.</p>
<p><span id="more-41"></span><br />
So, I just measured, and approximately 7% of the blogosphere is nonsense whining about Internet Explorer.</p>
<p>Since I&#8217;ve just caved and set up a blog, why resist being another one of the sheople? I haven&#8217;t complained about IE since IE5.0 was avant garde, and 7&#8217;s just coming out; in the fine web tradition of publishing material which is due to be out of date in a few months, let&#8217;s get to kvetching.</p>
<p>I just tore a bunch of neat formatting tricks out of my page, because they had been very tenuously hidden in IE with some hacks I don&#8217;t care to remake. I installed a few mediawiki extensions (after some editing) and as such needed to change the page framing somewhat. I&#8217;m not sure if that&#8217;s when the hacks came undone; it seems more likely it was when I upgraded mediawiki, as I may well have forgotten to check my page in IE. The corner icon was misplaced, the framing lines weren&#8217;t transparent but an ugly black, et cetera. I also fixed some margins.</p>
<p>Thing is, I&#8217;m considering putting ads back onto my page, and getting the right aligned 3rd column was kind of a hassle in Monobook (I use a heavily modified version of MediaWiki&#8217;s default stylesheet, which while pretty carries all the code savvy of a bag of hammers; it&#8217;s a hackish mess, but it&#8217;s too big for me to give enough of a damn to fix.) One particularly nauseatingly awful thing is that the stylesheet, instead of taking the time to hammer out portable correctness, has specialty stylesheets for each major browser which are loaded to deal with native formatting errors.</p>
<p>The maintenance nightmare which erupts as a result is surprisingly awful.</p>
<p>So, the IE7 team has been saying all the right things in their MSDN blogs, about how they want people to abolish the hacks they&#8217;ve been perpetrating for older IE, and replace them with modern, accurate stylesheets. It&#8217;s weird to think of IE as standards-advocative, but recently they&#8217;ve been exactly that, and as much malice as I bear towards the predecessor product, one should give credit where credit is due; this team knows how to talk the talk. (Granted my paranoia suggests they&#8217;re doing it to effect browser rollover, but that&#8217;s not the point.)</p>
<p>Anyhoo, I have high hopes. The stakes are a little different for me than for most; I use embedded MSHTML extensively. (My god does it piss me off that the directx image alpha filter doesn&#8217;t understand res:// .) With appropriate PNG support, a fixed box model and better support for auto margins, many things would be miles and miles easier.</p>
<p>&#8216;Course, this means that I&#8217;ll still have to write heredity styling for embedded applications on platforms which don&#8217;t yet run IE7; whereas people are tolerant of broken web pages, they aren&#8217;t of similarly appearance-broken applications (not that I could blame them.) So, it&#8217;s a step in the right direction, but until I start callously cutting people away, it&#8217;s not enough.</p>
<p>Still, it&#8217;s better than nothing.</p>
]]></content:encoded>
			<wfw:commentRss>http://fullof.bs/sometimes-i-forget/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
