Click to See Complete Forum and Search --> : Drawing in a control


J Mindell
April 5th, 1999, 10:21 AM
I would like to make a control that I can use to draw on part of a formview window using the GDI functions. i.e. to make a plot that takes up a fraction of the window, but has its own ClientDC.
How do I do this in MFC?

Daniel Levine
April 5th, 1999, 01:50 PM
Hi,

Since CFormView is based on a dialog resource, add a button control on the resource where you want to draw, check the Owner Draw property, and override OnDrawItem. It works for me, although there is probably a better way.

Daniel.

J Mindell
April 5th, 1999, 01:55 PM
Thanks, Daniel, I'll try it.
Joe