Visual c++.net MFC question

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2007
Posts: 15
Reputation: RossSCann is an unknown quantity at this point 
Solved Threads: 0
RossSCann RossSCann is offline Offline
Newbie Poster

Visual c++.net MFC question

 
0
  #1
Mar 9th, 2007
Does anyone use MFC?
I have a problem executing graphics functions.

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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,412
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1469
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Visual c++.net MFC question

 
0
  #2
Mar 9th, 2007
>>Any thoughts?

Nope, since you didn't post any relevant code.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 15
Reputation: RossSCann is an unknown quantity at this point 
Solved Threads: 0
RossSCann RossSCann is offline Offline
Newbie Poster

Re: Visual c++.net MFC question

 
0
  #3
Mar 10th, 2007
Originally Posted by Ancient Dragon View Post
>>Any thoughts?

Nope, since you didn't post any relevant code.
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC