⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 h20000127-27.htm

📁 对于学习很有帮助
💻 HTM
📖 第 1 页 / 共 2 页
字号:
    <p>__declspec(dllexport) int WINAPI DllEntryPoint</p>    <p>(HINSTANCE hinst, unsigned long reason, void*)</p>    <p>{</p>    <p>return 1;</p>    <p>}</p>    <p>__declspec(dllexport) int pascal </p>    <p>ShowStatusWindow(int AVIType,LPSTR</p>    <p>WinTitle,long hWnd){</p>    <p>hWndParent=(HWND)hWnd;</p>    <p>memset(lpsWinTitle,0,sizeof(lpsWinTitle));</p>    <p>strncpy(lpsWinTitle,WinTitle,sizeof(lpsWinTitle)-1);</p>    <p>if (AVIType &gt;0 &amp;&amp; AVIType&lt; =8)</p>    <p>gi_AVIType=AVIType;</p>    <p>FormThread=new TFormThread(true);</p>    <p>FormThread- &gt;Priority = tpNormal;</p>    <p>FormThread- &gt;Resume();</p>    <p>}</p>    <p>__declspec(dllexport) int pascal</p>    <p>GetStatus(int ai_CloseWin){</p>    <p>if (gi_Canceled)</p>    <p>if (gi_WindowActive){</p>    <p>gi_RequestClose=1;</p>    <p>while(gi_RequestClose);</p>    <p>}</p>    <p>return gi_Canceled;</p>    <p>}</p>    <p>__declspec(dllexport) int pascal </p>    <p>CloseStatusWindow(){</p>    <p>if (gi_WindowActive){</p>    <p>gi_RequestClose=1;</p>    <p>while(gi_RequestClose);</p>    <p>}</p>    <p>return gi_Canceled;</p>    <p>}</p>    <p>2.窗体StatusForm的代码:</p>    <p>TStatusForm *StatusForm;</p>    <p>//-----------------------------------</p>    <p>extern int gi_Canceled;</p>    <p>extern int gi_AVIType;</p>    <p>extern TCommonAVI g_CommonAVI[];</p>    <p>__fastcall TStatusForm::</p>    <p>TStatusForm(HWND ParentWindow)</p>    <p>: TForm(ParentWindow)</p>    <p>{</p>    <p>gi_Canceled=0;</p>    <p>}</p>    <p>//-----------------------------------</p>    <p>//取消按钮并不直接关闭窗体,</p>    <p>而指示设置取消标志,供调用者查看</p>    <p>void __fastcall TStatusForm::</p>    <p>Button_CancelClick(TObject *Sender)</p>    <p>{</p>    <p>gi_Canceled=1;</p>    <p>// ModalResult=mrCancel;</p>    <p>}</p>    <p>//-----------------------------------</p>    <p>// 激活动画,在FORMCREATE事件中</p>    <p>void __fastcall TStatusForm::</p>    <p>FormCreate(TObject *Sender)</p>    <p>{</p>    <p>Animate1- &gt;CommonAVI=g_CommonAVI[gi_AVIType];</p>    <p>Animate1- &gt;Active = true;</p>    <p>}</p>    <p>//-----------------------------------</p>    <p>extern int gi_RequestClose;</p>    <p>// 定时器事件检测到结束标志关闭窗体</p>    <p>void __fastcall TStatusForm::</p>    <p>Timer1Timer(TObject *Sender)</p>    <p>{</p>    <p>if (gi_RequestClose){</p>    <p>ModalResult=mrOk;</p>    <p>}</p>    <p>}</p>    <p>//-----------------------------------</p>    <p>---- (5) 设置编译选项:Project-&gt;Options打开Project Options对话框,清除Linker属性页中的Use     Dynamic RTL标志,清除Packages属性页中的Build with runtime packages。这样只要单个DLL就可以运行了,而不必安装一些动态连接运行时间库。使用动画DLL     </p>    <p>---- 上面编译出DLL可以由其它任何开发语言调用,下面给出在PB中的使用方法。     </p>    <p>---- (1) 定义: </p>    <p>//Declare - &gt; Global External Functions</p>    <p>FUNCTION Long ShowStatusWindow(Long</p>    <p>AVIType,String WinTitle,long hWnd) &amp;</p>    <p>LIBRARY &quot;STATWIN.DLL&quot; ALIAS FOR &quot;ShowStatusWindow&quot;</p>    <p>FUNCTION Long GetCancelStatus(Long CloseWindow) &amp;</p>    <p>LIBRARY &quot;STATWIN.DLL&quot; ALIAS FOR &quot;GetStatus&quot;</p>    <p>FUNCTION Long CloseStatusWindow() &amp;</p>    <p>LIBRARY &quot;STATWIN.DLL&quot; ALIAS FOR &quot;CloseStatusWindow&quot;</p>    <p>---- (2) 调用: </p>    <p>long ll_EndTime</p>    <p>//显示查找文件夹动画</p>    <p>ShowStatusWindow(2)</p>    <p>setpointer(HourGlass!)</p>    <p>ll_EndTime = Cpu() + 10 * 1000</p>    <p>DO</p>    <p>if GetCancelStatus(0)=1 then</p>    <p>exit</p>    <p>end if</p>    <p>// 做想做的事情</p>    <p>LOOP UNTIL cpu() &gt; ll_EndTime</p>    <p>CloseStatusWindow()</p>    <p></font> </td>    <td align="middle" vAlign="top" width="10"><p class="content4"><span class="font"></span></td>    <td align="middle" bgColor="#fff1c0" vAlign="top" width="140"><table border="0" width="100%" cellspacing="1" cellpadding="0">      <tr>        <td width="100%" align="center" class="content2" valign="middle" bgcolor="#FFF1C8"> <br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(255,255,255); text-decoration: none"></a><a href="http://fun.wangchenyun.net" style="COLOR: rgb(0,0,0); TEXT-DECORATION: none">网星影院</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a style="color: rgb(0,0,0); text-decoration: none" href="http://202.101.18.141/netstar/news/">业界新闻</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a href="http://sales.wangchenyun.net" style="COLOR: rgb(0,0,0); TEXT-DECORATION: none">网星网风</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a href="http://person.dreamer.com.cn/netstar/newsoft/index.htm" style="COLOR: rgb(0,0,0); text-decoration: none">软件速递</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a href="http://person.dreamer.com.cn/netstar/software/software1.htm" style="COLOR: rgb(0,0,0); text-decoration: none">奇软异件</a><br>        <a href="../../software/softuse/H01011-10.htm" style="color: rgb(0,0,0); text-decoration: none">软件宝库</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a href="http://person.dreamer.com.cn/netstar/newfree.htm" style="COLOR: rgb(0,0,0); text-decoration: none">最新免费</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a href="http://202.101.18.141/netstar/game/" style="COLOR: rgb(0,0,0); text-decoration: none">游戏地带</a><br>        <font color="#FFFFFF"><a style="text-decoration: none; color: rgb(0,0,0)" href="../../software/game/H01012-12.htm">游戏下载</a></font><br>        <a style="color: rgb(0,0,0); text-decoration: none" href="../../software/game/H01013-13.htm">游戏天地</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a href="http://202.101.18.141/netstar/hardware/" style="COLOR: rgb(0,0,0); text-decoration: none">硬件传真</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a href="http://www.wangchenyun.net/info/" style="COLOR: rgb(0,0,0); text-decoration: none">网球天地</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a href="http://person.dreamer.com.cn/netstar/pick/pick01.htm" style="COLOR: rgb(0,0,0); text-decoration: none">网星品网</a><br>        <a href="../image/H01015-15.htm" style="color: rgb(0,0,0); text-decoration: none">制图素材</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a href="http://www.wangchenyun.net/others/" style="COLOR: rgb(0,0,0); text-decoration: none">壁纸世界</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a href="http://202.101.18.141/netstar/music/html/down.htm" style="COLOR: rgb(0,0,0); text-decoration: none">中文音乐</a><br>        <a href="http://www.xa.sn.cn/software/software.htm" style="COLOR: rgb(0,0,0); text-decoration: none"></a><a href="http://www.wangchenyun.net/music/" style="COLOR: rgb(0,0,0); text-decoration: none">英文音乐</a></td>      </tr>    </table>    <div align="center"><center><table border="0" cellPadding="0" cellSpacing="0" width="100%"><tbody>      <tr>        <td align="middle" bgColor="#3399FF" height="19" width="100%"><p class="content4" align="center"><font color="#FFFFFF"><span class="font"><span>知名软件搜索引擎</span></span></font></td>      </tr>      <tr>        <td bgColor="#000000" height="1" width="100%"><p class="content4"><span class="font"></span></td>      </tr>      <tr>        <td width="100%"><div align="center"><center><table border="0" cellPadding="0" cellSpacing="0" width="90%"><tbody>          <tr>            <td width="130" bgcolor="#FFF1C8"><p class="content4" align="center"> </p>            <form action="http://hotfiles.zdnet.com/cgi-bin/texis/swlib/hotfiles/search.html" method="post" target="_blank">              <input type="hidden" name="Usrt" value="rel"><input type="hidden" name="Usrchtype" value="simple"><div align="center"><center><p class="content4">ZDNet的软件搜索:<br>              <input maxLength="30" name="Utext" size="10"><br>              <input border="0" name="search" src="../../soft/search.gif" type="image" value="Start Search" WIDTH="36" HEIGHT="17"> </p>              </center></div>            </form>            <form action="http://www.download.com/PC/Result/TitleList/1,2,0-a-0-0-e-1,00.html?st.dl.fd.qs.results" method="post" target="_blank">              <div align="center"><center><p class="content4"><span class="font"><span>DownLoad软件搜索:</span><br>              <input maxLength="60" name="search" size="10"><br>              <input border="0" name="Search" src="../../soft/search.gif" type="image" value="Start Search" WIDTH="36" HEIGHT="17"></span></p>              </center></div>            </form>            <form action="http://clipartconnection.com/search2.php3" method="post" target="_blank">              <div align="center"><center><p class="content4"><span class="font"><span>图片搜索引擎:</span><br>              <input name="SearchText" size="10"><br>              <input border="0" name="I1" src="../../soft/search.gif" type="image" value="Start Search" WIDTH="36" HEIGHT="17"></span></p>              </center></div>            </form>            <a href="http://top.263.net/count/top.dll?Type=sharkpwd&amp;id=2771&amp;ReferID=2771" target="_blank"><p align="center"></a> </p>            <a href="http://best.netease.com/cgi-bin/view/viewbasic.cgi?haiyuan54" target="_blank"><p align="center"></a> </td>          </tr></tbody>        </table>        </center></div></td>      </tr></tbody>    </table>    </center></div></td>  </tr></tbody></table></center></div><hr align="center" SIZE="1" width="700"><p align="center" class="content4"><span><span><font color="#000000">&nbsp; <a style="color: rgb(0,0,0); text-decoration: none" href="../../soft/network/index.htm">互联网络</font><font color="#FFFFFF"> </font></a><font color="#000000">|</span></span><a href="../../soft/system/index.htm" style="color: rgb(0,0,0); text-decoration: none">系统工具</a><span>|<span> <a href="../../soft/tools/index.htm" style="color: rgb(0,0,0); text-decoration: none">实用工具</a> | <a href="../../soft/multimedia/index.htm" style="color: rgb(0,0,0); text-decoration: none">媒体工具</a> | <a href="../../soft/image/index.htm" style="color: rgb(0,0,0); text-decoration: none">图形图像</a> | <a href="../../soft/game/index.htm" style="color: rgb(0,0,0); text-decoration: none">游戏娱乐</a> | </span><a href="../../soft/usesoft/index.htm" style="color: rgb(0,0,0); text-decoration: none">软件<span>使用</a></font><font color="#FFFFFF"> |</font>&nbsp; </span></span></p><hr align="center" SIZE="1" width="700"><font color="#FFE8BB"><p align="center" class="content4"></font><font color="#000000"><span><span>&copy;&nbsp;Copyright 1999 </span></span>陕西公用计算机互联网信息中心<span><span> 版权所有 </font></p></span></span><p align="center" class="content4"><font color="#000000"><span><span>本站制作维护by <a href="mailto:haiyuan54@163.net" style="color: rgb(0,0,0)">HAIYUAN</a></span></span></font></p><p align="center" class="content4"><font color="#000000"><span><span>电话:(029)8371055 8371049 联系信箱:<a href="mailto:jun@snnic.com">jun@snnic.com</a> </span></span></font></p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -