2 Replies - 2609 Views - Last Post: 05 August 2010 - 10:58 PM Rate Topic: -----

#1 nogo96  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 2
  • Joined: 05-August 10

Visual C++ .net Triangle

Posted 05 August 2010 - 08:21 PM

How would I make a 3,4,5 triangle print out in a GUI. I was using the drawline function, but I can't figure out how to make it so its between two coordinate points. I have some code like this to draw a line

// draw line
         coloredPen->Color = Color::Red;
         coloredPen->Width = 5;
         graphicsObject->DrawLine( coloredPen, 395, 150, 250, 150 );


But I would like to use coordinate points to do this. I dont really know what to do form here.

Is This A Good Question/Topic? 0
  • +

Replies To: Visual C++ .net Triangle

#2 Salem_c  Icon User is online

  • void main'ers are DOOMED
  • member icon

Reputation: 1635
  • View blog
  • Posts: 3,111
  • Joined: 30-May 10

Re: Visual C++ .net Triangle

Posted 05 August 2010 - 09:50 PM

> but I can't figure out how to make it so its between two coordinate points
You replace the 4 numbers in the call you have, with say 4 numbers from a dialog box.

Or maybe use the mouse to click a pair of points on the screen, record where the clicks are, then draw the line.
Was This Post Helpful? 0
  • +
  • -

#3 nogo96  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 2
  • Joined: 05-August 10

Re: Visual C++ .net Triangle

Posted 05 August 2010 - 10:58 PM

I figured this out, but the triangle is really small with points like (1,1) (1,4) etc. How to I re-scale the window to make it look normal?
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1