?? subject_62454.htm
字號:
<p>
序號:62454 發(fā)表者:xiaogang_2000 發(fā)表日期:2003-11-26 22:18:59
<br>主題:怎樣將CRectTracker類對象的信息保存在鏈表中
<br>內(nèi)容:怎樣將CRectTracker類對象的信息保存在鏈表中?<BR>我想在圖中畫多個CRectTracker對象,在鼠標(biāo)左鍵響應(yīng)函數(shù)中寫下如下代碼:<BR>void CMyListView::OnLButtonDown(UINT nFlags, CPoint point) <BR>{<BR> // TODO: Add your message handler code here and/or call default<BR> CDrawObj *m_pDrawObj; //定義鏈表為typedef CTypedPtrList<CObList, CDrawObj*> CDrawObjList;<BR> m_pDrawObj=new CDrawObj;<BR> CListDoc* pDoc = GetDocument();<BR> BOOL bResult=pDoc->m_tracker.HitTest (point) != -1;//CRectTracker::hitNothing; <BR> //Tracker rectangle changed so update views. <BR> if (bResult)//拉伸圖元 <BR> { <BR> pDoc->m_tracker.Track(this,point,true); //The window object that contains the rectangle<BR> pDoc->SetModifiedFlag (); <BR> pDoc->UpdateAllViews (NULL); <BR> } <BR> else//移動圖元<BR> {<BR> pDoc->m_tracker.TrackRubberBand (this,point,true); <BR> }<BR> CView::OnLButtonDown(nFlags, point);<BR>}<BR>但我不知怎樣保存每個對象的信息?CRectTracker類對象該保存哪些信息啊?上面的程序該怎樣改?麻煩大家指點,不勝感激!<BR>mc_77@sina.com<BR>qq:56700320
<br><a href="javascript:history.go(-1)">返回上頁</a><br><a href=http://www.copathway.com/cndevforum/>訪問論壇</a></p>
<hr size=1>
<blockquote><p>
回復(fù)者:xiaogang_2000 回復(fù)日期:2003-11-27 20:26:22
<br>內(nèi)容:沒人回答???
<br>
<a href="javascript:history.go(-1)">返回上頁</a><br><a href=http://www.copathway.com/cndevforum/>訪問論壇</a></p></blockquote>
<hr size=1>
<blockquote><p>
回復(fù)者:xiaogang_2000 回復(fù)日期:2003-11-28 22:03:02
<br>內(nèi)容:頂,,
<br>
<a href="javascript:history.go(-1)">返回上頁</a><br><a href=http://www.copathway.com/cndevforum/>訪問論壇</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回復(fù)者:紅蘋果 回復(fù)日期:2003-11-30 19:25:44
<br>內(nèi)容:CDrawObj *m_pDrawObj; //定義鏈表為typedef CTypedPtrList<CObList, CDrawObj*> CDrawObjList;<BR><BR>你把上面的typedef CTypedPtrList<CObList, CDrawObj*> CDrawObjList;<BR>中的CObList改為CPtrList試試。<BR>
<br>
<a href="javascript:history.go(-1)">返回上頁</a><br><a href=http://www.copathway.com/cndevforum/>訪問論壇</a></p></blockquote>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -