dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: can not call CDC::StrokePath() twice?!

  1. #1
    Join Date
    Jul 2001
    Posts
    306

    can not call CDC::StrokePath() twice?!

    Hello,

    I have a problem with calling StrokePath() twice.
    Code-example:

    ----
    BeginPath()
    ....
    EndPath()
    -Create and select Pen-
    StrokePath() -> everything fine!
    -select another Pen-
    StrokePath() -> Error ERROR_CAN_NOT_COMPLETE
    ----

    For a test I placed the second StrokePath directly and the first; the same!
    Why?

    Is it impossible to draw the some path twice?

    br
    Ralf

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,624

    Re: can not call CDC::StrokePath() twice?!

    From MSDN:
    Remarks

    The path, if it is to be drawn by StrokePath, must have been completed through a call to EndPath. Calling this function on a path for which EndPath has not been called will cause this function to fail and return zero. Unlike other path drawing functions such as StrokeAndFillPath, StrokePath will not attempt to close the path by drawing a straight line from the first point on the path to the last point on the path.t on the path.
    Victor Nijegorodov

  3. #3
    Join Date
    Jul 2001
    Posts
    306

    Re: can not call CDC::StrokePath() twice?!

    Hello Victor,

    I call BeginPath and EndPath. Then StrokePath and again StrokePath. There is not an "open BeginPath". Or do the first call to StrokePath deletes my Path?

    br
    Ralf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)