小白求助,如何OnDraw如何调用我自己画的函数

Notexistboy 2017-07-25 06:12:21
如题,最进刚刚开始学习VC++和C语言,老师给布置任务用OnDraw来画一个B-样条曲面 可是我把曲面程序写好之后如何用OnDraw来调用函数,最终画出曲面呢?求大神帮助
...全文
236 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
jacksonfan 2017-07-26
  • 打赏
  • 举报
回复
在ondraw里直接调用自定义函数呗
schlafenhamster 2017-07-26
  • 打赏
  • 举报
回复
看看你的“自定义函数”
zgl7903 2017-07-26
  • 打赏
  • 举报
回复
一般可以这样定义你的自绘函数接口 void OnDraw(CDC *pDC, LPRECT rcBound); 然后调用传入CDC指针,及绘图区域
Notexistboy 2017-07-26
  • 打赏
  • 举报
回复
引用 1 楼 jacksonfan 的回复:
在ondraw里直接调用自定义函数呗
可是我还不会调用自定义函数啊 求大神指点
赵4老师 2017-07-26
  • 打赏
  • 举报
回复
CDC Class Members Line-Output Functions GetCurrentPosition Retrieves the current position of the pen (in logical coordinates). MoveTo Moves the current position. LineTo Draws a line from the current position up to, but not including, a point. Arc Draws an elliptical arc. ArcTo Draws an elliptical arc. This function is similar to Arc, except that the current position is updated. AngleArc Draws a line segment and an arc, and moves the current position to the ending point of the arc. GetArcDirection Returns the current arc direction for the device context. SetArcDirection Sets the drawing direction to be used for arc and rectangle functions. PolyDraw Draws a set of line segments and Bézier splines. This function updates the current position. Polyline Draws a set of line segments connecting the specified points. PolyPolyline Draws multiple series of connected line segments. The current position is neither used nor updated by this function. PolylineTo Draws one or more straight lines and moves the current position to the ending point of the last line. PolyBezier Draws one or more Bézier splines. The current position is neither used nor updated. PolyBezierTo Draws one or more Bézier splines, and moves the current position to the ending point of the last Bézier spline.
chen_JADE 2017-07-26
  • 打赏
  • 举报
回复
直接写在ondraw里面不就好了

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧