Click here to Skip to main content
12,547,248 members (66,961 online)
Rate this:
Please Sign up or sign in to vote.
See more: VisualC++
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.....

Posted 14-Dec-11 20:14pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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; = iH; ocRect.right = iW;

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161018.1 | Last Updated 15 Dec 2011
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100