Derive a custom control from a CEdit and then implement OnPaint
You'll get something like the following where you will use your paint dc for drawing shapes...
class CShapeEdit : public CEdit
afx_msg void OnPaint();
CPaintDC dc(this); }
Now in your dialog class, which hosts the custom edit control, you add a member variable
In the implementation of your dialog class bind it to the UI using DDX
DDX_Control(pDX, IDC_SHAPE_EDIT, m_ShapeEdit);
Then later on cause it to redraw itself with
Now you have a canvas with which to explore the Win32 GDI!!!!