void CMainFrame::OnTimer(UINT idEvent)
{
idEvent++; //when a time event occurs do some
pointG2.y-=3; //graphics
pointG=pointG2;
TimerEvent();
InvalidateRect(NULL, TRUE); //to call OnDraw}
void Csail_boatView::OnDraw(CDC* pDC)
{
//graphics functions here
//they compile OK
//OnDraw is called by the even timer above
//the graphic funtions fail to work
}
Any thoughts?
Ross
Last edited by ~s.o.s~; Mar 10th, 2007 at 11:25 pm. Reason: Added code tags, learn to use them.
void CMainFrame::OnTimer(UINT idEvent)
{
idEvent++;
pointG2.y-=3;
pointG=pointG2;
TimerEvent();
InvalidateRect(NULL, TRUE);
}
void Csail_boatView::OnDraw(CDC* pDC)
{
pDC->MoveTo(pointG); //example fn of many
CPoint pt2; //they execute fine when OnDraw
pt2.x=xb-x; //is called at window creation
pt2.y=yb+3*x;
pDC->LineTo(pt2); //they don't work when OnDraw is
//called by the OnTimer event above
}
Ross
Last edited by ~s.o.s~; Mar 10th, 2007 at 11:25 pm. Reason: Added code tags, learn to use them.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.