<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" >
  <channel>
  <title>memomemomemo</title>
  <link>https://memomemomemo.blog.shinobi.jp/</link>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="https://memomemomemo.blog.shinobi.jp/RSS/" />
  <description>memo</description>
  <lastBuildDate>Fri, 08 Dec 2006 01:18:36 GMT</lastBuildDate>
  <language>ja</language>
  <copyright>© Ninja Tools Inc.</copyright>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" />

    <item>
    <title>CStatic等で枠線の色・太さを変更するには</title>
    <description>
    <![CDATA[<p>標準の関数では変更出来ないようなので、自力で描画する。<br />
下記の例はCxxxDialog上のに枠線を描画する。<br />
<br />
<font color="#0000ff">#define DEFAULT_LINE_WIDTH&nbsp;(2)&nbsp;&nbsp;&nbsp;// 線の太さ<br />
CxxxDialog::OnPaint()<br />
{<br />
<br />
&nbsp;&nbsp;&nbsp; // 描画する線の色を作成<br />
&nbsp;&nbsp;&nbsp; cBrush.CreateSolidBrush(WHITE);</font></p>
<p><font color="#0000ff">&nbsp;&nbsp;&nbsp; pStatic = (CColorStatic*)GetDlgItem(IDC_STATIC);<br />
&nbsp;&nbsp;&nbsp; pStatic-&gt;GetWindowRect(&amp;tRect);<br />
&nbsp;&nbsp;&nbsp; this-&gt;ScreenToClient(&amp;tRect);<br />
&nbsp;&nbsp;&nbsp; cRgn.CreateRectRgn(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tRect.left - DEFAULT_LINE_WIDTH,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tRect.top - DEFAULT_LINE_WIDTH,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tRect.right + DEFAULT_LINE_WIDTH,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tRect.bottom + DEFAULT_LINE_WIDTH);<br />
<br />
&nbsp;&nbsp;&nbsp; // 枠線の描画<br />
&nbsp;&nbsp;&nbsp; dc.FrameRgn(&amp;cRgn, &amp;cBrush, DEFAULT_LINE_WIDTH, DEFAULT_LINE_WIDTH);<br />
<br />
&nbsp;&nbsp;&nbsp; cRgn.DeleteObject();<br />
&nbsp;&nbsp;&nbsp; // ブラシの解放<br />
&nbsp;&nbsp;&nbsp; cBrush.DeleteObject();<br />
(省略)<br />
}</font></p>]]>
    </description>
    <category>VisualC</category>
    <link>https://memomemomemo.blog.shinobi.jp/visualc/cstatic%E7%AD%89%E3%81%A7%E6%9E%A0%E7%B7%9A%E3%81%AE%E8%89%B2%E3%83%BB%E5%A4%AA%E3%81%95%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF</link>
    <pubDate>Fri, 08 Dec 2006 01:18:36 GMT</pubDate>
    <guid isPermaLink="false">memomemomemo.blog.shinobi.jp://entry/1</guid>
  </item>

    </channel>
</rss>