<?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>Under Southern Skies &#187; 技术</title>
	<atom:link href="http://blog.airhunter.com/category/%e6%8a%80%e6%9c%af/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.airhunter.com</link>
	<description>迎接新变化</description>
	<lastBuildDate>Mon, 09 Aug 2010 15:44:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>IXMLDocument的使用</title>
		<link>http://blog.airhunter.com/2007/12/27/ixmldocument%e7%9a%84%e4%bd%bf%e7%94%a8/</link>
		<comments>http://blog.airhunter.com/2007/12/27/ixmldocument%e7%9a%84%e4%bd%bf%e7%94%a8/#comments</comments>
		<pubDate>Thu, 27 Dec 2007 00:32:00 +0000</pubDate>
		<dc:creator>airhunter</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://wordpress.airhunter.com/?p=87</guid>
		<description><![CDATA[　　最近要和其它厂商的系统互相交换数据。提到要通过XML实现。花了点时间学习了一下，把一些要点记下来，免得浪费今天的劳动成果～有些函数还是没搞明白，但实现目前的需求应该是没问题了。在此感谢令狐虫和猛禽提供滴无私帮助。 1、IXMLDocument包含哪个头文件？#include&#60;XMLDoc.hpp&#62; 2、如何创建一个XML对象？ //生成一个XMLDocument对象。//对象生成后不用自己释放。_di_IXMLDocument X = NewXMLDocument(); AnsiString rootpath = &#8220;c:\\Temp&#8221;;X->Active = true;//添加一个NodeName叫&#8221;dir&#8221;_di_IXMLNode ix = X->AddChild(&#8220;dir&#8221;);//添加Node下的一字Attributes为&#8221;id&#8221;//Value为&#8221;1001&#8243; ix->Attributes["id"] = &#8220;1001&#8243;;ix->Attributes["name"] = &#8220;file1.txt&#8221;;ix->Attributes["path"] = &#8220;c:\\temp&#8221;;//保存为XML文件。X->SaveToFile(&#8220;c:\\temp\\files.xml&#8221;); 3、如何创建树状节结？//在上面代码的基础上添加。//在Node下面添加一个子节点_di_IXMLNode ix = node->AddChild(&#8220;file&#8221;); ix->Attributes["id"] = &#8220;id&#8221;;ix->Attributes["name"] = name;ix->Attributes["path"] = Path;ix->Attributes["type"] = &#8220;type&#8221;; 4、如何读取XML？//取得XML对象// 同样不用管释放 _di_IXMLDocument xml =LoadXMLDocument(&#8220;c:\\temp\\files.xml&#8221;); //取得XML中的元素。//这个root是啥我也不知道。 //我理解为root是整个XML的根_di_IXMLNode root = xml->GetDocumentElement(); //得到root的子节点_di_IXMLNodeList nodelist = root->ChildNodes;//_di_IXMLNodeList有一个Count属性for(int i = 0; i &#60; [...]]]></description>
			<content:encoded><![CDATA[<p>　　最近要和其它厂商的系统互相交换数据。提到要通过XML实现。花了点时间学习了一下，把一些要点记下来，免得浪费今天的劳动成果～有些函数还是没搞明白，但实现目前的需求应该是没问题了。在此感谢令狐虫和猛禽提供滴无私帮助。<span style="font-weight: bold;"></p>
<p></span></p>
<p><span style="font-weight: bold;"></span><span style="font-weight: bold;">1、IXMLDocument包含哪个头文件？</span><br /><span style="color: rgb(0, 153, 0);">#include&lt;XMLDoc.hpp&gt;<xmldoc.hpp></xmldoc.hpp></span><xmldoc.hpp><br /></xmldoc.hpp><xmldoc.hpp></p>
<p><span style="font-weight: bold;">2、如何创建一个XML对象？</span></xmldoc.hpp></p>
<p><span style="color: rgb(0, 0, 153);">//生成一个XMLDocument对象。<br />//对象生成后不用自己释放。</span><br /><xmldoc.hpp>_di_IXMLDocument X = NewXMLDocument(); <span style="color: rgb(0, 0, 153);"></span><br />                                                                        AnsiString  rootpath = <span style="color: rgb(0, 153, 0);">&#8220;c:\\Temp&#8221;</span>;<br />X->Active = true;</xmldoc.hpp><span style="color: rgb(0, 0, 153);"><br />//添加一个NodeName叫&#8221;dir&#8221;</span><br /><xmldoc.hpp>_di_IXMLNode ix = X->AddChild(<span style="color: rgb(0, 153, 0);">&#8220;dir&#8221;</span>);<br /></xmldoc.hpp><span style="color: rgb(0, 0, 153);">//添加Node下的一字Attributes为&#8221;id&#8221;<br /></span><span style="color: rgb(0, 0, 153);">//Value为&#8221;1001&#8243;                           </span><br /><xmldoc.hpp>ix->Attributes[<span style="color: rgb(0, 153, 0);">"id"</span>] =  <span style="color: rgb(0, 153, 0);">&#8220;1001&#8243;</span>;<br />ix->Attributes[<span style="color: rgb(0, 153, 0);">"name"</span>] = <span style="color: rgb(0, 0, 153);">&#8220;file1.txt&#8221;</span>;<br />ix->Attributes[<span style="color: rgb(0, 153, 0);">"path"</span>] = <span style="color: rgb(0, 0, 153);">&#8220;c:\\temp&#8221;</span>;<br /></xmldoc.hpp><span style="color: rgb(0, 0, 153);">//保存为XML文件。</span><br /><xmldoc.hpp>X->SaveToFile(<span style="color: rgb(0, 153, 0);">&#8220;c:\\temp\\files.xml&#8221;</span>);</p>
<p><span style="font-weight: bold;">3、如何创建树状节结？</span><br /><span style="color: rgb(0, 0, 153);">//在上面代码的基础上添加。<br /></span></xmldoc.hpp><span style="color: rgb(0, 0, 153);">//在Node下面添加一个子节点</span><br /><xmldoc.hpp>_di_IXMLNode ix = node->AddChild(<span style="color: rgb(0, 153, 0);">&#8220;file&#8221;</span>); <span style="color: rgb(0, 0, 153);"></span><br />ix->Attributes[<span style="color: rgb(0, 153, 0);">"id"</span>] =  <span style="color: rgb(0, 153, 0);">&#8220;id&#8221;</span>;<br />ix->Attributes[<span style="color: rgb(0, 153, 0);">"name"</span>] = name;<br />ix->Attributes[<span style="color: rgb(0, 153, 0);">"path"</span>] = Path;<br />ix->Attributes[<span style="color: rgb(0, 153, 0);">"type"</span>] = <span style="color: rgb(0, 153, 0);">&#8220;type&#8221;</span>;</p>
<p><span style="font-weight: bold;">4、如何读取XML？<br /></span></xmldoc.hpp><span style="color: rgb(0, 0, 153);">//取得XML对象<br /></span><span style="color: rgb(0, 0, 153);">// 同样不用管释放</span><br /><xmldoc.hpp>   _di_IXMLDocument xml =LoadXMLDocument(<span style="color: rgb(0, 153, 0);">&#8220;c:\\temp\\files.xml&#8221;</span>);<span style="color: rgb(0, 0, 153);"> </span><br />                                                                                                                   </xmldoc.hpp><span style="color: rgb(0, 0, 153);">//取得XML中的元素。<br /></span><span style="color: rgb(0, 0, 153);">//这个root是啥我也不知道。<br /></span><span style="color: rgb(0, 0, 153);">                                                                                                //我理解为root是整个XML的根</span><br /><xmldoc.hpp>_di_IXMLNode root = xml->GetDocumentElement();<br />                                                                                    </xmldoc.hpp><span dragover="true" style="color: rgb(0, 0, 153);">//得到root的子节点</span><br /><xmldoc.hpp>_di_IXMLNodeList nodelist = root->ChildNodes;<span dragover="true" style="color: rgb(0, 0, 153);"><br /></span></xmldoc.hpp><span style="color: rgb(0, 0, 153);">//_di_IXMLNodeList有一个Count属性</span><xmldoc.hpp><br /><span style="font-weight: bold;">for</span>(<span style="font-weight: bold;">int </span>i = 0; i &lt; nodelist-&gt;Count; i ++) <span style="color: rgb(0, 0, 153);"></span><br />{<br />　AnsiString str;<br /></xmldoc.hpp><span style="color: rgb(0, 0, 153);">　//遍历Node</span><br /><xmldoc.hpp>　_di_IXMLNode node = nodelist->Nodes[i];<br /></xmldoc.hpp><span style="color: rgb(0, 0, 153);">　//从属性中取得Attribute</span><br /><xmldoc.hpp>　WideString wpath = node->GetAttribute(WideString(<span style="color: rgb(0, 153, 0);">&#8220;path&#8221;</span>)); <span style="color: rgb(0, 0, 153);"></span><br />　WideString wfile = node->GetAttribute(WideString(<span style="color: rgb(0, 153, 0);">&#8220;name&#8221;</span>));<br />　str = wpath + <span style="color: rgb(0, 153, 0);">&#8220;\\&#8221;</span> +  wfile;<br />　Memo1->Lines->Add(str);<br /></xmldoc.hpp><span style="color: rgb(0, 0, 153);">　//下面这段一样<br />　//只是演试一下如何得到一下层</span><br /><xmldoc.hpp>　_di_IXMLNodeList childlist = node->GetChildNodes(); <span style="color: rgb(0, 0, 153);"></span></p>
<p><span style="font-weight: bold;">　for</span>(<span style="font-weight: bold;">int </span>j = 0; j &lt;childlist-&gt;Count; j++)<br />　{<br />　　AnsiString str;<br />　　_di_IXMLNode node = childlist->Nodes[j];<br />　　WideString wpath = node->GetAttribute(WideString(<span style="color: rgb(0, 153, 0);">&#8220;path&#8221;</span>));<br />　　WideString wfile = node->GetAttribute(WideString(<span style="color: rgb(0, 153, 0);">&#8220;name&#8221;</span>));</p>
<p>　　str = <span style="color: rgb(0, 153, 0);">&#8221;   &#8220;</span> + wpath + <span style="color: rgb(0, 153, 0);">&#8220;\\&#8221;</span> +  wfile;<br />　　Memo1->Lines->Add(str);<br />　}<br />}</p>
<p><span style="font-weight: bold;">5、其它有用的方法</span><br /><span style="color: rgb(255, 0, 0);"> _di_IXMLNode有一个NodeTpye表明这个Node的类型。但不知道在何时使用它。</span><br /><span style="color: rgb(255, 0, 0);"> _di_IXMLNode有一个NodeValue，我猜是用来表明这个NodeValue的类型。但不知道在何时使用它。也不知道怎么用，总是报错。</span></p>
<p><span style="font-weight: bold;">附一个例子：</span><vcl.h><xmldoc.hpp><span style="color: rgb(0, 153, 0);"></span><br />TForm1 *Form1;</p>
<p><span style="font-weight: bold;">void </span>AddPath(AnsiString Path, _di_IXMLNode node)<br />{<br /><span style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 0, 0);">　AnsiString</span> </span>FilePath=Path+<span style="color: rgb(0, 0, 153);">&#8220;\\*.*&#8221;</span>;<br />　TSearchRec sr;<br />　sr.Name=FilePath;<br /><span style="font-weight: bold;">　int </span>done;<br />　done = FindFirst(FilePath,faAnyFile,sr);<br />　AnsiString FileName;<br /><span style="font-weight: bold;">　while </span>(!done)      {<br />　　FileName=Path+<span style="color: rgb(0, 153, 0);">&#8220;\\&#8221;</span>+sr.Name;<br />　　FileSetAttr(FileName,<span style="color: rgb(0, 0, 153);">0</span>);<br /><span style="font-weight: bold;">　　if</span>(sr.Attr &amp; faDirectory&amp;&amp;sr.Name[<span style="color: rgb(0, 0, 153);">1</span>]!=<span style="color: rgb(0, 153, 0);">&#8216;.&#8217;</span>) {<br />　　　_di_IXMLNode ix = node->AddChild(<span style="color: rgb(0, 153, 0);">&#8220;dir&#8221;</span>);<br /></xmldoc.hpp></vcl.h></xmldoc.hpp>             <xmldoc.hpp><vcl.h><xmldoc.hpp>　　　ix->Attributes[<span style="color: rgb(0, 153, 0);">"id"</span>] =  <span style="color: rgb(0, 153, 0);">&#8220;id&#8221;</span>;<br /></xmldoc.hpp></vcl.h></xmldoc.hpp>             <xmldoc.hpp><vcl.h><xmldoc.hpp>　　　ix->Attributes[<span style="color: rgb(0, 153, 0);">"name"</span>] = sr.Name;<br /></xmldoc.hpp></vcl.h></xmldoc.hpp>             <xmldoc.hpp><vcl.h><xmldoc.hpp>　　　ix->Attributes[<span style="color: rgb(0, 153, 0);">"path"</span>] = Path;<br /></xmldoc.hpp></vcl.h></xmldoc.hpp>             <xmldoc.hpp><vcl.h><xmldoc.hpp>　　　AddPath(FileName, ix);<br />　　}<br /><span style="font-weight: bold;">　　else </span>{<br /></xmldoc.hpp></vcl.h></xmldoc.hpp>             <xmldoc.hpp><vcl.h><xmldoc.hpp>　　　_di_IXMLNode ix = node->AddChild(<span style="color: rgb(0, 153, 0);">&#8220;file&#8221;</span>);<br /></xmldoc.hpp></vcl.h></xmldoc.hpp>             <xmldoc.hpp><vcl.h><xmldoc.hpp>　　　ix->Attributes[<span style="color: rgb(0, 153, 0);">"id"</span>] =  <span style="color: rgb(0, 153, 0);">&#8220;id&#8221;</span>;<br /></xmldoc.hpp></vcl.h></xmldoc.hpp>             <xmldoc.hpp><vcl.h><xmldoc.hpp>　　　ix->Attributes[<span style="color: rgb(0, 153, 0);">"name"</span>] = sr.Name;<br /></xmldoc.hpp></vcl.h></xmldoc.hpp>             <xmldoc.hpp><vcl.h><xmldoc.hpp>　　　ix->Attributes[<span style="color: rgb(0, 153, 0);">"path"</span>] = Path;<br /></xmldoc.hpp></vcl.h></xmldoc.hpp>             <xmldoc.hpp><vcl.h><xmldoc.hpp>　　　ix->Attributes[<span style="color: rgb(0, 153, 0);">"type"</span>] = &#8220;type&#8221;;<br />　　}<br />　　done = FindNext(sr);<br />　}<br />　FindClose(sr);<br />}<br /><span style="color: rgb(0, 0, 153);">//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span><br /><span style="font-weight: bold;">__fastcall </span>TForm1::TForm1(TComponent* Owner)<br />: TForm(Owner)<br />{<br />　_di_IXMLDocument X = NewXMLDocument();<br />　AnsiString  rootpath = <span style="color: rgb(0, 153, 0);">&#8220;c:\\Temp&#8221;</span>;<br />　X->Active = <span style="font-weight: bold;">true</span>;<br />　_di_IXMLNode ix = X->AddChild(<span style="color: rgb(0, 153, 0);">&#8220;dir&#8221;</span>);<br />　ix->Attributes[<span style="color: rgb(0, 153, 0);">"id"</span>] =  <span style="color: rgb(0, 153, 0);">&#8220;&#8221;</span>;<br />　ix->Attributes[<span style="color: rgb(0, 153, 0);">"name"</span>] = ExtractFileName(rootpath);<br />　ix->Attributes[<span style="color: rgb(0, 153, 0);">"path"</span>] = ExtractFilePath(rootpath);<br />　AddPath(rootpath, ix);<br />　X->SaveToFile(<span style="color: rgb(0, 153, 0);">&#8220;c:\\temp\\files.xml&#8221;</span>);<br />}<br /><span style="color: rgb(0, 0, 153);">//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span><br /><span style="font-weight: bold;">void __fastcall</span> TForm1::Button1Click(TObject *Sender)<br />{<br />　_di_IXMLDocument xml =LoadXMLDocument(<span style="color: rgb(0, 153, 0);">&#8220;c:\\temp\\files.xml&#8221;</span>);<br />　_di_IXMLNode root = xml->GetDocumentElement();</p>
<p>　_di_IXMLNodeList nodelist = root->ChildNodes;<br /><span style="font-weight: bold;">　for</span>(<span style="font-weight: bold;">int </span>i = <span style="color: rgb(0, 0, 153);">0</span>; i &lt;nodelist->&gt;Count; i++)<br />　{<br />　　AnsiString str;<br />　　_di_IXMLNode node = nodelist->Nodes[i];<br />　　WideString wpath = node->GetAttribute(WideString(<span style="color: rgb(0, 153, 0);">&#8220;path&#8221;</span>));<br />　　WideString wfile = node->GetAttribute(WideString(<span style="color: rgb(0, 153, 0);">&#8220;name&#8221;</span>));<br />　　str = wpath + <span style="color: rgb(0, 153, 0);">&#8220;\\&#8221;</span> +  wfile;<br />　　Memo1->Lines->Add(str);<br />　　_di_IXMLNodeList childlist = node->GetChildNodes();<br /><span style="font-weight: bold;">　　for</span>(<span style="font-weight: bold;">int </span>j = <span style="color: rgb(0, 0, 153);">0</span>;</xmldoc.hpp></vcl.h></xmldoc.hpp> j &lt;childlist-&gt;<xmldoc.hpp><vcl.h><xmldoc.hpp>Count; j++)<br />　　{<br />　　　AnsiString str;<br />　　　_di_IXMLNode node = childlist->Nodes[j];<br />　　　WideString wpath = node->GetAttribute(WideString(<span style="color: rgb(0, 153, 0);">&#8220;path&#8221;</span>));<br />　　　WideString wfile = node->GetAttribute(WideString(<span style="color: rgb(0, 153, 0);">&#8220;name&#8221;</span>));<br />　　　str = <span style="color: rgb(0, 153, 0);">&#8221;   &#8220;</span> + wpath + <span style="color: rgb(0, 153, 0);">&#8220;\\&#8221;</span> +  wfile;<br />　　　Memo1->Lines->Add(str);<br />　　}<br />　}<br />}<br /><span style="color: rgb(0, 0, 153);">//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></xmldoc.hpp></vcl.h></xmldoc.hpp></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.airhunter.com/2007/12/27/ixmldocument%e7%9a%84%e4%bd%bf%e7%94%a8/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ADO异步执行</title>
		<link>http://blog.airhunter.com/2005/11/03/ado%e5%bc%82%e6%ad%a5%e6%89%a7%e8%a1%8c/</link>
		<comments>http://blog.airhunter.com/2005/11/03/ado%e5%bc%82%e6%ad%a5%e6%89%a7%e8%a1%8c/#comments</comments>
		<pubDate>Thu, 03 Nov 2005 04:48:00 +0000</pubDate>
		<dc:creator>airhunter</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://wordpress.airhunter.com/?p=52</guid>
		<description><![CDATA[　　看了猛禽和令狐的贴子才知道原来google今天死掉乐，偶还以为就偶一个人登不了Gmail呢。现在放心乐，不是偶的RPWT。　　上次问了令狐关于数据库如何在做大数据量或执行很慢的操作时不会让界面死掉。记得令狐当时是说数据库本身就是支持这个功能的，然后就说了一堆以偶的IQ比较难以理解的话。好在在GOOGLE的帮助下还是找到了方法，和令狐说得也差不多，果然ADO就带有这个功能。只要设置ADOQuery或ADODataSet中的ExectueOption属性的eoAsyncFetchNonBlocking为true就可以乐。然后在OnFetchProgress和OnFetchComplete事件中作处理就行乐：）而在处理中想中止的话，只要简单的Close就行乐。 BTW　1：才说到偶和空姐失去联系了，没想到话刚说完的第二天就在网上遇到了她。看来考试后就没再回嘉兴，本来还真想跑回去见她一面，整整五年没见过她乐：（空姐现在对BLOG很感兴趣，AirHostess&#8217; Blog看来就快要开张乐。 BTW　2：偶的Filckr也开张乐，可惜目前没有图片（至少没有公开的图片）。等有相机的时候请大家去参观吧。(Filckr + Blogspot果然是无敌的)]]></description>
			<content:encoded><![CDATA[<p>　　看了<a href="http://raptor.mblogger.cn/">猛禽</a>和<a href="http://borland.mblogger.cn/topcat/">令狐</a>的贴子才知道原来google今天死掉乐，偶还以为就偶一个人登不了Gmail呢。现在放心乐，不是偶的RPWT。<br />　　上次问了<a href="http://borland.mblogger.cn/topcat/">令狐</a>关于数据库如何在做大数据量或执行很慢的操作时不会让界面死掉。记得<a href="http://borland.mblogger.cn/topcat/">令狐</a>当时是说数据库本身就是支持这个功能的，然后就说了一堆以偶的IQ比较难以理解的话。好在在GOOGLE的帮助下还是找到了方法，和<a href="http://borland.mblogger.cn/topcat/">令狐</a>说得也差不多，果然ADO就带有这个功能。只要设置ADOQuery或ADODataSet中的ExectueOption属性的eoAsyncFetchNonBlocking为true就可以乐。然后在OnFetchProgress和OnFetchComplete事件中作处理就行乐：）而在处理中想中止的话，只要简单的Close就行乐。</p>
<p>
<p>BTW　1：才说到偶和空姐失去联系了，没想到话刚说完的第二天就在网上遇到了她。看来考试后就没再回嘉兴，本来还真想跑回去见她一面，整整五年没见过她乐：（空姐现在对BLOG很感兴趣，AirHostess&#8217; Blog看来就快要开张乐。</p>
<p>
<p>BTW　2：<a href="http://www.flickr.com/photos/airhunter/">偶的Filckr</a>也开张乐，可惜目前没有图片（至少没有公开的图片）。等有相机的时候请大家去参观吧。(Filckr + Blogspot果然是无敌的)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.airhunter.com/2005/11/03/ado%e5%bc%82%e6%ad%a5%e6%89%a7%e8%a1%8c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BCB疑难问题</title>
		<link>http://blog.airhunter.com/2005/07/12/bcb%e7%96%91%e9%9a%be%e9%97%ae%e9%a2%98/</link>
		<comments>http://blog.airhunter.com/2005/07/12/bcb%e7%96%91%e9%9a%be%e9%97%ae%e9%a2%98/#comments</comments>
		<pubDate>Tue, 12 Jul 2005 07:10:00 +0000</pubDate>
		<dc:creator>airhunter</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://wordpress.airhunter.com/?p=42</guid>
		<description><![CDATA[今天在修改同事的代码时发生的怪问题，原来的Cut、Paste、Copy等功能都失灵了，断点后发现ActiveControl总是得到NULL值。（偶是把窗体嵌入到另一个窗体中）。最后还是猛禽解释了原因。 (2005-07-12 17:01:48) 猛禽 这个问题在ActiveControl上 (2005-07-12 17:02:17) 猛禽 当frm是独立窗体是，ActiveControl是它上面的控件 (2005-07-12 17:02:50) 猛禽 当你放到另一个窗体上时，这个子窗体本身变成了ActiveControl (2005-07-12 17:03:14) 空中猎手 但这时通过断点得到的ActiveControl是空值 (2005-07-12 17:03:18) 猛禽 因为它是Form不是Memo，所以dynamic_cast会返回0 (2005-07-12 17:03:44) 空中猎手 在dynamic_cast操作之前就是NULL (2005-07-12 17:04:08) 猛禽 那就是因为这个窗体本身变成control了，所以它就没有ActiveControl了 (2005-07-12 17:04:24) 猛禽 你必须取它的Parent的ActiveCtrol才可以 又学到一手，好久都没聊技术了，啥都不熟了：） BTW：　　１、今天找到很多不错的诗，大家多多参观：《青春》、《索价》、《在非洲》　　２、空姐生日快到乐，想送空姐一份生日礼物，但空姐就是不收，郁闷。现在不知道地址，没办法送乐，有钱用不掉指得多半就是现在这种情况@_@]]></description>
			<content:encoded><![CDATA[<p>今天在修改同事的代码时发生的怪问题，原来的Cut、Paste、Copy等功能都失灵了，断点后发现ActiveControl总是得到NULL值。（偶是把窗体嵌入到另一个窗体中）。最后还是<a href="http://borland.mblogger.cn/raptor">猛禽</a>解释了原因。</p>
<div style="text-align: left;"><span style="color: rgb(51, 153, 102);">(2005-07-12 17:01:48)   猛禽</span> <span style="color: rgb(51, 153, 102);">这个问题在ActiveControl上 </span> <span style="color: rgb(51, 153, 102);">(2005-07-12 17:02:17)   猛禽</span> <span style="color: rgb(51, 153, 102);">当frm是独立窗体是，ActiveControl是它上面的控件 </span> <span style="color: rgb(51, 153, 102);">(2005-07-12 17:02:50)   猛禽</span> <span style="color: rgb(51, 153, 102);">当你放到另一个窗体上时，这个子窗体本身变成了ActiveControl </span><br /><span style="color: rgb(255, 102, 0);">(2005-07-12 17:03:14)   空中猎手</span> <span style="color: rgb(255, 102, 0);">但这时通过断点得到的ActiveControl是空值 </span><br /><span style="color: rgb(51, 153, 102);">(2005-07-12 17:03:18)   猛禽</span> <span style="color: rgb(51, 153, 102);">因为它是Form不是Memo，所以dynamic_cast会返回0 </span><br /><span style="color: rgb(255, 102, 0);">(2005-07-12 17:03:44)   空中猎手</span> <span style="color: rgb(255, 102, 0);">在dynamic_cast操作之前就是NULL </span><br /><span style="color: rgb(51, 153, 102);">(2005-07-12 17:04:08)   猛禽</span> <span style="color: rgb(51, 153, 102);">那就是因为这个窗体本身变成control了，所以它就没有ActiveControl了 </span> <span style="color: rgb(51, 153, 102);">(2005-07-12 17:04:24)   猛禽</span> <span style="color: rgb(128, 0, 0);"><span style="color: rgb(51, 153, 102);">你必须取它的Parent的ActiveCtrol才可以 </span></p>
<p></span></div>
<p>又学到一手，好久都没聊技术了，啥都不熟了：）</p>
<p>BTW：<br />　　１、今天找到很多不错的诗，大家多多参观：《<a href="http://borland.mblogger.cn/airhunter/posts/22547.aspx">青春</a>》、《<a href="http://borland.mblogger.cn/airhunter/posts/22550.aspx">索价</a>》、《<a href="http://borland.mblogger.cn/airhunter/posts/22551.aspx">在非洲</a>》<br />　　２、空姐生日快到乐，想送空姐一份生日礼物，但空姐就是不收，郁闷。现在不知道地址，没办法送乐，有钱用不掉指得多半就是现在这种情况@_@</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.airhunter.com/2005/07/12/bcb%e7%96%91%e9%9a%be%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>设置打印端口终于解决鸟～～</title>
		<link>http://blog.airhunter.com/2005/04/05/%e8%ae%be%e7%bd%ae%e6%89%93%e5%8d%b0%e7%ab%af%e5%8f%a3%e7%bb%88%e4%ba%8e%e8%a7%a3%e5%86%b3%e9%b8%9f%ef%bd%9e%ef%bd%9e/</link>
		<comments>http://blog.airhunter.com/2005/04/05/%e8%ae%be%e7%bd%ae%e6%89%93%e5%8d%b0%e7%ab%af%e5%8f%a3%e7%bb%88%e4%ba%8e%e8%a7%a3%e5%86%b3%e9%b8%9f%ef%bd%9e%ef%bd%9e/#comments</comments>
		<pubDate>Tue, 05 Apr 2005 06:37:00 +0000</pubDate>
		<dc:creator>airhunter</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://wordpress.airhunter.com/?p=22</guid>
		<description><![CDATA[网上找到一篇《Command line Printer Control in Windows 2000/XP》，里面介绍了通过命令控制打印机，测试也成功乐，这下不能再去理会SetPrinter了（虽然说得迎难而上，不过遇上这种RPWT我也没办法鸟）。 一条命令就解决我的问题，哈哈哈RUNDLL32 PRINTUI.DLL,PrintUIEntry /Xs /n "printer" PortName "port:" 具体帮助可以在命令行下输入以下语句得到：RUNDLL32 PRINTUI.DLL,PrintUIEntry /? 今天整理GMAIL时才发现我刚到上海时在网上发的找房消息竟然有人回复鸟，只是被GMAIL误认为是“垃圾邮件”给放到Spam里了，２室１厅１卫，离公司近到只用走路上班就行了，而且合住的还是位MM。现在到好了，啥都木有鸟。唉～～～怪偶过去一直没注意唉～～～]]></description>
			<content:encoded><![CDATA[<p>网上找到一篇《Command line Printer Control in Windows 2000/XP》，里面介绍了通过命令控制打印机，测试也成功乐，这下不能再去理会SetPrinter了（虽然说得迎难而上，不过遇上这种RPWT我也没办法鸟）。</p>
<p>一条命令就解决我的问题，哈哈哈<br /><code><span style="color:#005900;">RUNDLL32 PRINTUI.DLL,PrintUIEntry /Xs /n "<i>printer</i>" PortName "<i>port:</i>"</p>
<p><span style="color: rgb(0, 0, 0);">具体帮助可以在命令行下输入以下语句得到：<br /></span></span></code><code><span style="color:#005900;">RUNDLL32 PRINTUI.DLL,PrintUIEntry /?</p>
<p><span style="color: rgb(0, 0, 0);">今天整理GMAIL时才发现我刚到上海时在网上发的找房消息竟然有人回复鸟，只是被GMAIL误认为是“垃圾邮件”给放到Spam里了，２室１厅１卫，离公司近到只用走路上班就行了，而且合住的还是位MM。现在到好了，啥都木有鸟。唉～～～怪偶过去一直没注意唉～～～</span></span></code><span style="font-weight: bold;"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.airhunter.com/2005/04/05/%e8%ae%be%e7%bd%ae%e6%89%93%e5%8d%b0%e7%ab%af%e5%8f%a3%e7%bb%88%e4%ba%8e%e8%a7%a3%e5%86%b3%e9%b8%9f%ef%bd%9e%ef%bd%9e/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
