Little help please

  • Thread starter Thread starter ErUs
  • Start date Start date
E

ErUs

Im having real trouble painting to my document uotside of the Paint()
event.
could someone please post some code to show me how.
 
ErUs said:
Im having real trouble painting to my document uotside of the Paint()
event. could someone please post some code to show me how.

The questions that work best in this medium are specific rather than the
overly broad question you posted.

Why not repost the question by saying what you are using - .Net/MFC/SDK,
what you have tried and how it failed?

Regards,
Will
 
its a .net forms app in C++ ,
the problem is that i cant paint to a window unless its inside an
event like e->paint blah blah
 
ErUs said:
its a .net forms app in C++ ,
the problem is that i cant paint to a window unless its inside an
event like e->paint blah blah

Reminds me of a line from the movie Cool Hand Luke - "What we have here is a
failure to communicate."

Is it that you don't know how or that something you have tried fails?

Do you know that outside the paint event handler you can call
CreateGraphics() to get an used to paint a control like the one you get
inside a paint event handler?

In any case, WinForms is neither my specialty nor the subject of this group.
You may want to post again in one of the

microsoft.public.dotnet.framework.windowsforms

groups.

Regards,
Will
 
ErUs said:
its a .net forms app in C++ ,
the problem is that i cant paint to a window unless its inside an
event like e->paint blah blah

Correct - you're not supposed to. You CAN use CreateGraphics, as William's
said, but it's best to call Invalidate and do any drawing in OnPaint.
Otherwise you'll almost certainly get overdrawn when a Paint event is sent
to the control / form.

Steve
 
Back
Top