Re: Why this strange behaviour regarding subclassing controls
Hi David
Now I am improving my desing and in the process I need to add further
code.As you said and I agree that manipulation of controls is easily
done and its a bad design .
For example ,the data comes from CDocument derived class and i have
application data class say CData there declared there in CDocument.
The list control which is subclassed uses this class to load the data
in the list control.When the user clicks the control ,I need to load
the selected data in another list control Since this is a bad design
since I am coupling one list (passing the pointer )to another .So in
order to avoid this Can I use RegisterEvent function to register an
event.
So how should I achieve this .
I wanted to go this design because tomorrow if I the first control is
removed ,I should be handling the data in the secondf list control
through
..void CMyListSeriesCtrl ::InsertItems(int nColumnCount)
{
CCDoc *pDoc;
CFrameWnd *pFrame = (CFrameWnd *)AfxGetMainWnd();
pDoc = (CCDoc *)(pFrame->GetActiveDocument());
//Now insert the elements in to the list and call RegisterEvent () for
the events to be fired by the lsit control
}
I think my question is clear .
thanks
Bhargs