<?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>GSaraiva&#039;s Projects</title>
	<atom:link href="http://projects.pro.br/gsaraiva/feed/" rel="self" type="application/rss+xml" />
	<link>http://projects.pro.br/gsaraiva</link>
	<description>Step by step</description>
	<lastBuildDate>Tue, 01 Sep 2009 13:14:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Long time without Delphi and the effect is.</title>
		<link>http://projects.pro.br/gsaraiva/2009/08/long-time-without-delphi-and-the-effect/</link>
		<comments>http://projects.pro.br/gsaraiva/2009/08/long-time-without-delphi-and-the-effect/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 20:58:25 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Freaking]]></category>
		<category><![CDATA[nosense code]]></category>

		<guid isPermaLink="false">http://projects.pro.br/gsaraiva/?p=489</guid>
		<description><![CDATA[Nothing to say, only to code!
program&#160;&#160;out;uses&#160;&#160;dialogs;type&#160;&#160;virtual = int64;const&#160;&#160;cdecl = integer&#40;varempty&#41;;&#160;&#160;register = succ&#40;cdecl&#41;;&#160;&#160;r : array &#40;.cdecl..register.&#41; of virtual = &#40;$6F57206F6C6C6548, $45660800646C72&#41;;type&#160;&#160;abstract = pchar;&#160;&#160;overload = procedure&#40;const message: string&#41;;&#160;&#160;message = array &#40;.cdecl..cdecl.&#41; of string;var&#160;&#160;dispid: ^overload = @showmessage;&#160;&#160;stdcall: message;&#160;&#160;platform: overload;begin&#160;&#160;@platform := dispid;&#160;&#160;stdcall&#40;.cdecl.&#41; := abstract&#40;@r&#41;;&#160;&#160;platform&#40;stdcall&#40;.cdecl.&#41;&#41;;end.
damn, I&#8217;m good  
]]></description>
			<content:encoded><![CDATA[<p>Nothing to say, only to code!</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">program</span></li><li>&nbsp;&nbsp;out<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">uses</span></li><li>&nbsp;&nbsp;dialogs<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">virtual</span> <span style="color: #000066;">=</span> <span style="color: #000066; font-weight: bold;">int64</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">const</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">cdecl</span> <span style="color: #000066;">=</span> <span style="color: #000066; font-weight: bold;">integer</span><span style="color: #000066;">&#40;</span>varempty<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">register</span> <span style="color: #000066;">=</span> <span style="color: #000066;">succ</span><span style="color: #000066;">&#40;</span><span style="color: #000000; font-weight: bold;">cdecl</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;r <span style="color: #000066;">:</span> <span style="color: #000000; font-weight: bold;">array</span> <span style="color: #000066;">&#40;</span><span style="color: #000066;">.</span><span style="color: #000000; font-weight: bold;">cdecl</span><span style="color: #000066;">..</span><span style="color: #000000; font-weight: bold;">register</span><span style="color: #000066;">.</span><span style="color: #000066;">&#41;</span> <span style="color: #000000; font-weight: bold;">of</span> <span style="color: #000000; font-weight: bold;">virtual</span> <span style="color: #000066;">=</span> <span style="color: #000066;">&#40;</span><span style="color: #9ac;">$6F57206F6C6C6548</span><span style="color: #000066;">,</span> <span style="color: #9ac;">$45660800646C72</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">abstract</span> <span style="color: #000066;">=</span> <span style="color: #000066; font-weight: bold;">pchar</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">overload</span> <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">procedure</span><span style="color: #000066;">&#40;</span><span style="color: #000000; font-weight: bold;">const</span> message<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">string</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;message <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">array</span> <span style="color: #000066;">&#40;</span><span style="color: #000066;">.</span><span style="color: #000000; font-weight: bold;">cdecl</span><span style="color: #000066;">..</span><span style="color: #000000; font-weight: bold;">cdecl</span><span style="color: #000066;">.</span><span style="color: #000066;">&#41;</span> <span style="color: #000000; font-weight: bold;">of</span> <span style="color: #000066; font-weight: bold;">string</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;dispid<span style="color: #000066;">:</span> <span style="color: #000066;">^</span>overload <span style="color: #000066;">=</span> <span style="color: #000066;">@</span>showmessage<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">stdcall</span><span style="color: #000066;">:</span> message<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;platform<span style="color: #000066;">:</span> <span style="color: #000000; font-weight: bold;">overload</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">@</span>platform <span style="color: #000066;">:</span><span style="color: #000066;">=</span> dispid<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">stdcall</span><span style="color: #000066;">&#40;</span><span style="color: #000066;">.</span><span style="color: #000000; font-weight: bold;">cdecl</span><span style="color: #000066;">.</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">abstract</span><span style="color: #000066;">&#40;</span><span style="color: #000066;">@</span>r<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;platform<span style="color: #000066;">&#40;</span><span style="color: #000000; font-weight: bold;">stdcall</span><span style="color: #000066;">&#40;</span><span style="color: #000066;">.</span><span style="color: #000000; font-weight: bold;">cdecl</span><span style="color: #000066;">.</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">.</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>damn, I&#8217;m good <img src='http://projects.pro.br/gsaraiva/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2009/08/long-time-without-delphi-and-the-effect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi: Utils :: AppRunningCount</title>
		<link>http://projects.pro.br/gsaraiva/2009/07/delphi-utils-apprunningcount/</link>
		<comments>http://projects.pro.br/gsaraiva/2009/07/delphi-utils-apprunningcount/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 20:13:38 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[AppRunningCount]]></category>
		<category><![CDATA[CreateToolhelp32Snapshot]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Process32First]]></category>
		<category><![CDATA[Process32Next]]></category>
		<category><![CDATA[TH32CS_SNAPPROCESS]]></category>
		<category><![CDATA[TProcessEntry32]]></category>
		<category><![CDATA[Usefull Function]]></category>

		<guid isPermaLink="false">http://projects.pro.br/gsaraiva/?p=470</guid>
		<description><![CDATA[Folks,
For everybody thats need to limit the instance number of your application:
uses SysUtils, TLHelp32;&#160;function AppRunningCount&#40;const AExeName: string&#41;: integer;var&#160;&#160;hSnap: THandle;&#160;&#160;p32: TProcessEntry32;begin&#160;&#160;Result := 0;&#160;&#160;hSnap := CreateToolHelp32SnapShot&#40;TH32CS_SNAPPROCESS, 0&#41;;&#160;&#160;p32.dwSize := Sizeof&#40;TProcessEntry32&#41;;&#160;&#160;Process32First&#40;hSnap, p32&#41;;&#160;&#160;repeat&#160;&#160;&#160;&#160;if SameText&#40;AExeName, ExtractFileName&#40;p32.szExeFile&#41;&#41; then&#160;&#160;&#160;&#160;&#160;&#160;inc&#40;Result&#41;;&#160;&#160;until not Process32Next&#40;hSnap, p32&#41;;&#160;&#160;CloseHandle&#40;hSnap&#41;;end;
Use:
// On DPR// Limit to 1 instancebegin &#160;&#160;if AppRunningCount&#40;ExtractFileName&#40;ParamStr&#40;0&#41;&#41;&#41; = 1 then&#160;&#160;begin&#160;&#160;// Application codes&#160;&#160;end;end.
Explaining more about this approach:
In a situation of multiples [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>For everybody thats need to limit the instance number of your application:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">uses</span> SysUtils<span style="color: #000066;">,</span> TLHelp32<span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> AppRunningCount<span style="color: #000066;">&#40;</span><span style="color: #000000; font-weight: bold;">const</span> AExeName<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">string</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">integer</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;hSnap<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">THandle</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;p32<span style="color: #000066;">:</span> TProcessEntry32<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;hSnap <span style="color: #000066;">:</span><span style="color: #000066;">=</span> CreateToolHelp32SnapShot<span style="color: #000066;">&#40;</span>TH32CS_SNAPPROCESS<span style="color: #000066;">,</span> 0<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;p32<span style="color: #000066;">.</span><span style="color: #006600;">dwSize</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000066;">Sizeof</span><span style="color: #000066;">&#40;</span>TProcessEntry32<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Process32First<span style="color: #000066;">&#40;</span>hSnap<span style="color: #000066;">,</span> p32<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">repeat</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000066;">SameText</span><span style="color: #000066;">&#40;</span>AExeName<span style="color: #000066;">,</span> <span style="color: #000066;">ExtractFileName</span><span style="color: #000066;">&#40;</span>p32<span style="color: #000066;">.</span><span style="color: #006600;">szExeFile</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">inc</span><span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">until</span> <span style="color: #000000; font-weight: bold;">not</span> Process32Next<span style="color: #000066;">&#40;</span>hSnap<span style="color: #000066;">,</span> p32<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;CloseHandle<span style="color: #000066;">&#40;</span>hSnap<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Use:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #808080; font-style: italic;">// On DPR</span></li><li><span style="color: #808080; font-style: italic;">// Limit to 1 instance</span></li><li><span style="color: #000000; font-weight: bold;">begin</span> </li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> AppRunningCount<span style="color: #000066;">&#40;</span><span style="color: #000066;">ExtractFileName</span><span style="color: #000066;">&#40;</span><span style="color: #000066;">ParamStr</span><span style="color: #000066;">&#40;</span>0<span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">=</span> 1 <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #808080; font-style: italic;">// Application codes</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">.</span></li><li></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Explaining more about this approach:<br />
In a situation of multiples logons at the same machine the Mutex cannot provide a correctly singleton structure because the mutex handle still only under the local scope of the user. So the way to control the instance number is counting the number of times the process appear on the process list of the machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2009/07/delphi-utils-apprunningcount/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi: Chained List</title>
		<link>http://projects.pro.br/gsaraiva/2009/06/delphi-chained-list/</link>
		<comments>http://projects.pro.br/gsaraiva/2009/06/delphi-chained-list/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 13:54:10 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Chain List]]></category>
		<category><![CDATA[Chained list]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[TChainedList]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=418</guid>
		<description><![CDATA[Folks,
Some times when we need to hold stripped informations, like socket or audio buffers, we need to create a chained list that control all the information sequentially and provide a navigation on the holded data only by stepping forward(next) or stepping back(prior).
A structure of a Chained List is divided on 2 main variables: Data and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>Some times when we need to hold stripped informations, like socket or audio buffers, we need to create a chained list that control all the information sequentially and provide a navigation on the holded data only by stepping forward(next) or stepping back(prior).</p>
<p>A structure of a Chained List is divided on 2 main variables: Data and Next(or Prior, as needed), for every Item on the Chain you have the Data(Pointer, value or someting you have to hold) and a reference for the next or prior item on the list. Chained list don&#8217;t provide a direct access for items, so you can&#8217;t access a item without navigate on others. Chained Lists can be improved, but the main goal is provide a near infinite list that have the best performance of all others techniques.</p>
<p>As you know now, Chained lists don&#8217;t hold indexs for items (don&#8217;t have a direct access) and that avoid re-index procedures that consume a big time when you&#8217;ve a large list. When you need to remove a item in a Chained list that have a predecessor and a antecessor, you&#8217;ll have to make the first improvement on the chain structure to hold the Prior and the Next item for each Item you have, and thats provide you a confortable way to manipulate items without writing a lot of code and variables.</p>
<p><a href="http://gsaraiva.projects.pro.br/?p=417">A basic structure of a Chained List on Delphi</a></p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">uses</span> ChainedListCtrl<span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;TfrmMain <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #000066;">&#40;</span>TForm<span style="color: #000066;">&#41;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;edtWord<span style="color: #000066;">:</span> TEdit<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;btnAdd<span style="color: #000066;">:</span> TButton<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;lblPhrase<span style="color: #000066;">:</span> TLabel<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;btnClean<span style="color: #000066;">:</span> TButton<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">procedure</span> FormCreate<span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">procedure</span> FormDestroy<span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">procedure</span> btnAddClick<span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">procedure</span> btnCleanClick<span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">private</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #808080; font-style: italic;">{ Private declarations }</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">public</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Phrase<span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">procedure</span> UpdateList<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;frmMain<span style="color: #000066;">:</span> TfrmMain<span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">implementation</span></li><li>&nbsp;</li><li><span style="color: #008000; font-style: italic;">{$R *.dfm}</span></li><li>&nbsp;</li><li><span style="color: #808080; font-style: italic;">{ Note: Create the Chain List Control Object</span></li><li><span style="color: #808080; font-style: italic;">}</span></li><li><span style="color: #000000; font-weight: bold;">procedure</span> TfrmMain<span style="color: #000066;">.</span><span style="color: #006600;">FormCreate</span><span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;Phrase <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #808080; font-style: italic;">{ Note: Destroy the Chain Object</span></li><li><span style="color: #808080; font-style: italic;">}</span></li><li><span style="color: #000000; font-weight: bold;">procedure</span> TfrmMain<span style="color: #000066;">.</span><span style="color: #006600;">FormDestroy</span><span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;Phrase<span style="color: #000066;">.</span><span style="color: #006600;">Free</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #808080; font-style: italic;">{ Note: Update the Label to hold all the words</span></li><li><span style="color: #808080; font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; included on the Chained list</span></li><li><span style="color: #808080; font-style: italic;">}</span></li><li><span style="color: #000000; font-weight: bold;">procedure</span> TfrmMain<span style="color: #000066;">.</span><span style="color: #006600;">UpdateList</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;sPhrase<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">string</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;sPhrase <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">''</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Phrase<span style="color: #000066;">.</span><span style="color: #006600;">First</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">while</span> Phrase<span style="color: #000066;">.</span><span style="color: #006600;">Current</span> &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">do</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> sPhrase &lt;&gt; <span style="color: #ff0000;">''</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sPhrase <span style="color: #000066;">:</span><span style="color: #000066;">=</span> sPhrase <span style="color: #000066;">+</span> <span style="color: #ff0000;">' '</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;sPhrase <span style="color: #000066;">:</span><span style="color: #000066;">=</span> sPhrase <span style="color: #000066;">+</span> <span style="color: #000066; font-weight: bold;">PChar</span><span style="color: #000066;">&#40;</span>Phrase<span style="color: #000066;">.</span><span style="color: #006600;">Current</span><span style="color: #000066;">^</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Phrase<span style="color: #000066;">.</span><span style="color: #006600;">Next</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;lblPhrase<span style="color: #000066;">.</span><span style="color: #006600;">Caption</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> sPhrase<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #808080; font-style: italic;">{ Note: Add the text on the Chain</span></li><li><span style="color: #808080; font-style: italic;">&nbsp;&nbsp;&nbsp;p.s: StrNew create a copy of the string that will be managed</span></li><li><span style="color: #808080; font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out of the garbage collector(str refcount structure)</span></li><li><span style="color: #808080; font-style: italic;">}</span></li><li><span style="color: #000000; font-weight: bold;">procedure</span> TfrmMain<span style="color: #000066;">.</span><span style="color: #006600;">btnAddClick</span><span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;Phrase<span style="color: #000066;">.</span><span style="color: #006600;">Add</span><span style="color: #000066;">.</span><span style="color: #006600;">Current</span><span style="color: #000066;">^</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000066;">StrNew</span><span style="color: #000066;">&#40;</span><span style="color: #000066; font-weight: bold;">PChar</span><span style="color: #000066;">&#40;</span>edtWord<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;UpdateList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #808080; font-style: italic;">{ Note: Clean the Chain list</span></li><li><span style="color: #808080; font-style: italic;">&nbsp;&nbsp;&nbsp;p.s: StrDispose release the memory of the create string</span></li><li><span style="color: #808080; font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to avoid memory leaks</span></li><li><span style="color: #808080; font-style: italic;">}</span></li><li><span style="color: #000000; font-weight: bold;">procedure</span> TfrmMain<span style="color: #000066;">.</span><span style="color: #006600;">btnCleanClick</span><span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;Phrase<span style="color: #000066;">.</span><span style="color: #006600;">Last</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">while</span> Phrase<span style="color: #000066;">.</span><span style="color: #006600;">Current</span> &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">do</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Phrase<span style="color: #000066;">.</span><span style="color: #006600;">Remove</span><span style="color: #000066;">&#40;</span><span style="color: #000066;">@</span><span style="color: #000066;">StrDispose</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;UpdateList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>I wrote some comments on the code to refers the goals of each method, but some things have to be said:<br />
  <strong>1st.</strong> Many improviments can be done on a Chained List, but some times a improvement can be bad to the performance result so keep it on the mind when you change some thing.<br />
  <strong>2nd.</strong> Chained List as the name says, chained, so don&#8217;t try to put a index control on it because can be a big mistake.<br />
  <strong>3rd.</strong> Use it when you need a great performance, not when you only need to hold some common data. A Indexed List control will be better and easy to manipulate then a Chained List.</p>
<p>Feel free to use and ask some thing.</p>
<p>Hugs for all</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2009/06/delphi-chained-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi: Utils :: TChainedList</title>
		<link>http://projects.pro.br/gsaraiva/2009/06/delphi-utils-tchainedlist/</link>
		<comments>http://projects.pro.br/gsaraiva/2009/06/delphi-utils-tchainedlist/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 13:54:08 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Chain List]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[TChainedList]]></category>
		<category><![CDATA[Usefull functions]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=417</guid>
		<description><![CDATA[Folks,
For everybody thats use a lot Chained lists on your projects:
uses SysUtils;&#160;type&#160;&#160;PPointer = ^Pointer;&#160;&#160;&#160;TChainedList = class&#160;&#160;private&#160;&#160;&#160;&#160;FFirst&#160;&#160; : Pointer;&#160;&#160;&#160;&#160;FLast&#160;&#160;&#160;&#160;: Pointer;&#160;&#160;&#160;&#160;FCurrent : Pointer;&#160;&#160;&#160;&#160;FCount&#160;&#160; : Integer;&#160;&#160;&#160;&#160;function GetCurrent: PPointer;&#160;&#160;public&#160;&#160;&#160;&#160;constructor Create;&#160;&#160;&#160;&#160;destructor Destroy; override;&#160;&#160;&#160;&#160;&#160;function First : TChainedList;&#160;&#160;&#160;&#160;function Last&#160;&#160;: TChainedList;&#160;&#160;&#160;&#160;function Prior : TChainedList;&#160;&#160;&#160;&#160;function Next&#160;&#160;: TChainedList;&#160;&#160;&#160;&#160;&#160;function Add: TChainedList;&#160;&#160;&#160;&#160;function Remove: TChainedList; overload;&#160;&#160;&#160;&#160;function Remove&#40;AChainedReleaser: Pointer&#41;: TChainedList; overload;&#160;&#160;&#160;&#160;&#160;property Current: PPointer read GetCurrent;&#160;&#160;&#160;&#160;property Count: Integer read FCount;&#160;&#160;end;&#160;implementation&#160;type&#160;&#160;PChainedItem [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>For everybody thats use a lot Chained lists on your projects:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">uses</span> SysUtils<span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">PPointer</span> <span style="color: #000066;">=</span> <span style="color: #000066;">^</span>Pointer<span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;TChainedList <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">private</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FFirst&nbsp;&nbsp; <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FLast&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCount&nbsp;&nbsp; <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Integer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> GetCurrent<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">PPointer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">public</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">constructor</span> Create<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">destructor</span> Destroy<span style="color: #000066;">;</span> <span style="color: #000000; font-weight: bold;">override</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> First <span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Last&nbsp;&nbsp;<span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Prior <span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Next&nbsp;&nbsp;<span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Add<span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Remove<span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span> <span style="color: #000000; font-weight: bold;">overload</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Remove<span style="color: #000066;">&#40;</span>AChainedReleaser<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span> <span style="color: #000000; font-weight: bold;">overload</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">property</span> Current<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">PPointer</span> <span style="color: #000066;">read</span> GetCurrent<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">property</span> Count<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Integer</span> <span style="color: #000066;">read</span> FCount<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">implementation</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;PChainedItem <span style="color: #000066;">=</span> <span style="color: #000066;">^</span>TChainedItem<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;TChainedItem <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">record</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Prior<span style="color: #000066;">,</span> Next<span style="color: #000066;">:</span> PChainedItem<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Data<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #808080; font-style: italic;">{ TChainedList }</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">constructor</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;FCount <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;FFirst <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;FLast <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">destructor</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Destroy</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;First<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">while</span> Current &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">do</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Remove<span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">inherited</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">GetCurrent</span><span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">PPointer</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> FCurrent &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000066;">@</span>PChainedItem<span style="color: #000066;">&#40;</span>FCurrent<span style="color: #000066;">&#41;</span><span style="color: #000066;">.</span><span style="color: #006600;">Data</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">else</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">First</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FFirst<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Last</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FLast<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Prior</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> FCurrent &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> PChainedItem<span style="color: #000066;">&#40;</span>FCurrent<span style="color: #000066;">&#41;</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">else</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Next</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> FCurrent &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> PChainedItem<span style="color: #000066;">&#40;</span>FCurrent<span style="color: #000066;">&#41;</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">else</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Add</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;pNew<span style="color: #000066;">:</span> PChainedItem<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">New</span><span style="color: #000066;">&#40;</span>pNew<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;pNew<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;pNew<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;pNew<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Data</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> FFirst <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FFirst <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pNew<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FLast <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pNew<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span> <span style="color: #000000; font-weight: bold;">else</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;pNew<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> PChainedItem<span style="color: #000066;">&#40;</span>FLast<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;PChainedItem<span style="color: #000066;">&#40;</span>FLast<span style="color: #000066;">&#41;</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pNew<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FLast <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pNew<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FLast<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>FCount<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Remove</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;pCur<span style="color: #000066;">:</span> PChainedItem<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;pCur <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FCurrent<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Data</span> &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">raise</span> Exception<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'Current item memory leak detected.'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span> &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span> &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> pCur <span style="color: #000066;">=</span> FFirst <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FFirst <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FFirst<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> pCur <span style="color: #000066;">=</span> FLast <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FLast <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FLast<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span> <span style="color: #000000; font-weight: bold;">else</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Dispose</span><span style="color: #000066;">&#40;</span>pCur<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Dec</span><span style="color: #000066;">&#40;</span>FCount<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Remove</span><span style="color: #000066;">&#40;</span>AChainedReleaser<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;TRelease <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">procedure</span><span style="color: #000066;">&#40;</span>APointer<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;PdrRelease<span style="color: #000066;">:</span> TRelease<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">@</span>PdrRelease <span style="color: #000066;">:</span><span style="color: #000066;">=</span> AChainedReleaser<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;PdrRelease<span style="color: #000066;">&#40;</span>PChainedItem<span style="color: #000066;">&#40;</span>FCurrent<span style="color: #000066;">&#41;</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Data</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;PChainedItem<span style="color: #000066;">&#40;</span>FCurrent<span style="color: #000066;">&#41;</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Data</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Remove<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>See how to use it here: <a href="http://gsaraiva.projects.pro.br/?p=418">Delphi: Chained List</a></p>
<p>Hugs!</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2009/06/delphi-utils-tchainedlist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enquete para programadores</title>
		<link>http://projects.pro.br/gsaraiva/2009/02/enquete-para-programadores/</link>
		<comments>http://projects.pro.br/gsaraiva/2009/02/enquete-para-programadores/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 19:38:26 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[Enquete]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=405</guid>
		<description><![CDATA[Camaradas,
http://www.polldaddy.com/s/99B383D42EE93C13/
Se puder divulgar pra mais gente, agradeçe-mos  
]]></description>
			<content:encoded><![CDATA[<p>Camaradas,</p>
<p><del datetime="2009-07-09T10:24:45+00:00"><a href="http://www.polldaddy.com/s/99B383D42EE93C13/">http://www.polldaddy.com/s/99B383D42EE93C13/</a></del></p>
<p>Se puder divulgar pra mais gente, agradeçe-mos <img src='http://projects.pro.br/gsaraiva/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2009/02/enquete-para-programadores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi: Utils :: ToolButtonScreenPos</title>
		<link>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-toolbuttonscreenpos/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-toolbuttonscreenpos/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 23:26:16 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[GetDCOrgEx]]></category>
		<category><![CDATA[ToolButtonScreenPos]]></category>
		<category><![CDATA[Usefull functions]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=341</guid>
		<description><![CDATA[Folks,
For everybody that needs the ToolButton position:
type&#160;&#160;TToolButtonAccess = class&#40;TToolButton&#41;;&#160;function ToolButtonScreenPos&#40;AToolButton: TToolButton&#41;: TPoint;begin&#160;&#160;GetDCOrgEx&#40;TToolButtonAccess&#40;AToolButton&#41;.Canvas.Handle, Result&#41;;&#160;&#160;Inc&#40;Result.X, AToolButton.Left&#41;;&#160;&#160;Inc&#40;Result.Y, AToolButton.Top&#41;;end;
Hugs!
]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>For everybody that needs the ToolButton position:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;TToolButtonAccess <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #000066;">&#40;</span>TToolButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> ToolButtonScreenPos<span style="color: #000066;">&#40;</span>AToolButton<span style="color: #000066;">:</span> TToolButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">:</span> TPoint<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;GetDCOrgEx<span style="color: #000066;">&#40;</span>TToolButtonAccess<span style="color: #000066;">&#40;</span>AToolButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">.</span><span style="color: #006600;">Canvas</span><span style="color: #000066;">.</span><span style="color: #006600;">Handle</span><span style="color: #000066;">,</span> Result<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">.</span><span style="color: #006600;">X</span><span style="color: #000066;">,</span> AToolButton<span style="color: #000066;">.</span><span style="color: #006600;">Left</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">.</span><span style="color: #006600;">Y</span><span style="color: #000066;">,</span> AToolButton<span style="color: #000066;">.</span><span style="color: #006600;">Top</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Hugs!</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-toolbuttonscreenpos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi: Utils :: SpeedButtonScreenPos</title>
		<link>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-speedbuttonscreenpos/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-speedbuttonscreenpos/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 23:24:54 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[GetDCOrgEx]]></category>
		<category><![CDATA[SpeedButtonScreenPos]]></category>
		<category><![CDATA[Usefull functions]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=339</guid>
		<description><![CDATA[Folks,
For everybody that needs the Speedbutton position:
type&#160;&#160;TSpeedButtonAccess = class&#40;TSpeedButton&#41;;&#160;function SpeedButtonScreenPos&#40;ASpeedButton: TSpeedButton&#41;: TPoint;begin&#160;&#160;GetDCOrgEx&#40;TSpeedButtonAccess&#40;ASpeedButton&#41;.Canvas.Handle, Result&#41;;&#160;&#160;Inc&#40;Result.X, ASpeedButton.Left&#41;;&#160;&#160;Inc&#40;Result.Y, ASpeedButton.Top&#41;;end;
Hugs!
]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>For everybody that needs the Speedbutton position:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;TSpeedButtonAccess <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #000066;">&#40;</span>TSpeedButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> SpeedButtonScreenPos<span style="color: #000066;">&#40;</span>ASpeedButton<span style="color: #000066;">:</span> TSpeedButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">:</span> TPoint<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;GetDCOrgEx<span style="color: #000066;">&#40;</span>TSpeedButtonAccess<span style="color: #000066;">&#40;</span>ASpeedButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">.</span><span style="color: #006600;">Canvas</span><span style="color: #000066;">.</span><span style="color: #006600;">Handle</span><span style="color: #000066;">,</span> Result<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">.</span><span style="color: #006600;">X</span><span style="color: #000066;">,</span> ASpeedButton<span style="color: #000066;">.</span><span style="color: #006600;">Left</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">.</span><span style="color: #006600;">Y</span><span style="color: #000066;">,</span> ASpeedButton<span style="color: #000066;">.</span><span style="color: #006600;">Top</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Hugs!</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-speedbuttonscreenpos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi: Utils :: DesktopArea</title>
		<link>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-desktoparea/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-desktoparea/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 23:12:43 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[DesktopArea]]></category>
		<category><![CDATA[FindWindow]]></category>
		<category><![CDATA[GetDesktopWindow]]></category>
		<category><![CDATA[GetWindowRect]]></category>
		<category><![CDATA[Shell_TrayWnd]]></category>
		<category><![CDATA[SubtractRect]]></category>
		<category><![CDATA[Usefull functions]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=334</guid>
		<description><![CDATA[Folks,
For everybody that need to show something only on the useful area of the desktop I wrote this function:
function DesktopClientArea: TRect;var&#160;&#160;rDesktop, rWinBar: TRect;begin&#160;&#160;Windows.GetWindowRect&#40;GetDesktopWindow, rDesktop&#41;;&#160;&#160;Windows.GetWindowRect&#40;FindWindow&#40;'Shell_TrayWnd', nil&#41;, rWinBar&#41;;&#160;&#160;SubtractRect&#40;Result, rDesktop, rWinBar&#41;;end;
Hugs!
]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>For everybody that need to show something only on the useful area of the desktop I wrote this function:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">function</span> DesktopClientArea<span style="color: #000066;">:</span> TRect<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;rDesktop<span style="color: #000066;">,</span> rWinBar<span style="color: #000066;">:</span> TRect<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;Windows<span style="color: #000066;">.</span><span style="color: #006600;">GetWindowRect</span><span style="color: #000066;">&#40;</span>GetDesktopWindow<span style="color: #000066;">,</span> rDesktop<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Windows<span style="color: #000066;">.</span><span style="color: #006600;">GetWindowRect</span><span style="color: #000066;">&#40;</span>FindWindow<span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'Shell_TrayWnd'</span><span style="color: #000066;">,</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">,</span> rWinBar<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;SubtractRect<span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">,</span> rDesktop<span style="color: #000066;">,</span> rWinBar<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Hugs!</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-desktoparea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eu recomendo: Site sobre WordPress</title>
		<link>http://projects.pro.br/gsaraiva/2008/08/eu-recomendo-site-sobre-wordpress/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/08/eu-recomendo-site-sobre-wordpress/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 20:32:27 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=320</guid>
		<description><![CDATA[Camaradas,
Eu recomendo:

http://www.pblog.com.br/


o pBlog é um blog destinado a compartilhar tudo que diz respeito ao WordPress e mais algumas coisas sobre como blogar.
As principais vantagens:

No mínimo uma atualização por semana de assuntos sobre o mundo do WordPress
Conteúdo bem informativo em comparação com outros blogs que existem por ae.
RSS no e-mail.

]]></description>
			<content:encoded><![CDATA[<p>Camaradas,</p>
<p><strong>Eu recomendo:</strong><br />
<a href="http://www.pblog.com.br/"><br />
<h3>http://www.pblog.com.br/</h3>
<p></a></p>
<dl>
o pBlog é um blog destinado a compartilhar tudo que diz respeito ao WordPress e mais algumas coisas sobre como blogar.</p>
<p><strong>As principais vantagens:</strong>
<dl>
<li>No mínimo uma atualização por semana de assuntos sobre o mundo do WordPress</li>
<li>Conteúdo bem informativo em comparação com outros blogs que existem por ae.</li>
<li>RSS no e-mail.</li>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/08/eu-recomendo-site-sobre-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi: Utils :: PNG for Delphi</title>
		<link>http://projects.pro.br/gsaraiva/2008/08/delphi-utils-png-for-delphi/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/08/delphi-utils-png-for-delphi/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 22:32:58 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=306</guid>
		<description><![CDATA[Folks,
Let me provide this good library of PNG for Delphi, as I see that is hard to get a copy searching on the web I&#8217;ll provide it here.
Component: PNG Delphi
Component Author: Gustavo Huffenbacher Daud
Lastest version: 2002
Download it here:
Its very easy to use, and came with a help ( PngDelphi.chm under the .zip )
Hugs
]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>Let me provide this good library of PNG for Delphi, as I see that is hard to get a copy searching on the web I&#8217;ll provide it here.</p>
<p>Component: PNG Delphi<br />
Component Author: Gustavo Huffenbacher Daud<br />
Lastest version: 2002<br />
<strong>Download it here:</strong> <a href="http://projects.pro.br/gsaraiva/downloads/7" title="Downloaded 315 times">pngimagelib (354.42 KB) - 315 hits</a></p>
<p>Its very easy to use, and came with a help ( PngDelphi.chm under the .zip )</p>
<p>Hugs</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/08/delphi-utils-png-for-delphi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
