Original Post
well... I have created a Button class
like this
class cButton {
HWND hWnd;
public:
cButton(void);
virtual ~cButton(void);
HWND getHWND() { return hWnd; }
void Create(char *name, int startx, int starty, int width, int height);
};
so now I would like to know if I can create an operator thing to replace the getHWND() function so I can send my cButton class directly to anything that wants the button hWnd?!
e.g.
cButton *MyButton = new cButton;
MyButton->Create("OK", 10, 10, 50, 20);
// replace this line
HWND hButton = MyButton->getHWND();
// with this line
HWND hButton = (HWND)MyButton;
is it posible ?
I want some kind of generic explanation so I can implement it for other things to.
like my cVertex3f class
so I can write like this
cVertex3f v1;
cout << "Vertex 1: " << v1 << endl;
and the output would be something like this
Vertex 1: (0.1, 5.43, 8.76)