FileName : TriangleView.h
class CTriangleView : public CView
{
...
CPoint tr[3],ct;
int rad;
double rd;
CRect rc;
...
};
FileName : TriangleView.cpp
#include "math.h"
...
CTriangleView::CTriangleView()
{
// TODO: add construction code here
rd=0.0174532935;
}
void CTriangleView::OnDraw(CDC* pDC)
{
CTriangleDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
int i=0;
GetClientRect (rc);
ct.x = (rc.left + rc.right )/2;
ct.y = (rc.top + rc.bottom )/2;
rad=ct.x/2;
while(i<3)
{
tr[i].x = ct.x + rad * sin(i*120*rd);
tr[i].y = ct.y - rad * cos(i*120*rd);
i++;
}
pDC->Polygon (tr,3);
}
Thursday, November 26, 2009
Subscribe to:
Post Comments (Atom)
Related Terms
AITS
(5)
M.Sc (IT and CA)
(5)
Rajkot
(4)
Building Application Using VC++
(3)
VC++
(3)
Atmiya
(2)
Atmiya Institute of Science and technology
(2)
Object Oriented Language Visual C++
(2)
Visual C++
(2)
ADO
(1)
Abnormal Execution
(1)
Analog Clock
(1)
BCA
(1)
C++ Exception handling
(1)
CArchive
(1)
CDC
(1)
CFile
(1)
CImageList
(1)
CImageList::Add
(1)
CImageList::Attach
(1)
CImageList::Create
(1)
CImageList::Write
(1)
DAO
(1)
DAO Exception
(1)
Device Context
(1)
Digital Clock
(1)
Disk File
(1)
Ellipse
(1)
Exception Macros
(1)
Exception Processing
(1)
Exception-Throwing Functions
(1)
For Exam
(1)
Format
(1)
HNGU
(1)
IMP Question
(1)
Important
(1)
LC_COLOR
(1)
M.Sc Sem
(1)
M.Sc(IT and CA) 2009-2011 Batch
(1)
MCA
(1)
MDI
(1)
MFC Exception
(1)
Normal ExecutionErroneous Execution
(1)
ODBC
(1)
OLE Exception
(1)
Old Paper
(1)
Practical Assignment
(1)
Practical Question
(1)
Questions
(1)
SDI
(1)
Serialization Process
(1)
Serialization Theory
(1)
Serialize Function
(1)
Structured Exception Hanling
(1)
Submission
(1)
Syllabus
(1)
Temination Function
(1)
Termwork
(1)
Text Functions
(1)
Third Year M.Sc (CA and IT)
(1)
Triangle
(1)
University Paper
(1)
UpdateWindow()
(1)
VC++ Functions
(1)
Visual Application Development
(1)
When to use Exception
(1)
exam 2010
(1)
in center
(1)
polygon
(1)
vc++ paper
(1)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.