Note that there are some explanatory texts on larger screens.

plurals
  1. POMake Objects Follow Mouse
    primarykey
    data
    text
    <p>Other questions close to this topic don't seem to help me understand it very much. I'm just starting programming using Visual Studio and Direct2D and I'm having trouble understanding how to make two "eyes," which are ellipses inside of ellipses, follow my mouse.</p> <p>Inside of the function <code>void MainWindow::CalculateLayout()</code> I'm using</p> <pre><code> const float radius3=radius/4; const float radius3_2=radius/5; const float x3=x-100; const float y3=y-150; ellipse3 = D2D1::Ellipse(D2D1::Point2F(x3, y3), radius3, radius3_2); //left eye const float radius4=radius/4; const float radius4_2=radius/5; const float x4=x+100; const float y4=y-150; ellipse4 = D2D1::Ellipse(D2D1::Point2F(x4, y4), radius4, radius4_2); //right eye const float radius5=radius/8; const float radius5_2=radius5/2; const float x5=x-100; const float y5=y-150; ellipse5 = D2D1::Ellipse(D2D1::Point2F(x5, y5), radius5, radius5_2); // left eyeball const float radius6=radius/8; const float radius6_2=radius6/2; const float x6=x+100; const float y6=y-150; ellipse6 = D2D1::Ellipse(D2D1::Point2F(x6, y6), radius6, radius6_2); // right eyeball </code></pre> <p>to set up where the eyes and eyeballs are. I think that something along the line of <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mousemove%28v=vs.71%29.aspx" rel="nofollow">this</a> should be used to control where the mouse is. I am trying to do this from a blank project, not from a form. Is the solution to simply replace <code>const float x5=x-100</code> with the <code>X</code> value of <code>MouseMove</code>?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload