class CPoint: public tagPOINT
{
public:
CPoint(LPARAM lParam)
{
x = GET_X_LPARAM(lParam);
y = GET_Y_LPARAM(lParam);
}
};
is it safe to use it as follows:
OnLButtonDown(&CPoint(lParam));
Thanks
Nic
Looks OK to me, assuming OnLButtonDown doesn't try to save the pointer somewhere for later use. Any reason it takes a pointer and not a const reference?
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925