Click here to Skip to main content
15,921,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ON_MESSAGE & ON_THREAD_MESSAGE Pin
thenewbee2-Jun-08 17:54
thenewbee2-Jun-08 17:54 
QuestionWhy does CStringArray not have a find method? Pin
Rajesh R Subramanian2-Jun-08 2:09
professionalRajesh R Subramanian2-Jun-08 2:09 
AnswerRe: Why does CStringArray not have a find method? Pin
KarstenK2-Jun-08 2:37
mveKarstenK2-Jun-08 2:37 
GeneralRe: Why does CStringArray not have a find method? Pin
Rajesh R Subramanian2-Jun-08 2:46
professionalRajesh R Subramanian2-Jun-08 2:46 
AnswerRe: Why does CStringArray not have a find method? Pin
prasad_som2-Jun-08 5:52
prasad_som2-Jun-08 5:52 
GeneralRe: Why does CStringArray not have a find method? Pin
Rajesh R Subramanian3-Jun-08 0:21
professionalRajesh R Subramanian3-Jun-08 0:21 
GeneralRe: Why does CStringArray not have a find method? Pin
prasad_som3-Jun-08 2:08
prasad_som3-Jun-08 2:08 
GeneralRe: Why does CStringArray not have a find method? Pin
Rajesh R Subramanian3-Jun-08 3:32
professionalRajesh R Subramanian3-Jun-08 3:32 
QuestionDifference among INT, INT32, LONG, LONG32...? Pin
Maxim Zarus2-Jun-08 1:07
Maxim Zarus2-Jun-08 1:07 
AnswerRe: Difference among INT, INT32, LONG, LONG32...? Pin
SandipG 2-Jun-08 1:10
SandipG 2-Jun-08 1:10 
GeneralRe: Difference among INT, INT32, LONG, LONG32...? Pin
Maxim Zarus2-Jun-08 1:21
Maxim Zarus2-Jun-08 1:21 
GeneralRe: Difference among INT, INT32, LONG, LONG32...? Pin
SandipG 2-Jun-08 1:27
SandipG 2-Jun-08 1:27 
GeneralRe: Difference among INT, INT32, LONG, LONG32...? Pin
Maxim Zarus2-Jun-08 1:37
Maxim Zarus2-Jun-08 1:37 
QuestionRe: Difference among INT, INT32, LONG, LONG32...? Pin
CPallini2-Jun-08 1:39
mveCPallini2-Jun-08 1:39 
AnswerRe: Difference among INT, INT32, LONG, LONG32...? Pin
Maxim Zarus2-Jun-08 1:48
Maxim Zarus2-Jun-08 1:48 
QuestionRe: Difference among INT, INT32, LONG, LONG32...? Pin
Maxim Zarus2-Jun-08 1:54
Maxim Zarus2-Jun-08 1:54 
AnswerRe: Difference among INT, INT32, LONG, LONG32...? Pin
CPallini2-Jun-08 7:26
mveCPallini2-Jun-08 7:26 
GeneralRe: Difference among INT, INT32, LONG, LONG32...? [modified] Pin
SandipG 2-Jun-08 1:41
SandipG 2-Jun-08 1:41 
GeneralRe: Difference among INT, INT32, LONG, LONG32...? Pin
Rajkumar R2-Jun-08 1:59
Rajkumar R2-Jun-08 1:59 
AnswerRe: Difference among INT, INT32, LONG, LONG32...? Pin
Rajkumar R2-Jun-08 1:58
Rajkumar R2-Jun-08 1:58 
GeneralRe: Difference among INT, INT32, LONG, LONG32...? Pin
SandipG 2-Jun-08 2:03
SandipG 2-Jun-08 2:03 
GeneralRe: Difference among INT, INT32, LONG, LONG32...? Pin
Maxim Zarus2-Jun-08 2:08
Maxim Zarus2-Jun-08 2:08 
AnswerRe: Difference among INT, INT32, LONG, LONG32...? Pin
KarstenK2-Jun-08 2:40
mveKarstenK2-Jun-08 2:40 
QuestionUpdateAllViews Pin
sawerr2-Jun-08 0:35
sawerr2-Jun-08 0:35 
Hi
When clicks on View, my program draws ellipse and I tried to make all changes in one view reflects to all views.

1-)OnLbuttonDown adds a point to CArray m_PointList

2-)UpdateAllViews calls OnUpdate

3-) OnUpdate Invaliates so OnDraw called.


void CDocumentView::OnLButtonDown(UINT nFlags, CPoint point)
{
	GetDocument()->m_PointList.Add(point);
	GetDocument()->UpdateAllViews(NULL);

	CView::OnLButtonDown(nFlags, point);
};
//
void CDocumentView::OnDraw(CDC* pDC)
{
	CDocumentDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	if (!pDoc)
		return;
	for(int i = 0; i < GetDocument()->m_PointList.GetCount(); i++)
	{
		pDC->Ellipse(GetDocument()->m_PointList[i].x - GetDocument()->m_PointSize, 
                             GetDocument()->m_PointList[i].y - GetDocument()->m_PointSize,
			     GetDocument()->m_PointList[i].x + GetDocument()->m_PointSize, 
                             GetDocument()->m_PointList[i].y + GetDocument()->m_PointSize);
	}
}
//
void CDocumentView::OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* 
/*pHint*/)
{
	// TODO: Add your specialized code here and/or call the base class
	Invalidate();
}



But when i open a new document, it doesn't draw ellipse which is m_PointList , it shows a clean view window. And when i started to click also it doesn't change the other views.

Where am i wrong?
AnswerRe: UpdateAllViews Pin
SandipG 2-Jun-08 1:13
SandipG 2-Jun-08 1:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.