Home > Software engineering >  Small white for help, how ontouch how to call my own painting function
Small white for help, how ontouch how to call my own painting function

Time:09-28

As title, the most in just started learning vc + + and C language, the teacher give assignments using ontouch to draw a B - spline surface but after I write the surface process how to call a function in ontouch, finally draw a curved surface? Seek help from a great god

CodePudding user response:

In ontouch a custom function called bai directly

CodePudding user response:

The CDC Class Members

The Line - the Output Functions provides

GetCurrentPosition Retrieves the current position of the pen (in logical coordinates).
MoveTo Moves the current position.
The LineTo Draws a line from the current position up to, but not o, a point.
The Arc Draws an elliptical Arc.
ArcTo Draws an elliptical arc. This function is similar to the 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 a device context.
SetArcDirection Sets the drawing direction to be 2 for arc and a rectangle functions provides.
PolyDraw Draws a set of line segments and the Bezier 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 informs The 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 The Bezier splines. The current position is neither informs The nor updated.
PolyBezierTo Draws one or more the Bezier splines, and moves the current position to the ending point of the last the Bezier spline.

CodePudding user response:

reference 1st floor jacksonfan response:
directly call the custom function in ontouch bai
but I can't call the custom function and the great spirit

CodePudding user response:

General can define your custom painting function interface
Void ontouch (CDC * pDC, LPRECT rcBound);

And then call the incoming CDC pointer, and painting area

CodePudding user response:

Take a look at your custom function ""

CodePudding user response:

Write directly in ontouch don't
  • Related