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

📄 borland c++builder资源文件编辑.htm

📁 我收集的一些C++BUILDER编程用的知识,适合于初学者使用
💻 HTM
📖 第 1 页 / 共 3 页
字号:
            Rob..</A><BR>· <A title="考虑继承,a tip about 《Inside VCL》" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518437.html">考虑继承,a 
            tip ab..</A><BR>· <A 
            title="the boost c++ metaprogramming:boost c++ 模板元编程(3)" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518408.html">the 
            boost c++ meta..</A><BR>· <A 
            title="the boost c++ metaprogramming:boost c++ 模板元编程(2)" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518404.html">the 
            boost c++ meta..</A><BR>· <A 
            title="the boost c++ metaprogramming:boost c++ 模板元编程(1)" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518397.html">the 
            boost c++ meta..</A><BR>· <FONT color=#0066ff>[图文]</FONT> <A 
            title="在 Borland C++BuilderX for Windows 中进行 GTK+ 编程" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518390.html">在 
            Borland C..</A><BR>· <A title="Beman Dawes-Boost-20031104-C++标准委员会" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518359.html">Beman 
            Dawes-Boost-..</A><BR>· <A title="关于Borland C++BuilderX的一些问题的回答" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518350.html">关于Borland 
            C++Bui..</A><BR>· <A 
            title="2003-09-15 Borland发布Borland&amp;reg; C++BuilderX&amp;reg;与 Borland&amp;reg; Enterprise Studio for C++" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518349.html">2003-09-15 
            Borland..</A><BR>· <FONT color=#0066ff>[图文]</FONT> <A 
            title="C++ Boost 之Python(一个简单的例子)" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518321.html">C++ 
            Boost 之..</A><BR></TD></TR></TBODY></TABLE></TD>
    <TD class=tableright align=right width=588>
      <TABLE style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all" cellSpacing=0 
      cellPadding=0 width=575 border=0>
        <TBODY>
        <TR>
          <TD style="FONT-SIZE: 12pt; COLOR: #ff6600" align=middle 
            height=32>Borland C++builder资源文件编辑</TD></TR>
        <TR>
          <TD align=middle bgColor=#f7f7f7 
            height=25>作者:佚名&nbsp;&nbsp;来源:不详&nbsp;&nbsp;发布时间:25/09/2006 
            20:03:13&nbsp;&nbsp;发布人:admin</TD></TR>
        <SCRIPT language=javascript>
var newasp_fontsize=9;
var newasp_lineheight=12;
</SCRIPT>

        <TR>
          <TD>
            <P align=right><A title=减小字体 
            style="CURSOR: hand; POSITION: relative" 
            onclick='if(newasp_fontsize>8){NewaspContentLabel.style.fontSize=(--newasp_fontsize)+"pt";NewaspContentLabel.style.lineHeight=(--newasp_lineheight)+"pt";}'><IMG 
            height=15 src="Borland C++builder资源文件编辑.files/1.gif" width=15 
            border=0><FONT color=#ff6600>减小字体</FONT></A> <A title=增大字体 
            style="CURSOR: hand; POSITION: relative" 
            onclick='if(newasp_fontsize<64){NewaspContentLabel.style.fontSize=(++newasp_fontsize)+"pt";NewaspContentLabel.style.lineHeight=(++newasp_lineheight)+"pt";}'><IMG 
            height=15 src="Borland C++builder资源文件编辑.files/2.gif" width=15 
            border=0><FONT color=#ff6600>增大字体</FONT></A> </P>
            <DIV class=ContentFont id=NewaspContentLabel 
            style="PADDING-RIGHT: 10px; DISPLAY: block; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"><FONT 
            id=font_word 
            style="FONT-SIZE: 14px; FONT-FAMILY: 宋体, Verdana, Arial, Helvetica, sans-serif"><SPAN 
            class=postbody>Borland C++builder资源文件编辑 <BR>1 建立 现在从borland 
            c++builder -&gt;tools-&gt;Image Editor <BR>Image 
            Editor-&gt;File-&gt;New-&gt;Resource <BR>在菜单中会出现resource 
            从new中选择资源分类有 bitmap icon cursor <BR>若选择了bitmap 
            会出现选择位图的颜色和大小如果是从外部位图的话就要知道它的大小 其下会出现bitmap1 它就是位图文件名 选中他单击右键 edit 
            就进入绘图状态可以剪贴板中把外部位图考进来 然后就是保存了 <BR>2在c++builder 中Project-&gt;Add to 
            Project… 装入资源文件 <BR>3使用 a. Graphics::TBitmap *Bitmap; //低颜色 
            <BR>Bitmap=new Graphics::Tbitmap(); 
            <BR>Bitmap-&gt;Handle=LoadBitmap(int(hInstance),”Bitmap1”) 
            <BR>//256种颜色 <BR>b. LoadFromResourceName(int Instance,const 
            AnsiString ResName); <BR>LoadFromResourceID (int Instance,int 
            ResID); <BR>列如: <BR>1 Graphics::TBitmap *Bitmap; <BR>Bitmap=new 
            Graphics::Tbitmap(); <BR>Bitmap-&gt;LoadFromResourceName(int 
            (Hinstance),”picture1”); <BR>2 
            Image1-&gt;Picture-&gt;Bitmap-&gt;LoadFromResourceName(int(HInstance),"Bitmap1"); 
            <BR>注意 大 小 写 int(hInstance) int(HInstance) <BR>手工操作 <BR>选用文本文件输入内容 
            <BR>Bitmap1 BITMAP “ C:\<A class=wordstyle 
            href="http://www.malegebide.com/" 
            target=_blank>windows</A>\bitmap1.bmp” <BR>用brcc32.exe编译成资源文件 
            他在bin目录下 brcc32 –32 testwave.rc =&gt;testwave.res <BR>使用时在单元文件cpp中 # 
            pragma resource “D:\\cbuilder\\picture.RES” <BR>TForm1 *Form1; 
            <BR>注意 <BR>test.rc是一个纯文本文件,<FONT 
            id=ilewnhvkplfuwtgqd>B育2{网oSIe`n='WJ育e</FONT>
            <DIV id=dajwsupwvgbampmhld>m`6RK"?gB育S##tn专dU</DIV>可用写字板建立, 
            <BR>但存盘时,文件名上要加上双引号即成 "test.rc", <BR>否则会变成 wave.rc.txt 
            <BR>这种办法可把声音文件加到你的.exe中: <BR>1.建立纯文本资源文件如wave.rc,内容如下: <BR>ID_WAVE 
            WAVE "C:\testwave.wav" <BR><BR>2.BCB中用Project-&gt;Add to Project 
            将test.rc <BR>添加到你的工程中(即你的程序中); <BR>3.在程序中: <BR></SPAN>
            <TABLE cellSpacing=1 cellPadding=3 width="90%" align=center 
border=0>
              <TBODY>
              <TR>
                <TD><SPAN class=genmed><B>代码:</B></SPAN></TD></TR>
              <TR>
                <TD class=code>#include "mmsystem.h" 
                  <BR>PlaySound("ID_WAVE",HInstance, SND_RESOURCE); 
                  <BR><BR>Playsound( ) &amp;&amp; rc 
                  <BR><BR><BR>//--------------------------------------------------------------------------- 
                  <BR>void __fastcall TForm1::FromFileClick(TObject *Sender) 
                  <BR>{ <BR>&nbsp; PlaySound("mail.wav", NULL, SND_FILENAME); 
                  <BR>} 
                  <BR>//--------------------------------------------------------------------------- 
                  <BR>void __fastcall TForm1::FromFileMemoryClick(TObject 
                  *Sender) <BR>{ <BR>&nbsp; TFileStream *WaveFile = new 
                  TFileStream("mail.wav", fmOpenRead); <BR>&nbsp; BYTE&nbsp; 
                  &nbsp; &nbsp; &nbsp; *wavemem&nbsp; &nbsp;= new 
                  BYTE[WaveFile-&gt;Size + 1]; <BR><BR>&nbsp; 
                  WaveFile-&gt;Read(wavemem, WaveFile-&gt;Size); <BR><BR>&nbsp; 
                  PlaySound(wavemem, NULL, SND_MEMORY); <BR><BR>&nbsp; delete[] 
                  wavemem; <BR>&nbsp; delete WaveFile; <BR>} 
                  <BR>//--------------------------------------------------------------------------- 
                  <BR>void __fastcall TForm1::FromResourceClick(TObject *Sender) 
                  <BR>{ <BR>&nbsp; PlaySound("MAIL", HInstance, SND_RESOURCE); 
                  <BR>} 
                  <BR>//--------------------------------------------------------------------------- 
                  <BR>void __fastcall TForm1::FromResourceMemoryClick(TObject 
                  *Sender)//res 可以 参数一是名称,参数二是类型名称 也就是RC中的 testwave&nbsp; 
                  WAVE&nbsp; &nbsp;“ c:\testwave.wav” 可以是WAV ,WAV_DATA 任意的 <BR>{ 
                  <BR>&nbsp; HANDLE ResHandle; <BR>&nbsp; BYTE *WavData; 
                  <BR><BR>&nbsp; ResHandle = FindResource(HInstance, "MAIL", 
                  "WAVE"); <BR>&nbsp; ResHandle = LoadResource(HInstance, 
                  ResHandle); <BR>&nbsp; WavData = (unsigned char 
                  *)LockResource(ResHandle); <BR><BR>&nbsp; PlaySound(WavData, 
                  NULL, SND_MEMORY); <BR><BR>&nbsp; FreeResource(ResHandle); 
                  <BR>} <BR><BR>如何把资源文件的文本读入到一个变量? <BR><BR>TResourceStream 
                  *rs=new TResourceStream((int)HInstance,"mydata","txt"); 
                  <BR>TStringList *ss=new TStringList; 
                  <BR>ss-&gt;LoadFromStream(rs); <BR>delete 
            rs;</TD></TR></TBODY></TABLE><SPAN 
            class=postbody><BR>如何调用资源文件中res的jpeg、avi,wav,midi,mp3文件 
            <BR><BR>Image中加入jpg可以用如下方法: <BR>在文件头加入#include &lt;jpeg.hpp&gt; 
            <BR>在构造函数中加入 <BR>Image1-&gt;LoadFromResourceName(0, "JPEG");//你的资源名 
            <BR><BR>Animate中加入avi可能也能用这种办法,<SPAN 
            id=urhwkdipoprrp>_中(nxUe@=bo7T</SPAN><FONT 
            id=hbuwghdghheowjnlch>Y6R育j-zsw^网S'垠软"51</FONT>
            <P 
            id=mjgqeipqvoeamvqkac>U&amp;TL~GaTce+yijjy软h</P>不过没试过</SPAN></SPAN></SPAN> 

            <DIV class=Message id=Message></DIV></FONT></DIV>
            <DIV></DIV></TD></TR>
        <TR>
          <TD 
          style="PADDING-RIGHT: 10px; DISPLAY: block; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px" 
          align=right bgColor=#f7f7f7 height=25>[
            <SCRIPT language=JavaScript 
            src="Borland C++builder资源文件编辑.files/Hits.htm"></SCRIPT>
            ] [<A href="javascript:history.go(-1)">返回上一页</A>] [<A 
            href="javascript:window.print()">打 印</A>] [<A 
            href="http://www.malegebide.com/user/favorite.asp?action=add&amp;topic=Borland C++builder资源文件编辑">收 
            藏</A>]</TD></TR>
        <TR>
          <TD 
          style="PADDING-RIGHT: 10px; DISPLAY: block; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px">
            <DIV>上一篇文章:<A 
            href="http://www.malegebide.com/article/1/14/2006/2006092518477.html">一个有意思的C++ 
            trick (2)</A></DIV>
            <DIV>下一篇文章:<A 
            href="http://www.malegebide.com/article/1/14/2006/2006092518479.html">成员函数指针与高性能的C++委托(中篇)</A></DIV></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width=575 border=0>
        <TBODY>
        <TR>
          <TD class=titlebg1>∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [<A 
            href="http://www.malegebide.com/article/comment.asp?ArticleID=18478" 
            target=_blank>更多评论</A>…]</TD></TR>
        <TR vAlign=top>
          <TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!-- 页面底部开始 -->
<TABLE class=tableborder cellSpacing=0 cellPadding=0 width=778 align=center 
border=0>
  <TBODY>
  <TR>
    <TD height=5></TD></TR>
  <TR>
    <TD class=linebar height=8></TD></TR>
  <TR>
    <TD height=5></TD></TR>
  <TR>
    <TD class=tablebody align=middle height=65>QQ:310646 <A class=navmenu 
      href="http://www.malegebide.com/admin/admin_login.asp" target=_blank>A</A> 
      Copyright &copy; 2006 <FONT face=Verdana, sans-serif Helvetica, 
      Arial,><B>Malegebide.Com</B></FONT>.
      <SCRIPT language=javascript src="Borland C++builder资源文件编辑.files/529370.js" 
      type=text/javascript></SCRIPT>
       No Rights Reserved <BR></TD></TR>
  <TR>
    <TD height=5></TD></TR></TBODY></TABLE>
<SCRIPT language=javascript 
src="Borland C++builder资源文件编辑.files/Std_StranJF.Js"></SCRIPT>
<!-- 页面底部结束 -->
<SCRIPT src="Borland C++builder资源文件编辑.files/count.htm" 
type=text/javascript></SCRIPT>
</BODY></HTML>
                                                                                              

⌨️ 快捷键说明

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