<?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 on: Alpha Blended Splash Screen in Delphi - Part 2</title>
	<link>https://melander.dk/articles/alphasplash2/</link>
	<description>Note: I no longer maintain or monitor this site</description>
	<pubDate>Tue, 09 Jun 2026 08:37:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: Moritz Both</title>
		<link>https://melander.dk/articles/alphasplash2/#comment-906</link>
		<dc:creator>Moritz Both</dc:creator>
		<pubDate>Mon, 17 Jan 2011 13:05:47 +0000</pubDate>
		<guid>https://melander.dk/articles/alphasplash2/#comment-906</guid>
		<description>For me, this solution worked - without GDI+:

I copy the ARGB image to a temporary bitmap and draw text on this bitmap using normal Canvas methods. These methods, however, always draw transparent objects, so I set the alpha channel for all areas where I drew on the image to 255 afterwards. This works for me because the areas of the image where I put my text on are not transparent (it is a splash screen with transparent borders):


&lt;pre lang="cpp"&gt;void TfrmSplash::updateWindow()
{

    Graphics::TBitmap *image = new Graphics::TBitmap();
    image-&gt;Assign(splashImage);

    image-&gt;Canvas-&gt;Font-&gt;Color = 0×666666;
    image-&gt;Canvas-&gt;Font-&gt;Size = 9;
    image-&gt;Canvas-&gt;Font-&gt;Name = "Tahoma";
    image-&gt;Canvas-&gt;Pen-&gt;Style = psSolid;
    image-&gt;Canvas-&gt;Brush-&gt;Style = bsClear;
    TSize txs = image-&gt;Canvas-&gt;TextExtent(line1);
    image-&gt;Canvas-&gt;TextOut((image-&gt;Width - txs.cx) / 2, 314, line1);
    setAlphaTo255(image, TRect(20, 314, image-&gt;Width-21, 332+txs.cy));
    PremultiplyBitmap(image);
    // … and action!
    UpdateLayeredWindow(Handle, 0, NULL, &#038;BitmapSize, image-&gt;Canvas-&gt;Handle,
        &#038;BitmapPos, 0, &#038;BlendFunction, ULW_ALPHA);
    delete image;
}

void TfrmSplash::setAlphaTo255(Graphics::TBitmap *image, TRect &#038;rect)
{
    for (int row = rect.Top; row &lt; rect.Bottom; row++)
    {
        TRGBQuad *p = (TRGBQuad *)image-&gt;ScanLine[row];
        p += rect.Left;
        for (int col = rect.Left; col &lt;= rect.Right; col++, p++)
            p-&gt;rgbReserved = 255;
    }
}&lt;/pre&gt;

... thans for the great article, anyway.
</description>
		<content:encoded><![CDATA[<p>For me, this solution worked - without GDI+:</p>
<p>I copy the ARGB image to a temporary bitmap and draw text on this bitmap using normal Canvas methods. These methods, however, always draw transparent objects, so I set the alpha channel for all areas where I drew on the image to 255 afterwards. This works for me because the areas of the image where I put my text on are not transparent (it is a splash screen with transparent borders):</p>

<div class="wp_syntax"><div class="code"><pre class="cpp"><span style="color: #0000ff;">void</span> TfrmSplash::<span style="color: #00eeff;">updateWindow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
&nbsp;
    Graphics::<span style="color: #00eeff;">TBitmap</span> *image = <span style="color: #0000dd;">new</span> Graphics::<span style="color: #00eeff;">TBitmap</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    image-&gt;Assign<span style="color: #000000;">&#40;</span>splashImage<span style="color: #000000;">&#41;</span>;
&nbsp;
    image-&gt;Canvas-&gt;Font-&gt;Color = <span style="color: #0000dd;">0</span>×<span style="color: #0000dd;">666666</span>;
    image-&gt;Canvas-&gt;Font-&gt;Size = <span style="color: #0000dd;">9</span>;
    image-&gt;Canvas-&gt;Font-&gt;Name = <span style="color: #666666;">&quot;Tahoma&quot;</span>;
    image-&gt;Canvas-&gt;Pen-&gt;Style = psSolid;
    image-&gt;Canvas-&gt;Brush-&gt;Style = bsClear;
    TSize txs = image-&gt;Canvas-&gt;TextExtent<span style="color: #000000;">&#40;</span>line1<span style="color: #000000;">&#41;</span>;
    image-&gt;Canvas-&gt;TextOut<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>image-&gt;Width - txs.<span style="color: #00eeff;">cx</span><span style="color: #000000;">&#41;</span> / <span style="color: #0000dd;">2</span>, <span style="color: #0000dd;">314</span>, line1<span style="color: #000000;">&#41;</span>;
    setAlphaTo255<span style="color: #000000;">&#40;</span>image, TRect<span style="color: #000000;">&#40;</span><span style="color: #0000dd;">20</span>, <span style="color: #0000dd;">314</span>, image-&gt;Width<span style="color: #0000dd;">-21</span>, <span style="color: #0000dd;">332</span>+txs.<span style="color: #00eeff;">cy</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
    PremultiplyBitmap<span style="color: #000000;">&#40;</span>image<span style="color: #000000;">&#41;</span>;
    <span style="color: #ff0000;">// … and action!</span>
    UpdateLayeredWindow<span style="color: #000000;">&#40;</span>Handle, <span style="color: #0000dd;">0</span>, <span style="color: #0000ff;">NULL</span>, &amp;BitmapSize, image-&gt;Canvas-&gt;Handle,
        &amp;BitmapPos, <span style="color: #0000dd;">0</span>, &amp;BlendFunction, ULW_ALPHA<span style="color: #000000;">&#41;</span>;
    <span style="color: #0000dd;">delete</span> image;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">void</span> TfrmSplash::<span style="color: #00eeff;">setAlphaTo255</span><span style="color: #000000;">&#40;</span>Graphics::<span style="color: #00eeff;">TBitmap</span> *image, TRect &amp;rect<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0000ff;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #0000ff;">int</span> row = rect.<span style="color: #00eeff;">Top</span>; row &lt; rect.<span style="color: #00eeff;">Bottom</span>; row++<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        TRGBQuad *p = <span style="color: #000000;">&#40;</span>TRGBQuad *<span style="color: #000000;">&#41;</span>image-&gt;ScanLine<span style="color: #000000;">&#91;</span>row<span style="color: #000000;">&#93;</span>;
        p += rect.<span style="color: #00eeff;">Left</span>;
        <span style="color: #0000ff;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #0000ff;">int</span> col = rect.<span style="color: #00eeff;">Left</span>; col &lt;= rect.<span style="color: #00eeff;">Right</span>; col++, p++<span style="color: #000000;">&#41;</span>
            p-&gt;rgbReserved = <span style="color: #0000dd;">255</span>;
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>&#8230; thans for the great article, anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fredrik Vestin</title>
		<link>https://melander.dk/articles/alphasplash2/#comment-839</link>
		<dc:creator>Fredrik Vestin</dc:creator>
		<pubDate>Thu, 21 Oct 2010 08:38:29 +0000</pubDate>
		<guid>https://melander.dk/articles/alphasplash2/#comment-839</guid>
		<description>Excellent article! Well written and to the point. It is a bit outdated though and I think more people could benefit if it was updated for Delphi 2010 etc. I Googled for quite some time before I found this article.
For example Embarcadero has now purchased to PNGImage source code and it is now included in the VCL from Delphi 2009 so there&#39;s no need for 3rd party libraries.
http://blogs.embarcadero.com/nickhodges/2008/08/13/39100/</description>
		<content:encoded><![CDATA[<p>Excellent article! Well written and to the point. It is a bit outdated though and I think more people could benefit if it was updated for Delphi 2010 etc. I Googled for quite some time before I found this article.<br />
For example Embarcadero has now purchased to PNGImage source code and it is now included in the VCL from Delphi 2009 so there&#39;s no need for 3rd party libraries.<br />
<a href="http://blogs.embarcadero.com/nickhodges/2008/08/13/39100/" rel="nofollow" class="liexternal">http://blogs.embarcadero.com/n...../13/39100/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gintas</title>
		<link>https://melander.dk/articles/alphasplash2/#comment-799</link>
		<dc:creator>Gintas</dc:creator>
		<pubDate>Tue, 28 Sep 2010 18:12:18 +0000</pubDate>
		<guid>https://melander.dk/articles/alphasplash2/#comment-799</guid>
		<description>Thanks for professional tutorial. It was really what I needed for my free desktop widgets engine.
You can download the Delphi TPNGImage from various sources. Like http://code.google.com/p/livreerp/downloads/list :)</description>
		<content:encoded><![CDATA[<p>Thanks for professional tutorial. It was really what I needed for my free desktop widgets engine.<br />
You can download the Delphi TPNGImage from various sources. Like http://code.google.com/p/livreerp/downloads/list <img src='https://melander.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>https://melander.dk/articles/alphasplash2/#comment-774</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 29 Aug 2010 14:34:41 +0000</pubDate>
		<guid>https://melander.dk/articles/alphasplash2/#comment-774</guid>
		<description>Hi! I wonder if it is possible to use into a form with buttons? Thanks</description>
		<content:encoded><![CDATA[<p>Hi! I wonder if it is possible to use into a form with buttons? Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: r1weedee</title>
		<link>https://melander.dk/articles/alphasplash2/#comment-649</link>
		<dc:creator>r1weedee</dc:creator>
		<pubDate>Fri, 19 Mar 2010 17:58:03 +0000</pubDate>
		<guid>https://melander.dk/articles/alphasplash2/#comment-649</guid>
		<description>Thanks, i really appreciate this tutorial.</description>
		<content:encoded><![CDATA[<p>Thanks, i really appreciate this tutorial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anders Melander</title>
		<link>https://melander.dk/articles/alphasplash2/#comment-620</link>
		<dc:creator>Anders Melander</dc:creator>
		<pubDate>Thu, 11 Mar 2010 14:11:22 +0000</pubDate>
		<guid>https://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>By: MJ</title>
		<link>https://melander.dk/articles/alphasplash2/#comment-619</link>
		<dc:creator>MJ</dc:creator>
		<pubDate>Thu, 11 Mar 2010 13:05:48 +0000</pubDate>
		<guid>https://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>By: Michael Rockett</title>
		<link>https://melander.dk/articles/alphasplash2/#comment-550</link>
		<dc:creator>Michael Rockett</dc:creator>
		<pubDate>Fri, 15 Jan 2010 06:55:49 +0000</pubDate>
		<guid>https://melander.dk/articles/alphasplash2/#comment-550</guid>
		<description>This looks very helpful - thanks for the post. I will try it as soon as I have my new computer.

Been looking for this for ages. :) Now I&#39;m assuming any image will do the trick? Another semi-transparent image over the alpha layer?</description>
		<content:encoded><![CDATA[<p>This looks very helpful - thanks for the post. I will try it as soon as I have my new computer.</p>
<p>Been looking for this for ages. <img src='https://melander.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Now I&#39;m assuming any image will do the trick? Another semi-transparent image over the alpha layer?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Knowles</title>
		<link>https://melander.dk/articles/alphasplash2/#comment-549</link>
		<dc:creator>Erik Knowles</dc:creator>
		<pubDate>Wed, 13 Jan 2010 17:45:34 +0000</pubDate>
		<guid>https://melander.dk/articles/alphasplash2/#comment-549</guid>
		<description>Haven&#39;t found a way to do that. We use the following code to draw licensing information on top of the form (you can&#39;t directly use &lt;code&gt;canvas.TextOut()&lt;/code&gt; because it draws with the alpha channel set to 0, so you need to use GDI+ functions with the &lt;code&gt;{$define PNG_GDIPLUS}&lt;/code&gt; definition enabled). It&#39;s not completely self-explanatory, but hope it helps:

&lt;pre lang="delphi"&gt;procedure TFormSplash.display_license_info(splashbmp : TGPImage) ;
var org, site : string ;
    left,top,height,width : integer ;
    fontsize : integer ;
    color : TColor ;
    x, y: integer ;
    word : string ;
    spacewidth : integer ;
    lineheight : integer ;
    outtext : string ;
    curpos : integer ;
    outtextlen : integer ;
    wordwidth : integer ;

    gp : TGPGraphics ;
    gpfont : TGPFont ;
    gpbrush : TGPBrush ;
    origin : TGPPointF ;
begin
    get_license_info(org, site) ;
    get_license_coords(left,top,width,height,fontsize,color) ;

    gp := TGPGraphics.Create(splashbmp) ;

    with self.canvas do begin
        font.Assign(self.font);
        font.color := color ;
        font.size := fontsize ;

        gpfont := TGPFont.Create(canvas.Handle) ;
        // V The addition is the Alpha channel. We want the text to be completely opaque
        gpbrush := TGPSolidBrush.Create($FF000000+DWord(color)) ;

        spacewidth := TextWidth(' ') ;
        lineheight := TextHeight(' ') ;
        x := left ; y := top ;

        outtext := org+#$0d+#$0a+site ;
        outtextlen := length(outtext) ;
        curpos := 1 ;
        while curpos&lt;=outtextlen do begin
            word := '' ;
            while (curpos&lt;=outtextlen) and not (outtext[curpos] in [' ',#$0a]) do begin
                if outtext[curpos]&lt;&gt;#$0d then
                        word := word+outtext[curpos] ;
                Inc(curpos)
            end ;
            wordwidth := TextWidth(word) ;
            if (x&lt;&gt;left) and (x+wordwidth-left&gt;width) then begin
                x := left ;
                y := y+lineheight ;
            end ;

            origin.X := x ; origin.Y := y ;
            gp.DrawString(word, -1, gpfont, origin, gpbrush) ;

            if curpos&lt;=outtextlen then
                if outtext[curpos]=' ' then
                        x := x+wordwidth+spacewidth
                else if outtext[curpos]=#$0a then begin
                        x := left ;
                        y := y+lineheight
                end ;
            Inc(curpos) ;

            if y+lineheight-top&gt;height then break ;
        end ; // while curpos&lt;=outtextlen
    end ; // with self.canvas

    gpbrush.Free ;
    gpfont.Free ;
    gp.Free ;
end ;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Haven&#39;t found a way to do that. We use the following code to draw licensing information on top of the form (you can&#39;t directly use <code>canvas.TextOut()</code> because it draws with the alpha channel set to 0, so you need to use GDI+ functions with the <code>{$define PNG_GDIPLUS}</code> definition enabled). It&#39;s not completely self-explanatory, but hope it helps:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi"><span style="color: #000000; font-weight: bold;">procedure</span> TFormSplash.<span style="color: #006600;">display_license_info</span><span style="color: #66cc66;">&#40;</span>splashbmp : TGPImage<span style="color: #66cc66;">&#41;</span> ;
<span style="color: #000000; font-weight: bold;">var</span> org, site : <span style="color: #993333;">string</span> ;
    left,top,height,width : <span style="color: #993333;">integer</span> ;
    fontsize : <span style="color: #993333;">integer</span> ;
    color : TColor ;
    x, y: <span style="color: #993333;">integer</span> ;
    <span style="color: #993333;">word</span> : <span style="color: #993333;">string</span> ;
    spacewidth : <span style="color: #993333;">integer</span> ;
    lineheight : <span style="color: #993333;">integer</span> ;
    outtext : <span style="color: #993333;">string</span> ;
    curpos : <span style="color: #993333;">integer</span> ;
    outtextlen : <span style="color: #993333;">integer</span> ;
    wordwidth : <span style="color: #993333;">integer</span> ;
&nbsp;
    gp : TGPGraphics ;
    gpfont : TGPFont ;
    gpbrush : TGPBrush ;
    origin : TGPPointF ;
<span style="color: #000000; font-weight: bold;">begin</span>
    get_license_info<span style="color: #66cc66;">&#40;</span>org, site<span style="color: #66cc66;">&#41;</span> ;
    get_license_coords<span style="color: #66cc66;">&#40;</span>left,top,width,height,fontsize,color<span style="color: #66cc66;">&#41;</span> ;
&nbsp;
    gp := TGPGraphics.<span style="color: #006600;">Create</span><span style="color: #66cc66;">&#40;</span>splashbmp<span style="color: #66cc66;">&#41;</span> ;
&nbsp;
    <span style="color: #000000; font-weight: bold;">with</span> <span style="color: #000000; font-weight: bold;">self</span>.<span style="color: #006600;">canvas</span> <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #000000; font-weight: bold;">begin</span>
        font.<span style="color: #006600;">Assign</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">self</span>.<span style="color: #006600;">font</span><span style="color: #66cc66;">&#41;</span>;
        font.<span style="color: #006600;">color</span> := color ;
        font.<span style="color: #006600;">size</span> := fontsize ;
&nbsp;
        gpfont := TGPFont.<span style="color: #006600;">Create</span><span style="color: #66cc66;">&#40;</span>canvas.<span style="color: #006600;">Handle</span><span style="color: #66cc66;">&#41;</span> ;
        <span style="color: #808080; font-style: italic;">// V The addition is the Alpha channel. We want the text to be completely opaque</span>
        gpbrush := TGPSolidBrush.<span style="color: #006600;">Create</span><span style="color: #66cc66;">&#40;</span><span style="color: #9ac;">$FF000000</span>+<span style="color: #993333;">DWord</span><span style="color: #66cc66;">&#40;</span>color<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> ;
&nbsp;
        spacewidth := TextWidth<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">' '</span><span style="color: #66cc66;">&#41;</span> ;
        lineheight := TextHeight<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">' '</span><span style="color: #66cc66;">&#41;</span> ;
        x := left ; y := top ;
&nbsp;
        outtext := org+#<span style="color: #9ac;">$0d</span>+#<span style="color: #9ac;">$0a</span>+site ;
        outtextlen := <span style="color: #000066;">length</span><span style="color: #66cc66;">&#40;</span>outtext<span style="color: #66cc66;">&#41;</span> ;
        curpos := <span style="color: #cc66cc;">1</span> ;
        <span style="color: #000000; font-weight: bold;">while</span> curpos&lt;=outtextlen <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #000000; font-weight: bold;">begin</span>
            <span style="color: #993333;">word</span> := <span style="color: #ff0000;">''</span> ;
            <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #66cc66;">&#40;</span>curpos&lt;=outtextlen<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">and</span> <span style="color: #000000; font-weight: bold;">not</span> <span style="color: #66cc66;">&#40;</span>outtext<span style="color: #66cc66;">&#91;</span>curpos<span style="color: #66cc66;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">' '</span>,#<span style="color: #9ac;">$0a</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #000000; font-weight: bold;">begin</span>
                <span style="color: #000000; font-weight: bold;">if</span> outtext<span style="color: #66cc66;">&#91;</span>curpos<span style="color: #66cc66;">&#93;</span>&lt;&gt;#<span style="color: #9ac;">$0d</span> <span style="color: #000000; font-weight: bold;">then</span>
                        <span style="color: #993333;">word</span> := <span style="color: #993333;">word</span>+outtext<span style="color: #66cc66;">&#91;</span>curpos<span style="color: #66cc66;">&#93;</span> ;
                <span style="color: #000066;">Inc</span><span style="color: #66cc66;">&#40;</span>curpos<span style="color: #66cc66;">&#41;</span>
            <span style="color: #000000; font-weight: bold;">end</span> ;
            wordwidth := TextWidth<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">word</span><span style="color: #66cc66;">&#41;</span> ;
            <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>x&lt;&gt;left<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">and</span> <span style="color: #66cc66;">&#40;</span>x+wordwidth-left&gt;width<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #000000; font-weight: bold;">begin</span>
                x := left ;
                y := y+lineheight ;
            <span style="color: #000000; font-weight: bold;">end</span> ;
&nbsp;
            origin.<span style="color: #006600;">X</span> := x ; origin.<span style="color: #006600;">Y</span> := y ;
            gp.<span style="color: #006600;">DrawString</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333;">word</span>, <span style="color: #cc66cc;">-1</span>, gpfont, origin, gpbrush<span style="color: #66cc66;">&#41;</span> ;
&nbsp;
            <span style="color: #000000; font-weight: bold;">if</span> curpos&lt;=outtextlen <span style="color: #000000; font-weight: bold;">then</span>
                <span style="color: #000000; font-weight: bold;">if</span> outtext<span style="color: #66cc66;">&#91;</span>curpos<span style="color: #66cc66;">&#93;</span>=<span style="color: #ff0000;">' '</span> <span style="color: #000000; font-weight: bold;">then</span>
                        x := x+wordwidth+spacewidth
                <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> outtext<span style="color: #66cc66;">&#91;</span>curpos<span style="color: #66cc66;">&#93;</span>=#<span style="color: #9ac;">$0a</span> <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #000000; font-weight: bold;">begin</span>
                        x := left ;
                        y := y+lineheight
                <span style="color: #000000; font-weight: bold;">end</span> ;
            <span style="color: #000066;">Inc</span><span style="color: #66cc66;">&#40;</span>curpos<span style="color: #66cc66;">&#41;</span> ;
&nbsp;
            <span style="color: #000000; font-weight: bold;">if</span> y+lineheight-top&gt;height <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #000066;">break</span> ;
        <span style="color: #000000; font-weight: bold;">end</span> ; <span style="color: #808080; font-style: italic;">// while curpos&lt;=outtextlen</span>
    <span style="color: #000000; font-weight: bold;">end</span> ; <span style="color: #808080; font-style: italic;">// with self.canvas</span>
&nbsp;
    gpbrush.<span style="color: #006600;">Free</span> ;
    gpfont.<span style="color: #006600;">Free</span> ;
    gp.<span style="color: #006600;">Free</span> ;
<span style="color: #000000; font-weight: bold;">end</span> ;</pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Knowles</title>
		<link>https://melander.dk/articles/alphasplash2/#comment-548</link>
		<dc:creator>Erik Knowles</dc:creator>
		<pubDate>Wed, 13 Jan 2010 17:41:57 +0000</pubDate>
		<guid>https://melander.dk/articles/alphasplash2/#comment-548</guid>
		<description>Thanks Tim, I found the same problem (only shows up when Aero is enabled, which unfortunately it wasn&#39;t when testing under VMWare).</description>
		<content:encoded><![CDATA[<p>Thanks Tim, I found the same problem (only shows up when Aero is enabled, which unfortunately it wasn&#39;t when testing under VMWare).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
