📄 01_9_13_6.asp.html
字号:
CPaintDC de (this) // device context for painting. </td></tr></table><table width=100% ><tr><td class=a14>
//draw ellipse with out any border </td></tr></table><table width=100% ><tr><td class=a14>
dc. SelecStockObject (NULL_PEN) </td></tr></table><table width=100% ><tr><td class=a14>
//get the RGB colour components of the sphere color </td></tr></table><table width=100% ><tr><td class=a14>
COLORREF color= RGB( 0 , 0 , 255) </td></tr></table><table width=100% ><tr><td class=a14>
BYTE byRed =GetRValue (color) </td></tr></table><table width=100% ><tr><td class=a14>
BYTE byGreen = GetGValue (color) </td></tr></table><table width=100% ><tr><td class=a14>
BYTE byBlue = GetBValue (color) </td></tr></table><table width=100% ><tr><td class=a14>
// get the size of the view window Crect </td></tr></table><table width=100% ><tr><td class=a14>
rect GetClientRect (rect) </td></tr></table><table width=100% ><tr><td class=a14>
// get minimun number of units </td></tr></table><table width=100% ><tr><td class=a14>
int nUnits =min (rect.right , rect.bottom ) </td></tr></table><table width=100% ><tr><td class=a14>
//calculate he horiaontal and vertical step size </td></tr></table><table width=100% ><tr><td class=a14>
float fltStepHorz = (float) rect.right /nUnits </td></tr></table><table width=100% ><tr><td class=a14>
float fltStepVert = (float) rect.bottom /nUnits </td></tr></table><table width=100% ><tr><td class=a14>
int nEllipse = nUnits/3 // calculate how many todraw int nIndex </td></tr></table><table width=100% ><tr><td class=a14>
// current ellipse that is being draw </td></tr></table><table width=100% ><tr><td class=a14>
CBrush brush </td></tr></table><table width=100% ><tr><td class=a14>
// bursh used for ellipse fill color </td></tr></table><table width=100% ><tr><td class=a14>
CBrush *pBrushOld // previous brush that was selected into dc </td></tr></table><table width=100% ><tr><td class=a14>
//draw ellipse , gradually moving towards upper-rightcorner </td></tr></table><table width=100% ><tr><td class=a14>
for (nIndex = 0 nIndes < + nEllipse nIndes++) </td></tr></table><table width=100% ><tr><td class=a14>
{ //creat solid brush brush . </td></tr></table><table width=100% ><tr><td class=a14>
CreatSolidBrush (RGB ( ( (nIndex*byRed ) /nEllipse ). </td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
( ( nIndex * byGreen ) /nEllipse ), ( (nIndex*byBlue)/nEllipse ) ) ) </td></tr></table><table width=100% ><tr><td class=a14>
//select brush into dc </td></tr></table><table width=100% ><tr><td class=a14>
pBrushOld= dc .SelectObject (&brhsh) </td></tr></table><table width=100% ><tr><td class=a14>
//draw ellipse </td></tr></table><table width=100% ><tr><td class=a14>
dc .Ellipse ( (int) fltStepHorz * 2, (int)fltStepVert * nIndex , </td></tr></table><table width=100% ><tr><td class=a14>
rect. right -( (int)fltStepHorz * nIndex )+ 1, rect . bottom -( (int) </td></tr></table><table width=100% ><tr><td class=a14>
fltStepVert * (nIndex *2) ) +1) </td></tr></table><table width=100% ><tr><td class=a14>
//delete the brush </td></tr></table><table width=100% ><tr><td class=a14>
brush.DelecteObject ( ) </td></tr></table><table width=100% ><tr><td class=a14>
} } </td></tr></table><table width=100% ><tr><td class=a14>
最后,处理WM_NCHITTEST消息,使当击打窗口的任何位置时能移动窗口。 </td></tr></table><table width=100% ><tr><td class=a14>
UINT CRoundDlg : : OnNchitTest (Cpoint point ) </td></tr></table><table width=100% ><tr><td class=a14>
{ </td></tr></table><table width=100% ><tr><td class=a14>
//Let user move window by clickign anywhere on thewindow . </td></tr></table><table width=100% ><tr><td class=a14>
UINT nHitTest = CDialog : : OnNcHitTest (point) </td></tr></table><table width=100% ><tr><td class=a14>
rerurn (nHitTest = = HTCLIENT)? HTCAPTION: nHitTest </td></tr></table><table width=100% ><tr><td class=a14>
} </td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr>
</table><br>
<style>.a1{font-size:1}</style>
<table width=100% ><tr><td align=right>(网页编辑:<a href='mailto:liu_yang@ccw.com.cn'>风之翼</a>)</td></tr></table>
</td><td class=a1 bgcolor=#f46240> </td>
<td valign=top width=138 align=right><table width=98% ><tr><td>
<form action='/app/gsearch1.asp' name=pdn><table width=100% ><tr><td>应用与方案
频道全文检索</td></tr>
<tr><td><input type="text" name="textfile" size=15 value=频道内检索 onfocus="this.value=''">
<input border=0 src="../../../../../images/jian.gif" name="I1" type="image" align=absmiddle>
</td></tr>
</table>
</form>
<form name=srch action="/search/which.asp" method=post onsubmit="JavaScript:return chk()">
<table width=100% >
<tr><td><select size="1" name="func">
<option selected value="2">主题检索</option>
<option value="1">周报全文检索</option>
<option value="3">模糊词检索</option>
</select></td></tr>
<tr><td><input type="text" name="SrchStr" size=15 value="输入待检索的词"
onfocus="this.value=''">
<input src="../../../../../images/jian.gif" name="I1" type="image" align="absMiddle" border=0>
</td></tr>
</table>
<script language="JavaScript">
function chk()
{if (!document.srch.SrchStr.value){
alert("请输入需检索的词!");
document.srch.SrchStr.focus();
return false;
}
else{if (document.srch.SrchStr.value.length>30){
alert("检索的词请不要超过30个字符!");
document.srch.SrchStr.focus();
return false;
}
}
}
</script></form>
<table width=100% ><tr><td class=f colspan=2><b>相关文章</b></td></tr>
<tr><td valign=top><IMG SRC=../../../../../img2/jiao.gif></td><td><a href='01_9_13_5.asp.html'>直接在程序中更改显示模式</a></td></tr>
<tr><td valign=top><IMG SRC=../../../../../img2/jiao.gif></td><td><a href='01_9_13_4.asp.html'>在VC++6.0开发中实现全屏显示</a></td></tr>
<tr><td valign=top><IMG SRC=../../../../../img2/jiao.gif></td><td><a href='01_9_13_3.asp.html'>让基于对话框的应用程序有启动画面</a></td></tr>
<tr><td valign=top><IMG SRC=../../../../../img2/jiao.gif></td><td><a href='01_9_13_2.asp.html'>多边形窗口</a></td></tr>
<tr><td valign=top><IMG SRC=../../../../../img2/jiao.gif></td><td><a href='01_9_12_15.asp.html'>谈VC++中的Progress控件的使用</a></td></tr>
</table>
</td></tr></table></td></tr></table><br>
<table align=center width=680><tr><td align=right>
<form name=mail method=post action='/pub/subMail.asp' onsubmit='JavaScript: return chkField(this)'>
<INPUT type='hidden' name='rec' value='24061'>
您的姓名:<INPUT type="text" name=myName size=10>
您朋友的E-mail:<INPUT type="text" name=friendMail size=10>
<INPUT type="submit" value="推荐给好友">
</form>
</td></tr>
<tr><td align=right>
<b>[<a href="javascript:window.close()">关闭窗口</a>]</b>
</td></tr>
</table>
<script language="javascript">
function chkField(fmObj)
{if (!fmObj.friendMail.value){
alert("请输入您朋友的E-mail!");
fmObj.friendMail.focus();
return false;
}
return true;
}
</script>
<table align=center width=680>
<tr><td><hr size=1 width=660 color=#f46240></td></tr>
</table><br>
<p align=center>Copyright(C) ccw.com.cn,All rights reserved</p>
<p align=center><b>中国计算机世界出版服务公司版权所有</b></p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -