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

📄 在c++ builder中实现桌布自动更新.htm

📁 我收集的一些C++BUILDER编程用的知识,适合于初学者使用
💻 HTM
📖 第 1 页 / 共 5 页
字号:
                <TD class=tdmenubar>· <A class=menubar 
                  title=".Net&#13;&#10;文章数:2630" 
                  href="http://www.malegebide.com/article/41/" 
                  target=_blank>.Net</A></TD></TR>
              <TR>
                <TD class=tdmenubar>· <A class=menubar 
                  title="网页浏览&#13;&#10;文章数:267" 
                  href="http://www.malegebide.com/article/42/">网页浏览</A></TD>
                <TD class=tdmenubar>· <A class=menubar 
                  title="邮件工具&#13;&#10;文章数:74" 
                  href="http://www.malegebide.com/article/43/" 
                  target=_blank>邮件工具</A></TD></TR>
              <TR>
                <TD class=tdmenubar>· <A class=menubar 
                  title="联络聊天&#13;&#10;文章数:31" 
                  href="http://www.malegebide.com/article/44/" 
                  target=_blank>联络聊天</A></TD>
                <TD class=tdmenubar>· <A class=menubar 
                  title="IP通讯&#13;&#10;文章数:126" 
                  href="http://www.malegebide.com/article/45/" 
                  target=_blank>IP通讯</A></TD></TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD bgColor=#ffffff height=2></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD class=titleback1>热门文章</TD></TR>
        <TR>
          <TD vAlign=top height=100>· <FONT color=#0066ff>[图文]</FONT> <A 
            title=Google再度扩张:收购3D设计软件 
            href="http://www.malegebide.com/article/5/12/2006/200608311537.html">Google再度扩..</A><BR>· 
            <A title=Google究竟知道多少个人隐私? 
            href="http://www.malegebide.com/article/5/11/2006/200608301361.html">Google究竟知道多少..</A><BR>· 
            <A title="Google搜索从入门到精通 (1)" 
            href="http://www.malegebide.com/article/5/11/2006/200608301351.html">Google搜索从入门到..</A><BR>· 
            <FONT color=#0066ff>[图文]</FONT> <A title=google也来做统计了 
            href="http://www.malegebide.com/article/5/12/2006/200608311519.html">google也来做..</A><BR>· 
            <FONT color=#ff0066>[组图]</FONT> <A title=Google徽标全集(1998-2005) 
            href="http://www.malegebide.com/article/5/12/2006/200608311488.html">Google徽标全..</A><BR>· 
            <FONT color=#0066ff>[图文]</FONT> <A title=有趣的Google新鲜技巧玩法 
            href="http://www.malegebide.com/article/5/11/2006/200608301352.html">有趣的Google..</A><BR>· 
            <A title=Google排名—搜索引擎登记技巧 
            href="http://www.malegebide.com/article/5/11/2006/200608301360.html">Google排名—搜索引..</A><BR>· 
            <FONT color=#0066ff>[图文]</FONT> <A title=菜鸟安全防患之饿死木马 
            href="http://www.malegebide.com/article/10/2006/200608291188.html">菜鸟安全防患..</A><BR>· 
            <A title=数学最大数字 
            href="http://www.malegebide.com/article/9/2006/20060827361.html">数学最大数字</A><BR>· 
            <A title=Google搜索技巧(6):用Google找自己 
            href="http://www.malegebide.com/article/10/2006/200608291195.html">Google搜索技巧(6):..</A><BR></TD></TR>
        <TR>
          <TD bgColor=#ffffff height=2></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD class=titleback1>相关文章</TD></TR>
        <TR>
          <TD vAlign=top height=100>· <A title="如何在C++ Builder的DLL中使用数据库控件" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518470.html">如何在C++ 
            Builder的..</A><BR>· <A title=在C++中创建持久对象 
            href="http://www.malegebide.com/article/1/14/2006/2006092518380.html">在C++中创建持久对象..</A><BR>· 
            <A title=在C++中实现变长数组 
            href="http://www.malegebide.com/article/1/14/2006/2006092518365.html">在C++中实现变长数组..</A><BR>· 
            <A title="在C++ Builder中用socket api来写网络通讯程序(同时支持TCP和UDP协议)" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518296.html">在C++ 
            Builder中用s..</A><BR>· <A title="在C++Builder中创建Access odbc数据源" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518290.html">在C++Builder中创建..</A><BR>· 
            <FONT color=#0066ff>[图文]</FONT> <A 
            title="在C++ Builder6上使用Boost正则表达式库" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518288.html">在C++ 
            Builde..</A><BR>· <A title="在C++中实现“属性 (Property)”" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518266.html">在C++中实现“属性 
            ..</A><BR>· <A title=在C++中实现属性 
            href="http://www.malegebide.com/article/1/14/2006/2006092518250.html">在C++中实现属性</A><BR>· 
            <FONT color=#0066ff>[图文]</FONT> <A title="在C++ Builder6中使用XML" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518249.html">在C++ 
            Builde..</A><BR>· <A 
            title="在C++ Builder中如何通过对象名称来访问到该对象呢?答案就是使用MAP容器。" 
            href="http://www.malegebide.com/article/1/14/2006/2006092518231.html">在C++ 
            Builder中如何..</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>在C++ Builder中实现桌布自动更新</TD></TR>
        <TR>
          <TD align=middle bgColor=#f7f7f7 
            height=25>作者:佚名&nbsp;&nbsp;来源:不详&nbsp;&nbsp;发布时间:25/09/2006 
            19:57:06&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="在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="在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"><FONT 
            size=3><SPAN 
            style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" 
            align=center><SPAN><o:p></o:p></SPAN>&nbsp;</P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">在</SPAN><SPAN 
            lang=EN-US><FONT face="Times New Roman">C++ 
            Builder</FONT></SPAN><SPAN 
            style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">中要实现桌布的自动更换功能,我认为主要两个关键点,其一既然要“自动”</SPAN><SPAN 
            style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">那就免不了要用到定时器,我们可以用</SPAN><SPAN 
            lang=EN-US><FONT face="Times New Roman">Timer</FONT></SPAN><SPAN 
            style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">这个组件来完成,这个还好解决,第二个问题可能比较麻烦了,我们如何来设置桌布,好像</SPAN><SPAN 
            lang=EN-US><FONT 
            face="Times New Roman">BCB</FONT></SPAN><SPAN>中并没有提供什么组件,那我们也就只好自力更生了,虽说本人只是一只菜鸟,但这个问题还是难不了我,它主要是用到了<FONT 
            face="Times New Roman">SystemParametersInfo</FONT></SPAN><SPAN 
            lang=EN-US><FONT face="Times New Roman"> </FONT></SPAN><SPAN 
            style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">这个</SPAN><SPAN 
            lang=EN-US><FONT face="Times New Roman"><A class=wordstyle 
            href="http://www.malegebide.com/" target=_blank>Windows</A> 
            API</FONT></SPAN><SPAN 
            style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">函数,它的声明如下:</SPAN></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><CODE><SPAN 
            lang=EN-US><FONT size=2>BOOL 
            SystemParametersInfo(<o:p></o:p></FONT></SPAN></CODE></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><CODE><SPAN 
            lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 黑体"><SPAN 
            style="mso-spacerun: yes">&nbsp; 
            </SPAN>UINT</SPAN></CODE><CODE><I><SPAN lang=EN-US 
            style="FONT-SIZE: 10pt; FONT-FAMILY: 黑体"> 
            uiAction</SPAN></I></CODE><CODE><SPAN lang=EN-US 
            style="FONT-SIZE: 10pt; FONT-FAMILY: 黑体">, </SPAN></CODE><CODE><SPAN 
            lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 黑体">// system 
            parameter to query or set<o:p></o:p></SPAN></CODE></P><PRE><CODE><FONT size=2><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>UINT</SPAN><I><SPAN lang=EN-US> uiParam</SPAN></I><SPAN>,<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>// depends on action to be taken<o:p></o:p></SPAN></FONT></CODE></PRE><PRE><CODE><FONT size=2><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>PVOID</SPAN><I><SPAN lang=EN-US> pvParam</SPAN></I><SPAN>, // depends on action to be taken<o:p></o:p></SPAN></FONT></CODE></PRE><PRE><CODE><FONT size=2><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>UINT</SPAN><I><SPAN lang=EN-US> fWinIni</SPAN></I><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>// user profile update flag<o:p></o:p></SPAN></FONT></CODE></PRE><PRE><CODE><SPAN lang=EN-US><FONT size=2>);<o:p></o:p></FONT></SPAN></CODE></PRE><PRE><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">它是一个非常重量级的函数,主要用来设置或获得系统范围上的相关参数</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-fareast-font-family: 宋体">(</SPAN><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">如:我</SPAN></PRE><PRE><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">正在介绍的“如何设置桌布”,还有如:系统字体,屏幕分辨率等</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-fareast-font-family: 宋体">)</SPAN><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">,其实光从字</SPAN></PRE><PRE><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">面上也能大概知道它的作用。</SPAN><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">如果只是简单的调用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-fareast-font-family: 宋体">SystemParametersInfo</SPAN><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">函数的话,</SPAN></PRE><PRE><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">问题就变得简单多了,但你要总不能只使用默认的桌布样式,所以在设置桌布之</SPAN></PRE><PRE><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">前还应先设置好桌布的样式,比如:桌布的显示位置,是否填满桌面等,然后在</SPAN></PRE><PRE><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">调用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-fareast-font-family: 宋体">SystemParametersInfo</SPAN><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">函数,这个函数会根据注册表里的桌布样式设置情况来</SPAN></PRE><PRE><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">设置实际的桌布样式。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-fareast-font-family: 宋体"><o:p></o:p></SPAN></PRE><PRE><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-fareast-font-family: 宋体"><o:p></o:p></SPAN></PRE><PRE><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">与桌布样式有关的注册表设定:(位于</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-fareast-font-family: 宋体">HKEY_CURRENT_USER\Control Panel\Desktop</SPAN><SPAN style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: ''''Times New Roman''''">键)</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; COLOR: windowtext; FONT-FAMILY: ''''Times New Roman''''; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-fareast-font-family: 宋体"><o:p></o:p></SPAN></PRE>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center>
            <TABLE 
            style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt" 
            cellSpacing=0 cellPadding=0 border=1>
              <TBODY>
              <TR>
                <TD 
                style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 104.4pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" 
                vAlign=top width=139>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
                  style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''"><FONT 
                  color=#000000 size=3>键名</FONT></SPAN></P></TD>
                <TD 
                style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #d4d0c8; WIDTH: 321.7pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; mso-border-left-alt: solid windowtext .5pt" 
                vAlign=top width=429>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 

⌨️ 快捷键说明

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