<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Code Crunching - Internet</title>
    <link>http://www.gumpi.com/Blog/</link>
    <description>Software Developement, Karate, Life, and more</description>
    <language>en-us</language>
    <copyright>Daniel Wischnewski</copyright>
    <lastBuildDate>Tue, 31 Mar 2009 09:27:56 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>blog2@gumpi.com</managingEditor>
    <webMaster>blog2@gumpi.com</webMaster>
    <item>
      <trackback:ping>http://www.gumpi.com/Blog/Trackback.aspx?guid=a683d75a-1b8c-48a9-b60c-87a57864d7ba</trackback:ping>
      <pingback:server>http://www.gumpi.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.gumpi.com/Blog/PermaLink,guid,a683d75a-1b8c-48a9-b60c-87a57864d7ba.aspx</pingback:target>
      <dc:creator>Daniel Wischnewski</dc:creator>
      <wfw:comment>http://www.gumpi.com/Blog/CommentView,guid,a683d75a-1b8c-48a9-b60c-87a57864d7ba.aspx</wfw:comment>
      <wfw:commentRss>http://www.gumpi.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a683d75a-1b8c-48a9-b60c-87a57864d7ba</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Well, I am back from the <a href="http://www.gumpi.com/Blog/ct.ashx?id=a683d75a-1b8c-48a9-b60c-87a57864d7ba&amp;url=http%3a%2f%2fwww.sdn.nl">SDN
Event</a> in Driebergen. It was a fun event, I have met quiet a few people and,
after a few years, finally met <a href="http://www.gumpi.com/Blog/ct.ashx?id=a683d75a-1b8c-48a9-b60c-87a57864d7ba&amp;url=http%3a%2f%2fwww.drbob42.com%2f">Dr.
Bob</a> again. One of my session was about the Windows 7 Taskbar (an update for the
components is in the pipe line, btw). And when talking about Windows 7, one of the
question coming up was the user account control (UAC) and how - IF - they
have changed it.
</p>
        <p>
While talking about that, I started out to remind them WHY it was implemented in Windows
Vista and WHY I have not turned it off, ever. The reason is simple: it was implemented
to block viruses from invading your computer and yes, it works. My story for
them was as simple as it was obviously surprising for most of them sitting in the
room.
</p>
        <p>
About two years ago, I started a small experiment. I set up a computer with a new
and clean Windows Vista install. Leaving the UAC on and running updates as Windows
reminded me to do just that. The way a user should be working with the PC. However,
I have not installed any third party Anti-Virus software, nor any third-party firewall,
just the on-board tools Windows Defender and the UAC. I used this PC regularly for
internet surfing, writing mails, doing some fun, testing software and so on. I let
my girl friend use it for internet surfing - she knows how to use a computer, but
by far, she is no geek, or even close to that. She does Excel, Word, mails online,
games online, iTunes, etc. Even some peer-to-peer sharing. She had an administrative
account and I explained to her what UAC meant and why it was implemented.
</p>
        <p>
Well, end of last year I put on Norton AntiVirus, McAffee and a few other anti-virus
tools and ran the big test: All tools reported the same final results: 0 viruses found!
</p>
        <p>
Now my challenge to you: try that with Windows XP in todays Internet world ;-)
</p>
        <p>
Conclusion: yes, the UAC is bothersome at times, and when it pops up to often, it
will get the user aggravated, but it has its purpose. With Windows XP's on-board
tools you simply where at a large risk when you went online. I am a believer
of the UAC and, while it bothers me at times, I support it.
</p>
        <p>
With Windows 7 it shows up less often. So some settings will be changed easier than
under Windows Vista without the user confirming that. But as far as I have seen, none
of the changes (except setting the computer time of course) will survive the next
reboot of your computer. And if you don't mind, under Windows 7 you can move up the
UAC messages to the Windows Vista level again. And yes, if you still mind, you can
turn it off as well, but I know, I won't.   
</p>
        <img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=a683d75a-1b8c-48a9-b60c-87a57864d7ba" />
      </body>
      <title>Windows Vista, UAC, Defender and Viruses...</title>
      <guid isPermaLink="false">http://www.gumpi.com/Blog/PermaLink,guid,a683d75a-1b8c-48a9-b60c-87a57864d7ba.aspx</guid>
      <link>http://www.gumpi.com/Blog/2009/03/31/WindowsVistaUACDefenderAndViruses.aspx</link>
      <pubDate>Tue, 31 Mar 2009 09:27:56 GMT</pubDate>
      <description>&lt;p&gt;
Well, I am back from the &lt;a href="http://www.gumpi.com/Blog/ct.ashx?id=a683d75a-1b8c-48a9-b60c-87a57864d7ba&amp;amp;url=http%3a%2f%2fwww.sdn.nl"&gt;SDN
Event&lt;/a&gt;&amp;nbsp;in Driebergen. It was a fun event, I have met quiet a few people and,
after a few years, finally met &lt;a href="http://www.gumpi.com/Blog/ct.ashx?id=a683d75a-1b8c-48a9-b60c-87a57864d7ba&amp;amp;url=http%3a%2f%2fwww.drbob42.com%2f"&gt;Dr.
Bob&lt;/a&gt; again. One of my session was about the Windows 7 Taskbar (an update for the
components is in the pipe line, btw). And when talking about Windows 7, one of the
question coming up was the user account control (UAC) and how -&amp;nbsp;IF -&amp;nbsp;they
have changed it.
&lt;/p&gt;
&lt;p&gt;
While talking about that, I started out to remind them WHY it was implemented in Windows
Vista and WHY I have not turned it off, ever. The reason is simple: it was implemented
to block viruses&amp;nbsp;from invading your computer and yes, it works. My story for
them was as simple as it was obviously surprising for most of them sitting in the
room.
&lt;/p&gt;
&lt;p&gt;
About two years ago, I started a small experiment. I set up a computer with a new
and clean Windows Vista install. Leaving the UAC on and running updates as Windows
reminded me to do just that. The way a user should be working with the PC. However,
I have not installed any third party Anti-Virus software, nor any third-party firewall,
just the on-board tools Windows Defender and the UAC. I used this PC regularly for
internet surfing, writing mails, doing some fun, testing software and so on. I let
my girl friend use it for internet surfing - she knows how to use a computer, but
by far, she is no geek, or even close to that. She does Excel, Word, mails online,
games online, iTunes, etc. Even some peer-to-peer sharing. She had an administrative
account and I explained to her what UAC meant and why it was implemented.
&lt;/p&gt;
&lt;p&gt;
Well, end of last year I put on Norton AntiVirus, McAffee and a few other anti-virus
tools and ran the big test: All tools reported the same final results: 0 viruses found!
&lt;/p&gt;
&lt;p&gt;
Now my challenge to you: try that with Windows XP in todays Internet world ;-)
&lt;/p&gt;
&lt;p&gt;
Conclusion: yes, the UAC is bothersome at times, and when it pops up to often, it
will get the user aggravated, but it has its purpose. With Windows&amp;nbsp;XP's&amp;nbsp;on-board
tools you simply&amp;nbsp;where at a large risk when&amp;nbsp;you went online. I am a believer
of the UAC and, while it bothers me at times, I support it.
&lt;/p&gt;
&lt;p&gt;
With Windows 7 it shows up less often. So some settings will be changed easier than
under Windows Vista without the user confirming that. But as far as I have seen, none
of the changes (except setting the computer time of course) will survive the next
reboot of your computer. And if you don't mind, under Windows 7 you can move up the
UAC messages to the Windows Vista level again. And yes, if you still mind, you can
turn it off as well, but I know, I won't.&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=a683d75a-1b8c-48a9-b60c-87a57864d7ba" /&gt;</description>
      <comments>http://www.gumpi.com/Blog/CommentView,guid,a683d75a-1b8c-48a9-b60c-87a57864d7ba.aspx</comments>
      <category>Conferences</category>
      <category>Development (English)</category>
      <category>English</category>
      <category>Internet</category>
      <category>Leben</category>
      <category>Windows</category>
      <category>Windows 7</category>
    </item>
    <item>
      <trackback:ping>http://www.gumpi.com/Blog/Trackback.aspx?guid=bd0533f7-9f5b-4655-a479-629d1a81c339</trackback:ping>
      <pingback:server>http://www.gumpi.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.gumpi.com/Blog/PermaLink,guid,bd0533f7-9f5b-4655-a479-629d1a81c339.aspx</pingback:target>
      <dc:creator>Daniel Wischnewski</dc:creator>
      <wfw:comment>http://www.gumpi.com/Blog/CommentView,guid,bd0533f7-9f5b-4655-a479-629d1a81c339.aspx</wfw:comment>
      <wfw:commentRss>http://www.gumpi.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bd0533f7-9f5b-4655-a479-629d1a81c339</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you are interested in (digital) photographie, you might want to check out those
sites:
</p>
        <ul>
          <li>
            <a href="http://www.gumpi.com/Blog/ct.ashx?id=bd0533f7-9f5b-4655-a479-629d1a81c339&amp;url=http%3a%2f%2fwww.photozone.de%2f">http://www.photozone.de/</a> (English,
lens reviews, general information about technology)</li>
          <li>
            <a href="http://www.gumpi.com/Blog/ct.ashx?id=bd0533f7-9f5b-4655-a479-629d1a81c339&amp;url=http%3a%2f%2fstrobist.blogspot.com%2f">http://strobist.blogspot.com/</a> (English,
all about flashes)</li>
        </ul>
        <p>
There are more, but those two just stand out. I'll add more over time, I'm sure ;)
</p>
        <img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=bd0533f7-9f5b-4655-a479-629d1a81c339" />
      </body>
      <title>Digital Photographie - notes to myself</title>
      <guid isPermaLink="false">http://www.gumpi.com/Blog/PermaLink,guid,bd0533f7-9f5b-4655-a479-629d1a81c339.aspx</guid>
      <link>http://www.gumpi.com/Blog/2008/05/01/DigitalPhotographieNotesToMyself.aspx</link>
      <pubDate>Thu, 01 May 2008 14:39:37 GMT</pubDate>
      <description>&lt;p&gt;
If you are interested in (digital) photographie, you might want to check out those
sites:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.gumpi.com/Blog/ct.ashx?id=bd0533f7-9f5b-4655-a479-629d1a81c339&amp;amp;url=http%3a%2f%2fwww.photozone.de%2f"&gt;http://www.photozone.de/&lt;/a&gt;&amp;nbsp;(English,
lens reviews, general information about technology)&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.gumpi.com/Blog/ct.ashx?id=bd0533f7-9f5b-4655-a479-629d1a81c339&amp;amp;url=http%3a%2f%2fstrobist.blogspot.com%2f"&gt;http://strobist.blogspot.com/&lt;/a&gt;&amp;nbsp;(English,
all about flashes)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
There are more, but those two just stand out. I'll add more over time, I'm sure ;)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=bd0533f7-9f5b-4655-a479-629d1a81c339" /&gt;</description>
      <comments>http://www.gumpi.com/Blog/CommentView,guid,bd0533f7-9f5b-4655-a479-629d1a81c339.aspx</comments>
      <category>English</category>
      <category>Fun</category>
      <category>Internet</category>
      <category>Leben</category>
      <category>Pictures</category>
    </item>
    <item>
      <trackback:ping>http://www.gumpi.com/Blog/Trackback.aspx?guid=e9fd3e63-e145-4db3-aadd-dfdfdf8e1b3b</trackback:ping>
      <pingback:server>http://www.gumpi.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.gumpi.com/Blog/PermaLink,guid,e9fd3e63-e145-4db3-aadd-dfdfdf8e1b3b.aspx</pingback:target>
      <dc:creator>Daniel Wischnewski</dc:creator>
      <wfw:comment>http://www.gumpi.com/Blog/CommentView,guid,e9fd3e63-e145-4db3-aadd-dfdfdf8e1b3b.aspx</wfw:comment>
      <wfw:commentRss>http://www.gumpi.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e9fd3e63-e145-4db3-aadd-dfdfdf8e1b3b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Well, if you remember the old web site of TMS Software, you will be glad to learn,
that they have relaunched their web site. It looks so much better, you must go and
visit their site, it is well worth your time.
</p>
        <p>
Go visit them now: <a href="http://www.gumpi.com/Blog/ct.ashx?id=e9fd3e63-e145-4db3-aadd-dfdfdf8e1b3b&amp;url=http%3a%2f%2fwww.tmssoftware.com%2f">http://www.tmssoftware.com/</a></p>
        <p>
@Bruno: sorry I did not answer your e-mail yet, but I will this weekend. I know I
promised an faster response, but time did not permit at the moment.
</p>
        <img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=e9fd3e63-e145-4db3-aadd-dfdfdf8e1b3b" />
      </body>
      <title>TMS Software</title>
      <guid isPermaLink="false">http://www.gumpi.com/Blog/PermaLink,guid,e9fd3e63-e145-4db3-aadd-dfdfdf8e1b3b.aspx</guid>
      <link>http://www.gumpi.com/Blog/2008/03/28/TMSSoftware.aspx</link>
      <pubDate>Fri, 28 Mar 2008 10:59:10 GMT</pubDate>
      <description>&lt;p&gt;
Well, if you remember the old web site of TMS Software, you will be glad to learn,
that they have relaunched their web site. It looks so much better, you must go and
visit their site, it is well worth your time.
&lt;/p&gt;
&lt;p&gt;
Go visit them now: &lt;a href="http://www.gumpi.com/Blog/ct.ashx?id=e9fd3e63-e145-4db3-aadd-dfdfdf8e1b3b&amp;amp;url=http%3a%2f%2fwww.tmssoftware.com%2f"&gt;http://www.tmssoftware.com/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
@Bruno: sorry I did not answer your e-mail yet, but I will this weekend. I know I
promised an faster response, but time did not permit at the moment.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=e9fd3e63-e145-4db3-aadd-dfdfdf8e1b3b" /&gt;</description>
      <comments>http://www.gumpi.com/Blog/CommentView,guid,e9fd3e63-e145-4db3-aadd-dfdfdf8e1b3b.aspx</comments>
      <category>Delphi</category>
      <category>Development</category>
      <category>Development (English)</category>
      <category>English</category>
      <category>Internet</category>
    </item>
    <item>
      <trackback:ping>http://www.gumpi.com/Blog/Trackback.aspx?guid=88a0384d-aaec-4e2e-b196-13c87f613d22</trackback:ping>
      <pingback:server>http://www.gumpi.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.gumpi.com/Blog/PermaLink,guid,88a0384d-aaec-4e2e-b196-13c87f613d22.aspx</pingback:target>
      <dc:creator>Daniel Wischnewski</dc:creator>
      <wfw:comment>http://www.gumpi.com/Blog/CommentView,guid,88a0384d-aaec-4e2e-b196-13c87f613d22.aspx</wfw:comment>
      <wfw:commentRss>http://www.gumpi.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=88a0384d-aaec-4e2e-b196-13c87f613d22</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This week the administrators of <a href="http://www.gumpi.com/Blog/ct.ashx?id=88a0384d-aaec-4e2e-b196-13c87f613d22&amp;url=http%3a%2f%2fwww.dsdt.info">www.dsdt.info</a> (Delphi-Source,
der Delphi-Treff) relaunched the web site with a new design. The new side reminds
me of a Web 2.0 portal just from the looks of it. With the relaunch of their site,
they chose a new name, simply <a href="http://www.gumpi.com/Blog/ct.ashx?id=88a0384d-aaec-4e2e-b196-13c87f613d22&amp;url=http%3a%2f%2fwww.Delphi-Treff.de">www.Delphi-Treff.de</a>.
It is one of the leading German language Tutorial sites on the web for <a href="http://www.gumpi.com/Blog/ct.ashx?id=88a0384d-aaec-4e2e-b196-13c87f613d22&amp;url=http%3a%2f%2fwww.codegear.com%2fproducts%2fdelphi%2fwin32">Delphi</a> developers.
</p>
        <p>
If you know German, check it out.
</p>
        <img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=88a0384d-aaec-4e2e-b196-13c87f613d22" />
      </body>
      <title>DSDT is now Delphi-Treff</title>
      <guid isPermaLink="false">http://www.gumpi.com/Blog/PermaLink,guid,88a0384d-aaec-4e2e-b196-13c87f613d22.aspx</guid>
      <link>http://www.gumpi.com/Blog/2008/01/15/DSDTIsNowDelphiTreff.aspx</link>
      <pubDate>Tue, 15 Jan 2008 13:55:35 GMT</pubDate>
      <description>&lt;p&gt;
This week the administrators of &lt;a href="http://www.gumpi.com/Blog/ct.ashx?id=88a0384d-aaec-4e2e-b196-13c87f613d22&amp;amp;url=http%3a%2f%2fwww.dsdt.info"&gt;www.dsdt.info&lt;/a&gt; (Delphi-Source,
der Delphi-Treff) relaunched the web site with a new design. The new side reminds
me of a Web 2.0 portal just from the looks of it. With the relaunch of their site,
they chose a new name, simply &lt;a href="http://www.gumpi.com/Blog/ct.ashx?id=88a0384d-aaec-4e2e-b196-13c87f613d22&amp;amp;url=http%3a%2f%2fwww.Delphi-Treff.de"&gt;www.Delphi-Treff.de&lt;/a&gt;.
It is one of the leading German language Tutorial sites on the web for &lt;a href="http://www.gumpi.com/Blog/ct.ashx?id=88a0384d-aaec-4e2e-b196-13c87f613d22&amp;amp;url=http%3a%2f%2fwww.codegear.com%2fproducts%2fdelphi%2fwin32"&gt;Delphi&lt;/a&gt; developers.
&lt;/p&gt;
&lt;p&gt;
If you know German, check it out.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=88a0384d-aaec-4e2e-b196-13c87f613d22" /&gt;</description>
      <comments>http://www.gumpi.com/Blog/CommentView,guid,88a0384d-aaec-4e2e-b196-13c87f613d22.aspx</comments>
      <category>Delphi</category>
      <category>Development</category>
      <category>Development (English)</category>
      <category>English</category>
      <category>Internet</category>
    </item>
    <item>
      <trackback:ping>http://www.gumpi.com/Blog/Trackback.aspx?guid=12974689-20b6-4505-b9b4-21f767391542</trackback:ping>
      <pingback:server>http://www.gumpi.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.gumpi.com/Blog/PermaLink,guid,12974689-20b6-4505-b9b4-21f767391542.aspx</pingback:target>
      <dc:creator>Daniel Wischnewski</dc:creator>
      <wfw:comment>http://www.gumpi.com/Blog/CommentView,guid,12974689-20b6-4505-b9b4-21f767391542.aspx</wfw:comment>
      <wfw:commentRss>http://www.gumpi.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=12974689-20b6-4505-b9b4-21f767391542</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Often, I am asked how to implement something similar to the CodeGear <a href="http://www.gumpi.com/Blog/ct.ashx?id=12974689-20b6-4505-b9b4-21f767391542&amp;url=http%3a%2f%2fwww.codegear.com%2fproducts%2fradstudio">RAD
Studio</a> (aka BDS) Welcome Page. Well, to be honest, I didn't know myself. All I
have done for Borland/CodeGear so far, was implementing the whole HTML and JavaScript
side, as well as XML and XSL. But this is all open source, and can be found in the
$(BDS)\Welcomepage folder. No big secrets here.
</p>
        <p align="center">
          <img alt="Sample application acting on button click in HTML" src="/blog/content/binary/Delphi/TipsTricks/InteractiveWebBrowser.jpg" />
          <br />
          <font size="1">Sample application acting on button click in HTML</font>
        </p>
        <p>
But what you really want to know is, how to give HTML/JavaScript access to your application
or how to implement your own URL, such as bds:/default.htm. Well, I took the time
and investigated just that, today. And let me tell you, it is easy, once you know
where to look. You need to know two interfaces:
</p>
        <ul>
          <li>
ICustomDoc - allows you to assign your own document handler for the web browser instance</li>
          <li>
IDocHostUIHandler - allows you to return an interfaced object, that will be accessible
from JavaScript and to manipulate the URL requested (as well as many other functions)</li>
        </ul>
        <p>
First, let me give you the interface declarations, you need:
</p>
        <pre class="sourcecode">
          <code class="keyword">type</code> PDOCHOSTUIINFO = ^TDOCHOSTUIINFO;
TDOCHOSTUIINFO = <code class="keyword">record</code> cbSize: ULONG; dwFlags: DWORD;
dwDoubleClick: DWORD; chHostCss: POleStr; chHostNS: POleStr; <code class="keyword">end</code>;
IDocHostUIHandler = <code class="keyword">interface</code>(IUnknown) [<code class="quote">'{bd3f23c0-d43e-11cf-893b-00aa00bdce1a}'</code>] <code class="keyword">function</code> ShowContextMenu(<code class="keyword">const</code> dwID:
DWORD; <code class="keyword">const</code> ppt: PPOINT; <code class="keyword">const</code> CommandTarget:
IUnknown; <code class="keyword">const</code> Context: IDispatch): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> GetHostInfo(<code class="keyword">var</code> pInfo:
TDOCHOSTUIINFO): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> ShowUI(<code class="keyword">const</code> dwID:
DWORD; <code class="keyword">const</code> pActiveObject: IOleInPlaceActiveObject; <code class="keyword">const</code> pCommandTarget:
IOleCommandTarget; <code class="keyword">const</code> pFrame: IOleInPlaceFrame; <code class="keyword">const</code> pDoc:
IOleInPlaceUIWindow): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> HideUI:
HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> UpdateUI:
HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> EnableModeless(<code class="keyword">const</code> fEnable:
BOOL): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> OnDocWindowActivate(<code class="keyword">const</code> fActivate:
BOOL): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> OnFrameWindowActivate(<code class="keyword">const</code> fActivate:
BOOL): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> ResizeBorder(<code class="keyword">const</code> prcBorder:
PRECT; <code class="keyword">const</code> pUIWindow: IOleInPlaceUIWindow; <code class="keyword">const</code> fRameWindow:
BOOL): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> TranslateAccelerator(<code class="keyword">const</code> lpMsg:
PMSG; <code class="keyword">const</code> pguidCmdGroup: PGUID; <code class="keyword">const</code> nCmdID:
DWORD): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> GetOptionKeyPath(out
pchKey: POleStr; <code class="keyword">const</code> dw: DWORD): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> GetDropTarget(<code class="keyword">const</code> pDropTarget:
IDropTarget; out ppDropTarget: IDropTarget): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> GetExternal(out
ppDispatch: IDispatch): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> TranslateUrl(<code class="keyword">const</code> dwTranslate:
DWORD; <code class="keyword">const</code> pchURLIn: POleStr; out ppchURLOut: POleStr):
HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">function</code> FilterDataObject(<code class="keyword">const</code> pDO:
IDataObject; out ppDORet: IDataObject): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">end</code>;
ICustomDoc = <code class="keyword">interface</code>(IUnknown) [<code class="quote">'{3050f3f0-98b5-11cf-bb82-00aa00bdce0b}'</code>] <code class="keyword">function</code> SetUIHandler(<code class="keyword">const</code> pUIHandler:
IDocHostUIHandler): HRESULT; <code class="keyword">stdcall</code>; <code class="keyword">end</code>; </pre>
        <p>
Once you figured those out, the rest is straight forward. Create a new VCL application
and place a TWebBrowser component on your form. Before you can assign your own object
(in the sample, it is the form itself) you have to load some document. I recommend
loading <em>about:blank</em>, that is fast and works always.
</p>
        <pre class="sourcecode">
          <code class="keyword">procedure</code> TForm8.FormCreate(Sender:
TObject); <code class="keyword">begin</code><code class="comment">// initialize web
browser</code> wbbDisplay.Navigate(<code class="quote">'about:blank'</code>); <code class="keyword">while</code> wbbDisplay.Busy <code class="keyword">do</code> Application.ProcessMessages; <code class="comment">//
we have to handle some Interface requests, register this form as IDocHostUIHandler</code> (wbbDisplay.Document <code class="keyword">as</code> ICustomDoc).SetUIHandler(Self); <code class="keyword">end</code>; </pre>
        <p>
Implement the IDocHostUIHandler interface in your form. Next you need to implement
two methods:
</p>
        <ul>
          <li>
GetExternal - allows you to return an interfaced object (IDispatch), which you can
access from JavaScript</li>
          <li>
TranslateUrl - allows you to manipulate the URL before the web browser will attempt
to load the file</li>
          <li>
Return for all other methods either <strong>E_NOTIMPL</strong> or <strong>S_FALSE</strong> according
to MSDN documentation.</li>
        </ul>
        <pre class="sourcecode">
          <code class="keyword">function</code> TForm8.GetExternal(out
ppDispatch: IDispatch): HRESULT; <code class="keyword">begin</code> ppDispatch :=
TMyApp.Create <code class="keyword">as</code> IDispatch; Result := S_OK; <code class="keyword">end</code>; <code class="keyword">function</code> TForm8.TranslateUrl(<code class="keyword">const</code> dwTranslate:
DWORD; <code class="keyword">const</code> pchURLIn: POLESTR; out ppchURLOut: POLESTR):
HRESULT; <code class="keyword">var</code> NewURL: WideString; <code class="keyword">begin</code><code class="keyword">if</code> WideSameText(Copy(pchURLIn,
1, 6), <code class="quote">'app://'</code>) <code class="keyword">then</code><code class="keyword">begin</code> NewURL
:= ExtractFilePath(Application.ExeName) + Copy(pchURLIn, 7, MaxInt); <code class="keyword">if</code> NewUrl[Length(NewURL)]
= <code class="quote">'/'</code><code class="keyword">then</code> SetLength(NewUrl,
Length(NewUrl) - 1); ppchURLOut := POLESTR(NewURL); Result := S_OK; <code class="keyword">end</code><code class="keyword">else</code><code class="keyword">begin</code> Result
:= S_FALSE; <code class="keyword">end</code>; <code class="keyword">end</code>; </pre>
        <p>
Now, you need to add a type library to your project. Once done, add an <strong>automation
object</strong> (not <em>COM-Object</em>) to your application. This object you will
return from the method <strong>GetExternal</strong> (see above, TMyApp there). Implement
your methods as needed and you are done. In the code above, the application will change
all URLs starting with <strong>app://</strong> to load the files directly from the
application folder. For some reason, web browser seems to add an additional slash
(/) to the file requested, which has to be removed (see code <strong>TranslateUrl</strong>).
</p>
        <p>
From JavaScript, you call your applications interfaced object by using the <strong>external.</strong> statement.
If you name your method <em>TestMe</em>, you call it with <em>external.TestMe();</em> from
JavaScript.
</p>
        <p>
That's it already. The sample projected can be <a href="/Downloads/Samples/WebBrowserHandler.zip">downloaded
(ZIP, 280 Kb)</a>.
</p>
        <img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=12974689-20b6-4505-b9b4-21f767391542" />
      </body>
      <title>Creating your own interactive Welcome Page</title>
      <guid isPermaLink="false">http://www.gumpi.com/Blog/PermaLink,guid,12974689-20b6-4505-b9b4-21f767391542.aspx</guid>
      <link>http://www.gumpi.com/Blog/2007/11/12/CreatingYourOwnInteractiveWelcomePage.aspx</link>
      <pubDate>Mon, 12 Nov 2007 17:20:28 GMT</pubDate>
      <description>&lt;p&gt;
Often, I am asked how to implement something similar to the CodeGear &lt;a href="http://www.gumpi.com/Blog/ct.ashx?id=12974689-20b6-4505-b9b4-21f767391542&amp;amp;url=http%3a%2f%2fwww.codegear.com%2fproducts%2fradstudio"&gt;RAD
Studio&lt;/a&gt; (aka BDS) Welcome Page. Well, to be honest, I didn't know myself. All I
have done for Borland/CodeGear so far, was implementing the whole HTML and JavaScript
side, as well as XML and XSL. But this is all open source, and can be found in the
$(BDS)\Welcomepage folder. No big secrets here.
&lt;/p&gt;
&lt;p align=center&gt;
&lt;img alt="Sample application acting on button click in HTML" src="/blog/content/binary/Delphi/TipsTricks/InteractiveWebBrowser.jpg"&gt;
&lt;br&gt;
&lt;font size=1&gt;Sample application acting on button click in HTML&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
But what you really want to know is, how to give HTML/JavaScript access to your application
or how to implement your own URL, such as bds:/default.htm. Well, I took the time
and investigated just that, today. And let me tell you, it is easy, once you know
where to look. You need to know two interfaces:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
ICustomDoc - allows you to assign your own document handler for the web browser instance&lt;/li&gt;
&lt;li&gt;
IDocHostUIHandler - allows you to return an interfaced object, that will be accessible
from JavaScript and to manipulate the URL requested (as well as many other functions)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
First, let me give you the interface declarations, you need:
&lt;/p&gt;
&lt;pre class=sourcecode&gt;&lt;code class=keyword&gt;type&lt;/code&gt; PDOCHOSTUIINFO = ^TDOCHOSTUIINFO;
TDOCHOSTUIINFO = &lt;code class=keyword&gt;record&lt;/code&gt; cbSize: ULONG; dwFlags: DWORD;
dwDoubleClick: DWORD; chHostCss: POleStr; chHostNS: POleStr; &lt;code class=keyword&gt;end&lt;/code&gt;;
IDocHostUIHandler = &lt;code class=keyword&gt;interface&lt;/code&gt;(IUnknown) [&lt;code class=quote&gt;'{bd3f23c0-d43e-11cf-893b-00aa00bdce1a}'&lt;/code&gt;] &lt;code class=keyword&gt;function&lt;/code&gt; ShowContextMenu(&lt;code class=keyword&gt;const&lt;/code&gt; dwID:
DWORD; &lt;code class=keyword&gt;const&lt;/code&gt; ppt: PPOINT; &lt;code class=keyword&gt;const&lt;/code&gt; CommandTarget:
IUnknown; &lt;code class=keyword&gt;const&lt;/code&gt; Context: IDispatch): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; GetHostInfo(&lt;code class=keyword&gt;var&lt;/code&gt; pInfo:
TDOCHOSTUIINFO): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; ShowUI(&lt;code class=keyword&gt;const&lt;/code&gt; dwID:
DWORD; &lt;code class=keyword&gt;const&lt;/code&gt; pActiveObject: IOleInPlaceActiveObject; &lt;code class=keyword&gt;const&lt;/code&gt; pCommandTarget:
IOleCommandTarget; &lt;code class=keyword&gt;const&lt;/code&gt; pFrame: IOleInPlaceFrame; &lt;code class=keyword&gt;const&lt;/code&gt; pDoc:
IOleInPlaceUIWindow): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; HideUI:
HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; UpdateUI:
HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; EnableModeless(&lt;code class=keyword&gt;const&lt;/code&gt; fEnable:
BOOL): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; OnDocWindowActivate(&lt;code class=keyword&gt;const&lt;/code&gt; fActivate:
BOOL): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; OnFrameWindowActivate(&lt;code class=keyword&gt;const&lt;/code&gt; fActivate:
BOOL): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; ResizeBorder(&lt;code class=keyword&gt;const&lt;/code&gt; prcBorder:
PRECT; &lt;code class=keyword&gt;const&lt;/code&gt; pUIWindow: IOleInPlaceUIWindow; &lt;code class=keyword&gt;const&lt;/code&gt; fRameWindow:
BOOL): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; TranslateAccelerator(&lt;code class=keyword&gt;const&lt;/code&gt; lpMsg:
PMSG; &lt;code class=keyword&gt;const&lt;/code&gt; pguidCmdGroup: PGUID; &lt;code class=keyword&gt;const&lt;/code&gt; nCmdID:
DWORD): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; GetOptionKeyPath(out
pchKey: POleStr; &lt;code class=keyword&gt;const&lt;/code&gt; dw: DWORD): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; GetDropTarget(&lt;code class=keyword&gt;const&lt;/code&gt; pDropTarget:
IDropTarget; out ppDropTarget: IDropTarget): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; GetExternal(out
ppDispatch: IDispatch): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; TranslateUrl(&lt;code class=keyword&gt;const&lt;/code&gt; dwTranslate:
DWORD; &lt;code class=keyword&gt;const&lt;/code&gt; pchURLIn: POleStr; out ppchURLOut: POleStr):
HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; FilterDataObject(&lt;code class=keyword&gt;const&lt;/code&gt; pDO:
IDataObject; out ppDORet: IDataObject): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;end&lt;/code&gt;;
ICustomDoc = &lt;code class=keyword&gt;interface&lt;/code&gt;(IUnknown) [&lt;code class=quote&gt;'{3050f3f0-98b5-11cf-bb82-00aa00bdce0b}'&lt;/code&gt;] &lt;code class=keyword&gt;function&lt;/code&gt; SetUIHandler(&lt;code class=keyword&gt;const&lt;/code&gt; pUIHandler:
IDocHostUIHandler): HRESULT; &lt;code class=keyword&gt;stdcall&lt;/code&gt;; &lt;code class=keyword&gt;end&lt;/code&gt;; &lt;/pre&gt;
&lt;p&gt;
Once you figured those out, the rest is straight forward. Create a new VCL application
and place a TWebBrowser component on your form. Before you can assign your own object
(in the sample, it is the form itself) you have to load some document. I recommend
loading &lt;em&gt;about:blank&lt;/em&gt;, that is fast and works always.
&lt;/p&gt;
&lt;pre class=sourcecode&gt;&lt;code class=keyword&gt;procedure&lt;/code&gt; TForm8.FormCreate(Sender:
TObject); &lt;code class=keyword&gt;begin&lt;/code&gt; &lt;code class=comment&gt;// initialize web browser&lt;/code&gt; wbbDisplay.Navigate(&lt;code class=quote&gt;'about:blank'&lt;/code&gt;); &lt;code class=keyword&gt;while&lt;/code&gt; wbbDisplay.Busy &lt;code class=keyword&gt;do&lt;/code&gt; Application.ProcessMessages; &lt;code class=comment&gt;//
we have to handle some Interface requests, register this form as IDocHostUIHandler&lt;/code&gt; (wbbDisplay.Document &lt;code class=keyword&gt;as&lt;/code&gt; ICustomDoc).SetUIHandler(Self); &lt;code class=keyword&gt;end&lt;/code&gt;; &lt;/pre&gt;
&lt;p&gt;
Implement the IDocHostUIHandler interface in your form. Next you need to implement
two methods:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
GetExternal - allows you to return an interfaced object (IDispatch), which you can
access from JavaScript&lt;/li&gt;
&lt;li&gt;
TranslateUrl - allows you to manipulate the URL before the web browser will attempt
to load the file&lt;/li&gt;
&lt;li&gt;
Return for all other methods either &lt;strong&gt;E_NOTIMPL&lt;/strong&gt; or &lt;strong&gt;S_FALSE&lt;/strong&gt; according
to MSDN documentation.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=sourcecode&gt;&lt;code class=keyword&gt;function&lt;/code&gt; TForm8.GetExternal(out ppDispatch:
IDispatch): HRESULT; &lt;code class=keyword&gt;begin&lt;/code&gt; ppDispatch := TMyApp.Create &lt;code class=keyword&gt;as&lt;/code&gt; IDispatch;
Result := S_OK; &lt;code class=keyword&gt;end&lt;/code&gt;; &lt;code class=keyword&gt;function&lt;/code&gt; TForm8.TranslateUrl(&lt;code class=keyword&gt;const&lt;/code&gt; dwTranslate:
DWORD; &lt;code class=keyword&gt;const&lt;/code&gt; pchURLIn: POLESTR; out ppchURLOut: POLESTR):
HRESULT; &lt;code class=keyword&gt;var&lt;/code&gt; NewURL: WideString; &lt;code class=keyword&gt;begin&lt;/code&gt; &lt;code class=keyword&gt;if&lt;/code&gt; WideSameText(Copy(pchURLIn,
1, 6), &lt;code class=quote&gt;'app://'&lt;/code&gt;) &lt;code class=keyword&gt;then&lt;/code&gt; &lt;code class=keyword&gt;begin&lt;/code&gt; NewURL
:= ExtractFilePath(Application.ExeName) + Copy(pchURLIn, 7, MaxInt); &lt;code class=keyword&gt;if&lt;/code&gt; NewUrl[Length(NewURL)]
= &lt;code class=quote&gt;'/'&lt;/code&gt; &lt;code class=keyword&gt;then&lt;/code&gt; SetLength(NewUrl, Length(NewUrl)
- 1); ppchURLOut := POLESTR(NewURL); Result := S_OK; &lt;code class=keyword&gt;end&lt;/code&gt; &lt;code class=keyword&gt;else&lt;/code&gt; &lt;code class=keyword&gt;begin&lt;/code&gt; Result
:= S_FALSE; &lt;code class=keyword&gt;end&lt;/code&gt;; &lt;code class=keyword&gt;end&lt;/code&gt;; &lt;/pre&gt;
&lt;p&gt;
Now, you need to add a type library to your project. Once done, add an &lt;strong&gt;automation
object&lt;/strong&gt; (not &lt;em&gt;COM-Object&lt;/em&gt;) to your application. This object you will
return from the method &lt;strong&gt;GetExternal&lt;/strong&gt; (see above, TMyApp there). Implement
your methods as needed and you are done. In the code above, the application will change
all URLs starting with &lt;strong&gt;app://&lt;/strong&gt; to load the files directly from the
application folder. For some reason, web browser seems to add an additional slash
(/) to the file requested, which has to be removed (see code &lt;strong&gt;TranslateUrl&lt;/strong&gt;).
&lt;/p&gt;
&lt;p&gt;
From JavaScript, you call your applications interfaced object by using the &lt;strong&gt;external.&lt;/strong&gt; statement.
If you name your method &lt;em&gt;TestMe&lt;/em&gt;, you call it with &lt;em&gt;external.TestMe();&lt;/em&gt; from
JavaScript.
&lt;/p&gt;
&lt;p&gt;
That's it already. The sample projected can be &lt;a href="/Downloads/Samples/WebBrowserHandler.zip"&gt;downloaded
(ZIP, 280 Kb)&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=12974689-20b6-4505-b9b4-21f767391542" /&gt;</description>
      <comments>http://www.gumpi.com/Blog/CommentView,guid,12974689-20b6-4505-b9b4-21f767391542.aspx</comments>
      <category>Delphi</category>
      <category>Development</category>
      <category>Development (English)</category>
      <category>English</category>
      <category>Internet</category>
    </item>
    <item>
      <trackback:ping>http://www.gumpi.com/Blog/Trackback.aspx?guid=cade4915-89ac-44a0-a89c-9cf3233ce39d</trackback:ping>
      <pingback:server>http://www.gumpi.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.gumpi.com/Blog/PermaLink,guid,cade4915-89ac-44a0-a89c-9cf3233ce39d.aspx</pingback:target>
      <dc:creator>Daniel Wischnewski</dc:creator>
      <wfw:comment>http://www.gumpi.com/Blog/CommentView,guid,cade4915-89ac-44a0-a89c-9cf3233ce39d.aspx</wfw:comment>
      <wfw:commentRss>http://www.gumpi.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=cade4915-89ac-44a0-a89c-9cf3233ce39d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Often we are challenged in life, especially when it comes to web page design. And
when you want to have something "normal" as a page footer, which will always display
at the bottom of the page, but never before the end of the content, you are running
into THE short coming of the CSS definitions.
</p>
        <p>
It is simply not designed to fit this need. However, one smart guy found a working
solution, at least as long as you have a defined height for it.
</p>
        <p>
Well, <a href="http://www.gumpi.com/Blog/ct.ashx?id=cade4915-89ac-44a0-a89c-9cf3233ce39d&amp;url=http%3a%2f%2fwww.themaninblue.com%2fexperiment%2ffooterStickAlt%2f">here
you go</a>, use it in your ASP.NET projects :)
</p>
        <img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=cade4915-89ac-44a0-a89c-9cf3233ce39d" />
      </body>
      <title>CSS: Have A Real Page Footer</title>
      <guid isPermaLink="false">http://www.gumpi.com/Blog/PermaLink,guid,cade4915-89ac-44a0-a89c-9cf3233ce39d.aspx</guid>
      <link>http://www.gumpi.com/Blog/2007/11/12/CSSHaveARealPageFooter.aspx</link>
      <pubDate>Mon, 12 Nov 2007 10:19:23 GMT</pubDate>
      <description>&lt;p&gt;
Often we are challenged in life, especially when it comes to web page design. And
when you want to have something "normal" as a page footer, which will always display
at the bottom of the page, but never before the end of the content, you are running
into THE short coming of the CSS definitions.
&lt;/p&gt;
&lt;p&gt;
It is simply not designed to fit this need. However, one smart guy found a working
solution, at least as long as you have a defined height for it.
&lt;/p&gt;
&lt;p&gt;
Well, &lt;a href="http://www.gumpi.com/Blog/ct.ashx?id=cade4915-89ac-44a0-a89c-9cf3233ce39d&amp;amp;url=http%3a%2f%2fwww.themaninblue.com%2fexperiment%2ffooterStickAlt%2f"&gt;here
you go&lt;/a&gt;, use it in your ASP.NET projects :)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.gumpi.com/Blog/aggbug.ashx?id=cade4915-89ac-44a0-a89c-9cf3233ce39d" /&gt;</description>
      <comments>http://www.gumpi.com/Blog/CommentView,guid,cade4915-89ac-44a0-a89c-9cf3233ce39d.aspx</comments>
      <category>Delphi</category>
      <category>Development</category>
      <category>Development (English)</category>
      <category>English</category>
      <category>Internet</category>
    </item>
  </channel>
</rss>