derive from CWnd?
- From: "Ian" <ibnospam@xxxxxxxxx>
- Date: Fri, 10 Jun 2005 20:35:14 -0400
Each item in a dialog is derived from CWnd (e.g. a static control, a list
box, a combo box, etc). I am trying to determine whether the same approach
can be used to draw objects in a CView. As a simple example, assume 5
different non-overlapping objects (e.g. 5 circles) are drawn in a CView.
Each object knows how to draw itself and respond to keyboard/mouse input.
The question is, should each object be derived from CWnd? Alternatively,
should each object simply receive a pointer to CView and "USE" this pointer
to draw itself? The latter is the approach I have traditionally taken. Is
there is good reason to use the former approach and have each object be
derived from CWnd? I have no idea how to implement the details (e.g. how to
ensure a selected object receives keyboard/mouse input) so, if this approach
can be implemented, could someone please refer me to any documentation that
describes how it is done?
Thanks in advance
Ian
.
- Follow-Ups:
- Re: derive from CWnd?
- From: Ian
- Re: derive from CWnd?
- From: Scott McPhillips [MVP]
- Re: derive from CWnd?
- From: Joseph M . Newcomer
- Re: derive from CWnd?
- Prev by Date: Re: Strange MDI application error
- Next by Date: Re: The Dialog frame
- Previous by thread: CListCtrl: Do text subitems require dynamic allocations and deletions?
- Next by thread: Re: derive from CWnd?
- Index(es):
Relevant Pages
|