<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for MelanderBlog</title>
	<link>http://melander.dk</link>
	<description>There is nothing wrong with your television set. Do not attempt to adjust the picture.</description>
	<pubDate>Thu, 11 Mar 2010 17:00:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>Comment on The Drag and Drop Component Suite for Delphi by Edwin Yip</title>
		<link>http://melander.dk/delphi/dragdrop/#comment-621</link>
		<dc:creator>Edwin Yip</dc:creator>
		<pubDate>Thu, 11 Mar 2010 14:17:25 +0000</pubDate>
		<guid>http://melander.dk/delphi/dragdrop/#comment-621</guid>
		<description>Thank yo for the info, Anders!</description>
		<content:encoded><![CDATA[<p>Thank yo for the info, Anders!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Alpha Blended Splash Screen in Delphi - Part 2 by Anders Melander</title>
		<link>http://melander.dk/articles/alphasplash2/#comment-620</link>
		<dc:creator>Anders Melander</dc:creator>
		<pubDate>Thu, 11 Mar 2010 14:11:22 +0000</pubDate>
		<guid>http://melander.dk/articles/alphasplash2/#comment-620</guid>
		<description>&lt;p class="image right"&gt;&lt;a href="http://melander.dk/wordpress/wp-content/uploads/2010/03/transparent_timage.png" title="Transparent PNG in TImage component" rel="lytebox" rel="nofollow"&gt;&lt;img src="http://melander.dk/wordpress/wp-content/uploads/2010/03/transparent_timage.thumbnail.png" alt="Transparent PNG in TImage component" /&gt;&lt;/a&gt;&lt;/p&gt;
I don&#39;t know what that has to do with the article you&#39;re commenting on but &lt;code&gt;TImage&lt;/code&gt; and &lt;code&gt;TPngImage&lt;/code&gt; support transparent PNGs just fine.
&lt;p style="clear:both"/&gt;</description>
		<content:encoded><![CDATA[<p class="image right"><a href="http://melander.dk/wordpress/wp-content/uploads/2010/03/transparent_timage.png" title="Transparent PNG in TImage component" rel="lytebox" rel="nofollow"><img src="http://melander.dk/wordpress/wp-content/uploads/2010/03/transparent_timage.thumbnail.png" alt="Transparent PNG in TImage component" /></a></p>
<p>I don&#39;t know what that has to do with the article you&#39;re commenting on but <code>TImage</code> and <code>TPngImage</code> support transparent PNGs just fine.</p>
<p style="clear:both"/>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Alpha Blended Splash Screen in Delphi - Part 2 by MJ</title>
		<link>http://melander.dk/articles/alphasplash2/#comment-619</link>
		<dc:creator>MJ</dc:creator>
		<pubDate>Thu, 11 Mar 2010 13:05:48 +0000</pubDate>
		<guid>http://melander.dk/articles/alphasplash2/#comment-619</guid>
		<description>Hello, I haven&#39;t work with PNG in Delphi, so I&#39;m looking for advices about next problem: I have to show picture over picture, but I can&#39;t manage with the transparent spots, so the below one to be visible where the above should be transparent. I tried with Image component and pnglibrary, but still have no solution.</description>
		<content:encoded><![CDATA[<p>Hello, I haven&#39;t work with PNG in Delphi, so I&#39;m looking for advices about next problem: I have to show picture over picture, but I can&#39;t manage with the transparent spots, so the below one to be visible where the above should be transparent. I tried with Image component and pnglibrary, but still have no solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Drag and Drop Component Suite for Delphi by Anders Melander</title>
		<link>http://melander.dk/delphi/dragdrop/#comment-618</link>
		<dc:creator>Anders Melander</dc:creator>
		<pubDate>Thu, 11 Mar 2010 08:04:42 +0000</pubDate>
		<guid>http://melander.dk/delphi/dragdrop/#comment-618</guid>
		<description>Define &#34;does not work&#34;.

To my knowledge Outlook does not support the &lt;a href="http://msdn.microsoft.com/en-us/library/bb776902%28VS.85%29.aspx#CFSTR_FILENAMEMAP" title="CFSTR_FILENAMEMAP" rel="nofollow"&gt;FileNameMap&lt;/a&gt; clipboard format which is what the &lt;code&gt;MappedNames&lt;/code&gt; property interfaces to.
In order for &lt;code&gt;MappedNames&lt;/code&gt; to have any effect the drop target must support the FileNameMap clipboard format. Explorer is the only application I know of that does so.</description>
		<content:encoded><![CDATA[<p>Define &quot;does not work&quot;.</p>
<p>To my knowledge Outlook does not support the <a href="http://msdn.microsoft.com/en-us/library/bb776902%28VS.85%29.aspx#CFSTR_FILENAMEMAP" title="CFSTR_FILENAMEMAP" rel="nofollow" class="liexternal">FileNameMap</a> clipboard format which is what the <code>MappedNames</code> property interfaces to.<br />
In order for <code>MappedNames</code> to have any effect the drop target must support the FileNameMap clipboard format. Explorer is the only application I know of that does so.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Drag and Drop Component Suite for Delphi by Anders Melander</title>
		<link>http://melander.dk/delphi/dragdrop/#comment-617</link>
		<dc:creator>Anders Melander</dc:creator>
		<pubDate>Thu, 11 Mar 2010 07:42:27 +0000</pubDate>
		<guid>http://melander.dk/delphi/dragdrop/#comment-617</guid>
		<description>Good point.

The VirtualFile and VirtualFileStream examples demonstrates how to do it.</description>
		<content:encoded><![CDATA[<p>Good point.</p>
<p>The VirtualFile and VirtualFileStream examples demonstrates how to do it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Drag and Drop Component Suite for Delphi by Edwin Yip</title>
		<link>http://melander.dk/delphi/dragdrop/#comment-616</link>
		<dc:creator>Edwin Yip</dc:creator>
		<pubDate>Thu, 11 Mar 2010 02:57:55 +0000</pubDate>
		<guid>http://melander.dk/delphi/dragdrop/#comment-616</guid>
		<description>Hi Anders,
I found the the &lt;code&gt;TDropFileSource.MappedNames&lt;/code&gt; does not work with Outlook 2007, although it works with the Windows Explorer, any comment about this? Thank you.</description>
		<content:encoded><![CDATA[<p>Hi Anders,<br />
I found the the <code>TDropFileSource.MappedNames</code> does not work with Outlook 2007, although it works with the Windows Explorer, any comment about this? Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Drag and Drop Component Suite for Delphi by Yuri Maggi</title>
		<link>http://melander.dk/delphi/dragdrop/#comment-615</link>
		<dc:creator>Yuri Maggi</dc:creator>
		<pubDate>Thu, 11 Mar 2010 02:13:55 +0000</pubDate>
		<guid>http://melander.dk/delphi/dragdrop/#comment-615</guid>
		<description>Dear all,

If the need is to save the entire message as a &#34;message.msg&#34;, I think the best way is to use &lt;code&gt;TVirtualFileStreamDataFormat&lt;/code&gt; directly and catch the entire stream from the Drag Source or Clipboard (sorry If I misunderstood the question).</description>
		<content:encoded><![CDATA[<p>Dear all,</p>
<p>If the need is to save the entire message as a &quot;message.msg&quot;, I think the best way is to use <code>TVirtualFileStreamDataFormat</code> directly and catch the entire stream from the Drag Source or Clipboard (sorry If I misunderstood the question).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Drag and Drop Component Suite for Delphi by Anders Melander</title>
		<link>http://melander.dk/delphi/dragdrop/#comment-614</link>
		<dc:creator>Anders Melander</dc:creator>
		<pubDate>Wed, 10 Mar 2010 22:57:11 +0000</pubDate>
		<guid>http://melander.dk/delphi/dragdrop/#comment-614</guid>
		<description>Um... The second parameter to &lt;code&gt;TMessage.Create()&lt;/code&gt; must be an &lt;code&gt;IStorage&lt;/code&gt; interface pointer. Since you are passing &lt;strong&gt;nil&lt;/strong&gt; you will naturally get an AV when a method on that interface is used.

You need to get the &lt;code&gt;IStorage&lt;/code&gt; interface from the &lt;code&gt;TOutlookDataFormat&lt;/code&gt; object. Check the OutlookDemo source again.</description>
		<content:encoded><![CDATA[<p>Um&#8230; The second parameter to <code>TMessage.Create()</code> must be an <code>IStorage</code> interface pointer. Since you are passing <strong>nil</strong> you will naturally get an AV when a method on that interface is used.</p>
<p>You need to get the <code>IStorage</code> interface from the <code>TOutlookDataFormat</code> object. Check the OutlookDemo source again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Drag and Drop Component Suite for Delphi by JohnD</title>
		<link>http://melander.dk/delphi/dragdrop/#comment-613</link>
		<dc:creator>JohnD</dc:creator>
		<pubDate>Wed, 10 Mar 2010 22:12:28 +0000</pubDate>
		<guid>http://melander.dk/delphi/dragdrop/#comment-613</guid>
		<description>Thank you for your Reply,  I was trying to incorporate this into my Code, but am stumbling on the Tmessage vs Amessage vs Imessage.  

in Simple terms I have modified your code as below:
&lt;pre lang="delphi"&gt;procedure TfrmUploadmgr.DropEmptyTarget1Drop(Sender: TObject;
  ShiftState: TShiftState; APoint: TPoint; var Effect: Integer);
var
  OutlookDataFormat: TOutlookDataFormat;
  i: integer;
  Item: TListItem;
  AMessage: IMessage;
  BMessage: TMessage;
begin
  // Check if we have a data format and if so...
  if (DataFormatAdapterOutlook.DataFormat &lt;&gt; nil) then
  begin
    // ...Extract the dropped data from it.
    OutlookDataFormat := DataFormatAdapterOutlook.DataFormat as TOutlookDataFormat;
    CleanUp;
    
    OutlookDataFormat.Messages.LockSession;
    FHasMessageSession := True;
    
    // Get all the dropped messages
    for i := 0 to OutlookDataFormat.Messages.Count-1 do
    begin
      // Get an IMessage interface
      if (Supports(OutlookDataFormat.Messages[i], IMessage, AMessage)) then
      begin
        try
          FCurrentMessage := TMessage.Create(AMessage, nil);
          ActionMessageSaveExecute(Sender);
        finally
          AMessage := nil;
        end;
      end;
    end;
    FHasMessageSession := False;
  end;
end;&lt;/pre&gt;

When I call &lt;code&gt;ActionMessageSaveExecute(Sender);&lt;/code&gt; I get an Exception violation in the following line of code

&lt;pre lang="delphi"&gt;FStorage.CopyTo(0, nil, nil, Storage);&lt;/pre&gt;

I am guessing it has to do with how I am assigning &lt;code&gt;FCurrentMessage&lt;/code&gt;.  Any documentation or just help you could offer would be awesome

John,</description>
		<content:encoded><![CDATA[<p>Thank you for your Reply,  I was trying to incorporate this into my Code, but am stumbling on the Tmessage vs Amessage vs Imessage.  </p>
<p>in Simple terms I have modified your code as below:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi"><span style="color: #000000; font-weight: bold;">procedure</span> TfrmUploadmgr.<span style="color: #006600;">DropEmptyTarget1Drop</span><span style="color: #66cc66;">&#40;</span>Sender: <span style="color: #993333;">TObject</span>;
  ShiftState: TShiftState; APoint: TPoint; <span style="color: #000000; font-weight: bold;">var</span> Effect: <span style="color: #993333;">Integer</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span>
  OutlookDataFormat: TOutlookDataFormat;
  i: <span style="color: #993333;">integer</span>;
  Item: TListItem;
  AMessage: IMessage;
  BMessage: TMessage;
<span style="color: #000000; font-weight: bold;">begin</span>
  <span style="color: #808080; font-style: italic;">// Check if we have a data format and if so...</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>DataFormatAdapterOutlook.<span style="color: #006600;">DataFormat</span> &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #000000; font-weight: bold;">begin</span>
    <span style="color: #808080; font-style: italic;">// ...Extract the dropped data from it.</span>
    OutlookDataFormat := DataFormatAdapterOutlook.<span style="color: #006600;">DataFormat</span> <span style="color: #000000; font-weight: bold;">as</span> TOutlookDataFormat;
    CleanUp;
    
    OutlookDataFormat.<span style="color: #006600;">Messages</span>.<span style="color: #006600;">LockSession</span>;
    FHasMessageSession := <span style="color: #000000; font-weight: bold;">True</span>;
    
    <span style="color: #808080; font-style: italic;">// Get all the dropped messages</span>
    <span style="color: #000000; font-weight: bold;">for</span> i := <span style="color: #cc66cc;">0</span> <span style="color: #000000; font-weight: bold;">to</span> OutlookDataFormat.<span style="color: #006600;">Messages</span>.<span style="color: #006600;">Count</span><span style="color: #cc66cc;">-1</span> <span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #000000; font-weight: bold;">begin</span>
      <span style="color: #808080; font-style: italic;">// Get an IMessage interface</span>
      <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000066;">Supports</span><span style="color: #66cc66;">&#40;</span>OutlookDataFormat.<span style="color: #006600;">Messages</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>, IMessage, AMessage<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">then</span>
      <span style="color: #000000; font-weight: bold;">begin</span>
        <span style="color: #000000; font-weight: bold;">try</span>
          FCurrentMessage := TMessage.<span style="color: #006600;">Create</span><span style="color: #66cc66;">&#40;</span>AMessage, <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #66cc66;">&#41;</span>;
          ActionMessageSaveExecute<span style="color: #66cc66;">&#40;</span>Sender<span style="color: #66cc66;">&#41;</span>;
        <span style="color: #000000; font-weight: bold;">finally</span>
          AMessage := <span style="color: #000000; font-weight: bold;">nil</span>;
        <span style="color: #000000; font-weight: bold;">end</span>;
      <span style="color: #000000; font-weight: bold;">end</span>;
    <span style="color: #000000; font-weight: bold;">end</span>;
    FHasMessageSession := <span style="color: #000000; font-weight: bold;">False</span>;
  <span style="color: #000000; font-weight: bold;">end</span>;
<span style="color: #000000; font-weight: bold;">end</span>;</pre></div></div>

<p>When I call <code>ActionMessageSaveExecute(Sender);</code> I get an Exception violation in the following line of code</p>

<div class="wp_syntax"><div class="code"><pre class="delphi">FStorage.<span style="color: #006600;">CopyTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">nil</span>, <span style="color: #000000; font-weight: bold;">nil</span>, Storage<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>I am guessing it has to do with how I am assigning <code>FCurrentMessage</code>.  Any documentation or just help you could offer would be awesome</p>
<p>John,</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Drag and Drop Component Suite for Delphi by Anders Melander</title>
		<link>http://melander.dk/delphi/dragdrop/#comment-612</link>
		<dc:creator>Anders Melander</dc:creator>
		<pubDate>Wed, 10 Mar 2010 21:11:55 +0000</pubDate>
		<guid>http://melander.dk/delphi/dragdrop/#comment-612</guid>
		<description>This is the &lt;strong&gt;Drag and Drop&lt;/strong&gt; Component Suite. There are &lt;a href="http://www.dimastr.com/outspy/resources.htm" rel="nofollow"&gt;much better places&lt;/a&gt; for &lt;a href="http://tech.groups.yahoo.com/group/outlook-dev/" title="outlook-dev · Outlook Development " rel="nofollow"&gt;Outlook&lt;/a&gt; and &lt;a href="http://peach.ease.lsoft.com/Archives/mapi-l.html" title="MAPI Developers Forum" rel="nofollow"&gt;MAPI&lt;/a&gt; questions. That said...

The &lt;code&gt;PR_MESSAGE_DELIVERY_TIME&lt;/code&gt; property works for me:

&lt;pre lang="delphi"&gt;var
  SystemTime: TSystemTime;
...
if (Succeeded(HrGetOneProp(AMessage.Msg, PR_MESSAGE_DELIVERY_TIME, Prop))) then
  try
    // Convert from file time to system time
    if FileTimeToSystemTime(Windows.TFileTime(Prop.Value.ft), SystemTime) then
      // Convert from system time to TDateTime
      Value := DateTimeToStr(SystemTimeToDateTime(SystemTime))
    else
      Value := '';
  finally
    MAPIFreeBuffer(Prop);
  end
else
  Value := '';&lt;/pre&gt;

Both the &lt;code&gt;PR_ENTRYID&lt;/code&gt; and &lt;code&gt;PR_LONGTERM_ENTRYID_FROM_TABLE&lt;/code&gt; properties fails with the error &lt;code&gt;MAPI_E_NOT_FOUND&lt;/code&gt;. I have no explanation for this and I have not been able to &lt;a href="http://www.google.com/search?q=PR_ENTRYID MAPI_E_NOT_FOUND" rel="nofollow"&gt;Google&lt;/a&gt; any clues. I suggest you ask for help in one of the places I linked to above. Let me know what you find out.</description>
		<content:encoded><![CDATA[<p>This is the <strong>Drag and Drop</strong> Component Suite. There are <a href="http://www.dimastr.com/outspy/resources.htm" rel="nofollow" class="liexternal">much better places</a> for <a href="http://tech.groups.yahoo.com/group/outlook-dev/" title="outlook-dev · Outlook Development " rel="nofollow" class="liexternal">Outlook</a> and <a href="http://peach.ease.lsoft.com/Archives/mapi-l.html" title="MAPI Developers Forum" rel="nofollow" class="liexternal">MAPI</a> questions. That said&#8230;</p>
<p>The <code>PR_MESSAGE_DELIVERY_TIME</code> property works for me:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi"><span style="color: #000000; font-weight: bold;">var</span>
  SystemTime: TSystemTime;
...
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>Succeeded<span style="color: #66cc66;">&#40;</span>HrGetOneProp<span style="color: #66cc66;">&#40;</span>AMessage.<span style="color: #006600;">Msg</span>, PR_MESSAGE_DELIVERY_TIME, Prop<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #000000; font-weight: bold;">try</span>
    <span style="color: #808080; font-style: italic;">// Convert from file time to system time</span>
    <span style="color: #000000; font-weight: bold;">if</span> FileTimeToSystemTime<span style="color: #66cc66;">&#40;</span>Windows.<span style="color: #006600;">TFileTime</span><span style="color: #66cc66;">&#40;</span>Prop.<span style="color: #006600;">Value</span>.<span style="color: #006600;">ft</span><span style="color: #66cc66;">&#41;</span>, SystemTime<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">then</span>
      <span style="color: #808080; font-style: italic;">// Convert from system time to TDateTime</span>
      Value := <span style="color: #000066;">DateTimeToStr</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066;">SystemTimeToDateTime</span><span style="color: #66cc66;">&#40;</span>SystemTime<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">else</span>
      Value := <span style="color: #ff0000;">''</span>;
  <span style="color: #000000; font-weight: bold;">finally</span>
    MAPIFreeBuffer<span style="color: #66cc66;">&#40;</span>Prop<span style="color: #66cc66;">&#41;</span>;
  <span style="color: #000000; font-weight: bold;">end</span>
<span style="color: #000000; font-weight: bold;">else</span>
  Value := <span style="color: #ff0000;">''</span>;</pre></div></div>

<p>Both the <code>PR_ENTRYID</code> and <code>PR_LONGTERM_ENTRYID_FROM_TABLE</code> properties fails with the error <code>MAPI_E_NOT_FOUND</code>. I have no explanation for this and I have not been able to <a href="http://www.google.com/search?q=PR_ENTRYID MAPI_E_NOT_FOUND" rel="nofollow" class="liexternal">Google</a> any clues. I suggest you ask for help in one of the places I linked to above. Let me know what you find out.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
