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

📄 subject_58033.htm

📁 vc
💻 HTM
字号:
<p>
序号:58033 发表者:hmily008 发表日期:2003-10-29 16:08:19
<br>主题:以下是我编一个绘图的程序,那位朋友可以给我指一下存在的问题和需要改正的地方,编译是没错!
<br>内容:以下是我编一个绘图的程序,那位朋友可以给我指一下存在的问题和需要改正的地方,编译是没错!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:樂日華 回复日期:2003-10-29 16:15:32
<br>内容:????????????????????????????????????????????????????????<BR>error . 
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:浪际天涯 回复日期:2003-10-29 17:39:18
<br>内容:&nbsp;&nbsp;&nbsp;&nbsp;int a,b,delta1,delta2,d,x,y;<BR>&nbsp;&nbsp;&nbsp;&nbsp;int x0,x1,y0,y1;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;x0=m_PointBegin.x;<BR>&nbsp;&nbsp;&nbsp;&nbsp;y0=m_PointBegin.y;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;x1=m_PointEnd.x;<BR>&nbsp;&nbsp;&nbsp;&nbsp;y1=m_PointEnd.y;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;delta1=2*a+b;<BR>&nbsp;&nbsp;&nbsp;&nbsp;delta2=2*(a+b);<BR>&nbsp;&nbsp;&nbsp;&nbsp;x=x0;<BR>&nbsp;&nbsp;&nbsp;&nbsp;y=y0;<BR>&nbsp;&nbsp;&nbsp;&nbsp;pDC-&gt;SetPixel(x,y,m_nColor);<BR>&nbsp;&nbsp;&nbsp;&nbsp;while(x&lt;x1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(d&lt;0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x++;y++;d+=delta2;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x++;d+=delta1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pDC-&gt;SetPixel(x,y,m_nColor);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>一点注释都没有,很难懂呀<BR>OnMouseMove函数中要判断是不是左键压下拖动应该这样:if(nFlags &amp; MK_LBUTTON)
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:hmily008 回复日期:2003-10-30 16:34:37
<br>内容:这是一个画线函数,我想问的是我使用vc中从在的问题1!!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:浪际天涯 回复日期:2003-10-30 16:41:42
<br>内容:我正在做的一个和你一样的东西发给你,你看看,把你邮箱给我,
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:hmily008 回复日期:2003-10-30 16:45:55
<br>内容:wellcomhmily@163.com<BR>qq:282852535
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:米罗 回复日期:2003-10-30 16:49:08
<br>内容:你的CLine::Draw(CDC *pDC,CPoint m_PointBegin,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CPoint m_PointEnd, COLORREF m_nColor)<BR>函数中的a,b为什么都不初始化?导致程序出错!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:hmily008 回复日期:2003-10-30 19:18:20
<br>内容:我改了之后,还有错误啊!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:米罗 回复日期:2003-10-30 19:44:13
<br>内容:........<BR>自己改!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:hmily008 回复日期:2003-10-30 19:45:29
<br>内容:不是draw函数的错误!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:浪际天涯 回复日期:2003-10-31 10:35:38
<br>内容:我把程序发给你了,你自己看看
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:苦头陀+黄蜂 回复日期:2003-10-31 14:08:57
<br>内容:<BR>&nbsp;&nbsp;&nbsp;&nbsp;int a,b,delta1,delta2,d,x,y;<BR>&nbsp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&nbsp;&nbsp;&nbsp;pDC-&gt;SetPixel(x,y,m_nColor);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>一点注释都没有,很难懂呀<BR>OnMouseMove函数中要判断是不是左键压下拖动应该这样:if(nFlags &amp; MK_LBUTTON) 
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

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