Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hi everyone,

I have to develop a trend graph in VC++ using MFC or it could be ATL also.

The graph looks like the followling:-

trend Graph

Can some one provide some help or link related to this??

Thanks a lots in advance.....

kellsie........
Posted

1 solution

Hey u can do it in OnDraw(CDC* pDC) function (which comes by default if the class is inherited from CView)

i have a sample code here..

GRDSCDAPPDoc* pDoc = (GRDSCDAPPDoc*)GetDocument ();
// TODO: add draw code here

CRect ocWinRect;
GetWindowRect (&ocWinRect);

int iW = ocWinRect.Width (),
iH = ocWinRect.Height ();

m_iWidth = iW;
m_iHeight = iH;

RECT ocRect;
ocRect.bottom = 0; ocRect.left = 0;
ocRect.top = iH; ocRect.right = iW;

CBrush ocBrush (RGB (0, 0, 0));
pDC->FillRect (&ocRect, &ocBrush);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900