troubleshooting Question

dot not on the hotspot

Avatar of graber
graberFlag for United States of America asked on
System Programming
4 Comments1 Solution284 ViewsLast Modified:
I am attempting to put dots on a field for each depression of the Left mouse button.  The problem is the dots come out the rear of the mouse (please no comments :S).  The code is below.  Can anyone explain why?
It seemed simple enough.

void CGeneWizView::OnLButtonUp(UINT nFlags, CPoint point)

     CGeneWizDoc * GeneWizeDoc=GetDocument();

     GeneWizeDoc ->m_clXYNodes.AddTail(CPoint(point.x, point.y));
     CView::OnLButtonUp(nFlags, point);

void CGeneWizView::OnPaint()
     POSITION pos_XYNode;
     HICON hiRouteStart = AfxGetApp()->LoadIcon(IDI_RTSTART_ICON);
     CPaintDC dc(this); // device context for painting
     CGeneWizDoc * GenWizDoc=GetDocument();
     pos_XYNode = GenWizDoc->m_clXYNodes.GetHeadPosition();
          while(pos_XYNode != NULL)
               dc.DrawIcon(GenWizDoc->m_clXYNodes.GetNext(pos_XYNode), hiRouteStart);
     // Do not call CView::OnPaint() for painting messages

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros