Click here to Skip to main content
15,905,558 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: changing the color of the previous selected node of CtreeCtrl Pin
Rory Solley13-Apr-04 22:05
Rory Solley13-Apr-04 22:05 
GeneralFinding Time Difference in milli seconds Pin
swarnamanoo13-Apr-04 18:39
swarnamanoo13-Apr-04 18:39 
GeneralRe: Finding Time Difference in milli seconds Pin
PJ Arends13-Apr-04 19:04
professionalPJ Arends13-Apr-04 19:04 
GeneralRe: Finding Time Difference in milli seconds Pin
ohadp13-Apr-04 21:07
ohadp13-Apr-04 21:07 
GeneralRe: Finding Time Difference in milli seconds Pin
David Crow14-Apr-04 2:46
David Crow14-Apr-04 2:46 
GeneralOperator Overloading Pin
jss67200113-Apr-04 18:21
jss67200113-Apr-04 18:21 
GeneralRe: Operator Overloading Pin
Anonymous13-Apr-04 19:06
Anonymous13-Apr-04 19:06 
GeneralRe: Operator Overloading Pin
jss67200113-Apr-04 21:25
jss67200113-Apr-04 21:25 
do I need to do something similiar as below in point2d.cpp

//Point2d.cpp
#include <iostream>
using namespace std;
#include "Point2D.h"
Point2D::Point2D()
{
setX(0);
setY(0);
}
Point2D::Point2D(double a, double b)
{
setX(a);
setY(b);
}
Point2D::Point2D(const Point2D& p)
{
setX( p.getX() );
setY( p.getY() );
}
Point2D Point2D::getPoint() const
{
return (*this);
}
double Point2D::getX() const
{
return x;
}
double Point2D::getY() const
{
return y;
}

void Point2D::setX(double a)
{
x = a;
}
void Point2D::setY(double b)
{
y = b;
}
void Point2D::setPoint(const Point2D& p)
{
setX( p.getX());
setY( p.getY());
}
Point2D Point2D::operator+(const Point2D& p)
{
return Point2D( getX()+p.getX(), getY()+p.getY());
}

Point2D Point2D::operator-(const Point2D& p)
{
return Point2D( getX()-p.getX(), getY()-p.getY());
}

bool Point2D::operator<(const Point2D& p) const
{
return (getX() < p.getX() || getY() < p.getY());
}

bool Point2D::operator>(const Point2D& p) const
{
return (getX() > p.getX() || getY() > p.getY());
}
bool Point2D::operator==(const Point2D& p) const
{
return (getX() == p.getX() && getY() == p.getY());
}
Point2D& Point2D::operator++(void)
{
setX(getX()+1);
setY(getY()+1);

return *this;
}

Point2D Point2D::operator++(int dummy)
{
Point2D p = *this;

setX(getX()+1);
setY(getY()+1);

return p;
}




ostream& operator<<( ostream& o, const Point2D& p)
{
o << "(" << p.getX() << ", " << p.getY() << ")";
return o;
}


Thanks
GeneralRe: Operator Overloading Pin
Mike Beckerleg13-Apr-04 22:06
Mike Beckerleg13-Apr-04 22:06 
QuestionHow to make a function called when IE browser window size changes? Pin
bin892213-Apr-04 17:06
bin892213-Apr-04 17:06 
AnswerI also tried DISPID_WINDOWSETLEFT, but it doesn't work. Pin
bin892213-Apr-04 17:07
bin892213-Apr-04 17:07 
GeneralRe: help me please... i'll be grateful... Pin
rahumaan13-Apr-04 16:36
rahumaan13-Apr-04 16:36 
GeneralRe: help me please... i'll be grateful... Pin
Anonymous13-Apr-04 17:24
Anonymous13-Apr-04 17:24 
GeneralLoad an image from a URL Pin
Steve Messer13-Apr-04 15:16
Steve Messer13-Apr-04 15:16 
Generalbuttons and config file for MFC Pin
catngo13-Apr-04 14:35
catngo13-Apr-04 14:35 
GeneralRe: buttons and config file for MFC Pin
gUrM33T13-Apr-04 15:23
gUrM33T13-Apr-04 15:23 
GeneralCSocket use Pin
dyerstein13-Apr-04 13:18
dyerstein13-Apr-04 13:18 
GeneralRe: CSocket use Pin
vcplusplus13-Apr-04 14:52
vcplusplus13-Apr-04 14:52 
GeneralRe: CSocket use Pin
gUrM33T13-Apr-04 15:26
gUrM33T13-Apr-04 15:26 
GeneralJava &amp; Javascript errors in CHtmlView app Pin
trof13-Apr-04 12:22
trof13-Apr-04 12:22 
Generalchanging font in CEdit Pin
dart1313-Apr-04 11:54
dart1313-Apr-04 11:54 
GeneralRe: changing font in CEdit Pin
Gary R. Wheeler13-Apr-04 15:13
Gary R. Wheeler13-Apr-04 15:13 
GeneralRe: changing font in CEdit Pin
dart1313-Apr-04 20:41
dart1313-Apr-04 20:41 
GeneralVC6 to VC.NET Pin
brdavid13-Apr-04 11:09
brdavid13-Apr-04 11:09 
GeneralRe: VC6 to VC.NET Pin
Maarten Kools13-Apr-04 11:53
professionalMaarten Kools13-Apr-04 11:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.