给程序,盼解答:ClonePt类:
Bitmap *ClonePt::getClonePt()
{
Bitmap *ClonePt;
Rect block=Rect(PtPoint.x,PtPoint.y, PtSize.x,PtSize.y);
ClonePt=LargerPt->Clone(block,PixelFormatDontCare);
return ClonePt;}void ClonePt::initClonePt(Bitmap *LargerBitmap,CPoint BitmapSize,CPoint pointPt)
{
LargerPt=LargerBitmap;
PtSize=BitmapSize;
PtPoint=pointPt;
}
CDialog类:void CMyClonePtDlg::按钮单击事件() 
{
// TODO: Add your control notification handler code here
CDC *dc=GetDC();
Bitmap  Larger=(L"507.bmp");
Graphics graphics(dc->m_hDC); Bitmap*smallPt;
CPoint Size(100,100);
CPoint Position(60,60);
ClonePt *Pt=new ClonePt;
Pt->initClonePt(&Larger,Size,Position);
                   smallPt=Pt->getClonePt();
          graphics.DrawImage(smallPt,100,100); //能运行,到下面就不行了  
                  SetTimer(1,500,NULL);
}
运行上面程序后&Larger为:0x0023a450void CMyClonePtDlg::OnTimer(UINT nIDEvent) 
{
// TODO: Add your message handler code here and/or call default
Graphics graphics(dc->m_hDC);

Bitmap *smallPt;
smallPt=Pt->getClonePt();              //不能运行,因为Pt的Larger变了啊
graphics.DrawImage(smallPt,100,100);    CDialog::OnTimer(nIDEvent);
}
运行上面程序后&Larger为:0x00000001;Larger是Pt对象的一个public 对象指针
为什么Larger变了啊,没其他线程来改变啊