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

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

📁 我收集的一些C++BUILDER编程用的知识,适合于初学者使用
💻 HTM
📖 第 1 页 / 共 5 页
字号:
                  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></TR>
              <TR>
                <TD 
                style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: #d4d0c8; 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; mso-border-top-alt: solid windowtext .5pt" 
                vAlign=top width=139>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
                  lang=EN-US><FONT face="Times New Roman" color=#000000 
                  size=3>WallPaper</FONT></SPAN></P></TD>
                <TD 
                style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: #d4d0c8; 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; mso-border-top-alt: solid windowtext .5pt" 
                vAlign=top width=429>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT 
                  size=3><FONT color=#000000><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">BMP</FONT></SPAN><SPAN 
                  style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">格式的位图</SPAN></FONT></FONT></P></TD></TR>
              <TR>
                <TD 
                style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: #d4d0c8; 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; mso-border-top-alt: solid windowtext .5pt" 
                vAlign=top width=139>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
                  lang=EN-US><FONT face="Times New Roman" color=#000000 
                  size=3>WallPaperStyle</FONT></SPAN></P></TD>
                <TD 
                style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: #d4d0c8; 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; mso-border-top-alt: solid windowtext .5pt" 
                vAlign=top width=429>
                  <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>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT 
                  size=3><FONT color=#000000><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">0</FONT></SPAN><SPAN 
                  style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">,桌布将以原始尺寸显示在桌面中央</SPAN></FONT></FONT></P>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT 
                  size=3><FONT color=#000000><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">1</FONT></SPAN><SPAN 
                  style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">,桌布将填满桌面</SPAN></FONT></FONT></P>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT 
                  size=3><FONT color=#000000><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">2</FONT></SPAN><SPAN 
                  style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">,将桌布放大的画面大小,图像有可能失真</SPAN></FONT></FONT></P></TD></TR>
              <TR>
                <TD 
                style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: #d4d0c8; 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; mso-border-top-alt: solid windowtext .5pt" 
                vAlign=top width=139>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
                  lang=EN-US><FONT face="Times New Roman" color=#000000 
                  size=3>WallPaperOriginX</FONT></SPAN></P></TD>
                <TD 
                style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: #d4d0c8; 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; mso-border-top-alt: solid windowtext .5pt" 
                vAlign=top width=429>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT 
                  size=3><FONT color=#000000><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">WallPaperStyle</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">0</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">X</FONT></SPAN><SPAN 
                  style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">轴坐标</SPAN></FONT></FONT></P></TD></TR>
              <TR>
                <TD 
                style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: #d4d0c8; 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; mso-border-top-alt: solid windowtext .5pt" 
                vAlign=top width=139>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
                  lang=EN-US><FONT face="Times New Roman" color=#000000 
                  size=3>WallPaperOriginY</FONT></SPAN></P></TD>
                <TD 
                style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: #d4d0c8; 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; mso-border-top-alt: solid windowtext .5pt" 
                vAlign=top width=429>
                  <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT 
                  size=3><FONT color=#000000><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">WallPaperStyle</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">0</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">Y</FONT></SPAN><SPAN 
                  style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">轴坐标</SPAN></FONT></FONT></P></TD></TR></TBODY></TABLE></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT 
            face="Times New Roman">&nbsp;<o:p></o:p></FONT></SPAN></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></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">TileWallpaper</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">TileWallpaper</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">1</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">0,</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">WallPaperStyle</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"><SPAN 
            lang=EN-US><FONT 
            face="Times New Roman">&nbsp;<o:p></o:p></FONT></SPAN></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></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT 
            face="Times New Roman">&nbsp;<o:p></o:p></FONT></SPAN></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT face="Times New Roman">#include 
            &lt;Registry.hpp&gt;</FONT></SPAN></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT face="Times New Roman"><SPAN 
            style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            </SPAN>//</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">,</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"><SPAN 
            lang=EN-US><FONT face="Times New Roman"><SPAN 
            style="mso-spacerun: yes">&nbsp; </SPAN>TRegistry *Registry = new 
            TRegistry;</FONT></SPAN></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT face="Times New Roman"><SPAN 
            style="mso-spacerun: yes">&nbsp; </SPAN>try</FONT></SPAN></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT face="Times New Roman"><SPAN 
            style="mso-spacerun: yes">&nbsp; </SPAN>{</FONT></SPAN></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT face="Times New Roman"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; 
            </SPAN>Registry-&gt;OpenKey(“\\Control Panel\\Desktop”,false); 
            </FONT></SPAN></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT face="Times New Roman"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><SPAN 
            style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            </SPAN>Registry-&gt;WriteString("TileWallpaper","0");</FONT></SPAN></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT face="Times New Roman"><SPAN 
            style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            </SPAN>//</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"><SPAN 
            lang=EN-US><FONT 
            face="Times New Roman">Registry-&gt;WriteString("WallpaperStyle",wallStyle);</FONT></SPAN></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT face="Times New Roman"><SPAN 
            style="mso-spacerun: yes">&nbsp; </SPAN>}</FONT></SPAN></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT face="Times New Roman"><SPAN 
            style="mso-spacerun: yes">&nbsp; </SPAN>__finally</FONT></SPAN></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
            lang=EN-US><FONT face="Times New Roman"><SPAN 

⌨️ 快捷键说明

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