如題,最進剛剛開始學習VC++和C語言,老師給布置任務用OnDraw來畫一個B-樣條曲面 可是我把曲面程式寫好之后如何用OnDraw來呼叫函式,最侄訓出曲面呢?求大神幫助
uj5u.com熱心網友回復:
在ondraw里直接呼叫自定義函式唄uj5u.com熱心網友回復:
CDC Class MembersLine-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.
uj5u.com熱心網友回復:
可是我還不會呼叫自定義函式啊 求大神指點uj5u.com熱心網友回復:
一般可以這樣定義你的自繪函式介面void OnDraw(CDC *pDC, LPRECT rcBound);
然后呼叫傳入CDC指標,及繪圖區域
uj5u.com熱心網友回復:
看看你的“自定義函式”uj5u.com熱心網友回復:
直接寫在ondraw里面不就好了轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/92549.html
標籤:基礎類
上一篇:怎么生成這個控制元件
下一篇:MFC 界面卡死問題,用了執行緒
