请问一下这程序有什么问题? 请问一下这程序有什么问题,我想实现,点击“直线”-“DDA算法生成直线”然后在窗口内点击鼠标生成一条直线。源代码在附件里 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 switch(pdoc->m_iMenuSelect) { case ID_DDALINE: case ID_BRESENHAMLINE: case ID_MIDPOINTLINE:void CGraphicView::OnLButtonUp(UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default CGraphicDoc *pdoc = GetDocument(); CClientDC dc(this); CPoint s, e; CRect rect; double radius; int r; switch(pdoc->m_iMenuSelect) { case ID_DDALINE: case ID_BRESENHAMLINE: case ID_MIDPOINTLINE: pdoc->m_pointEnd = point; //请同学们实现算法 MyDrawLine(pdoc->m_pointStart, pdoc->m_pointEnd); } CView::OnLButtonUp(nFlags, point);} 在OnMouseMove()中先擦除先前画的线,然后新画一条,你的算法会很慢的CDC::SetROP2();好好看看书吧,别急 temppen.CreatePen (PS_DOT,0,RGB(255,200,200)); mvcdc->SelectObject (&temppen); mvcdc->SetROP2 (R2_NOTXORPEN); mvcdc->MoveTo (firstpoint); mvcdc->LineTo (secondpoint); secondpoint = point; mvcdc->MoveTo (firstpoint); mvcdc->LineTo (secondpoint); temppen.DeleteObject (); vc下time()函数是多线程安全的么? 一个程序有个热键Ctrl+alt+Q,我在我的程序中如何发送这个热键?? 两个表 继续散分 API函数和库函数的区别 我要把图片贴在按钮上该怎么来做呢? d3d与ddraw,难死我了,分不够再给,只求高手们能给出一解答 关于Invalid Descriptor Index? 在作控件程序中定义回调函数,帮忙看看如何改 只能看到最近几天的帖子吗? AnimateWindow 和改变dialog背景色 不能同时进行 我要哭死了,,,毕业设计做个皮肤编辑器,不会啊,救命。。。。
switch(pdoc->m_iMenuSelect)
{
case ID_DDALINE:
case ID_BRESENHAMLINE:
case ID_MIDPOINTLINE:
void CGraphicView::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CGraphicDoc *pdoc = GetDocument();
CClientDC dc(this);
CPoint s, e;
CRect rect;
double radius;
int r;
switch(pdoc->m_iMenuSelect)
{
case ID_DDALINE:
case ID_BRESENHAMLINE:
case ID_MIDPOINTLINE:
pdoc->m_pointEnd = point; //请同学们实现算法
MyDrawLine(pdoc->m_pointStart, pdoc->m_pointEnd);
}
CView::OnLButtonUp(nFlags, point);
}
mvcdc->SelectObject (&temppen);
mvcdc->SetROP2 (R2_NOTXORPEN);
mvcdc->MoveTo (firstpoint);
mvcdc->LineTo (secondpoint);
secondpoint = point;
mvcdc->MoveTo (firstpoint);
mvcdc->LineTo (secondpoint);
temppen.DeleteObject ();