15,968,413 members
Home / Discussions / C / C++ / MFC

# C / C++ / MFC

 Re: working with pointers Calin Negru18-Mar-22 0:12 Calin Negru 18-Mar-22 0:12
 Re: working with pointers Victor Nijegorodov18-Mar-22 1:39 Victor Nijegorodov 18-Mar-22 1:39
 Re: working with pointers Calin Negru18-Mar-22 10:20 Calin Negru 18-Mar-22 10:20
 going a bit further: working with pointers Calin Negru20-Mar-22 7:47 Calin Negru 20-Mar-22 7:47
 Re: working with pointers Mircea Neacsu18-Mar-22 10:19 Mircea Neacsu 18-Mar-22 10:19
 Re: working with pointers David Crow21-Mar-22 3:16 David Crow 21-Mar-22 3:16
 Re: working with pointers Calin Negru21-Mar-22 5:15 Calin Negru 21-Mar-22 5:15
 Code to Figure out x,y cords for CDC::Pie inside an CDC::Ellipse given % ForNow13-Mar-22 9:37 ForNow 13-Mar-22 9:37
 hi Below is the code I have for Drawing a Pie give a percentage thing is it looks nice and I traced a percent of 10.000 however calculation of x & y are negative and it ends up (the pie) being on the left side of the circle Wondering if I am doing anything wrong after getting to 2 CPoints and I do a CDC:Pie C++ ```CPie::CPie(double percentage, PieWnd *pieptr) { piecalc(pieptr->currpercent, &piepointstart, pieptr); piecalc(percentage, &piepointend, pieptr); pieptr->currpercent = percentage; /* get corinates for title */ } CPoint *CPie::piecalc(double percent, CPoint *firstpt, PieWnd *pieptr) { double PI = 3.1415926535897931; double angle = percent / 100; angle = angle * 360; // angle = angle * PI / 180; CRect pierect; double radius = pieptr->ellipserect.Height() / 2; // radius = radius * 3.0 / 5.0; double offx = (radius * sin(angle)); double offy = (radius * cos(angle)); double origx = (pieptr->ellipserect.right + pieptr->ellipserect.left) / 2; double origy = (pieptr->ellipserect.top + pieptr->ellipserect.bottom) / 2; firstpt->x = origx + offx; firstpt->y = origy + offx; /* multiple angle by pie */ return firstp```
 Re: Code to Figure out x,y cords for CDC::Pie inside an CDC::Ellipse given % Mircea Neacsu14-Mar-22 16:41 Mircea Neacsu 14-Mar-22 16:41
 Re: Code to Figure out x,y cords for CDC::Pie inside an CDC::Ellipse given % ForNow15-Mar-22 5:01 ForNow 15-Mar-22 5:01
 IPv6 address compression code using vc++ Member 1252773510-Mar-22 17:12 Member 12527735 10-Mar-22 17:12
 Re: IPv6 address compression code using vc++ Victor Nijegorodov10-Mar-22 21:06 Victor Nijegorodov 10-Mar-22 21:06
 Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function ForNow10-Mar-22 6:02 ForNow 10-Mar-22 6:02
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function RedDk10-Mar-22 8:22 RedDk 10-Mar-22 8:22
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function ForNow10-Mar-22 9:35 ForNow 10-Mar-22 9:35
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function RedDk10-Mar-22 9:40 RedDk 10-Mar-22 9:40
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Richard MacCutchan10-Mar-22 22:19 Richard MacCutchan 10-Mar-22 22:19
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function ForNow11-Mar-22 1:41 ForNow 11-Mar-22 1:41
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Richard MacCutchan11-Mar-22 1:51 Richard MacCutchan 11-Mar-22 1:51
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function ForNow11-Mar-22 2:13 ForNow 11-Mar-22 2:13
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Richard MacCutchan11-Mar-22 3:49 Richard MacCutchan 11-Mar-22 3:49
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function ForNow11-Mar-22 4:08 ForNow 11-Mar-22 4:08
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Richard MacCutchan11-Mar-22 4:19 Richard MacCutchan 11-Mar-22 4:19
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function ForNow11-Mar-22 4:46 ForNow 11-Mar-22 4:46
 Re: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Richard MacCutchan11-Mar-22 4:54 Richard MacCutchan 11-Mar-22 4:54
 Last Visit: 31-Dec-99 18:00     Last Update: 14-Aug-24 23:55 Refresh ᐊ Prev1...89909192939495969798 Next ᐅ