Re: Having trouble with pens and brushes
- From: jetan@xxxxxxxxxxxxxxxxxxxx ("Jeffrey Tan[MSFT]")
- Date: Thu, 01 Jun 2006 08:25:25 GMT
Hi Schemer,
Thanks for your post!
I am not sure I understand your problem completely. Based on my
understanding, you have modified the Scribble C# sample to draw some
customized graphics, such as rectangles, but you failed to show them out.
In your second reply, it seems that you have found that this problem has
something to do with UpdateAllViews method calling. Is your problem
resolved? If you still need help, please feel free to tell me.
Based on my review, it seems you drawed the rectangles in the OnMouseUp
method, this may be the problem. If you draw in this method, the next
WM_PAINT message will invoke PaintHandler again, which erases your previous
rectangle drawing, so you will not see the rectangle. To draw somthing on
the form, you should place the drawing logic in the PaintHandler, which
will be invoked whenever drawing is needed. In OnMouseUp method, we can
store the mouse up point in a variable, which can be used in PaintHandler
method.
Hope this helps!
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- Re: Having trouble with pens and brushes
- From: Schemer
- Re: Having trouble with pens and brushes
- From: Paul Baker [MVP, Windows - Networking]
- Re: Having trouble with pens and brushes
- Prev by Date: Re: Clipping line to Region accuracy
- Next by Date: Dynamic replacement of metafiles records not possible when playing back with GDI
- Previous by thread: Re: Clipping line to Region accuracy
- Next by thread: Re: Having trouble with pens and brushes
- Index(es):
Relevant Pages
|