Recently, I am learning MFC, following codes puzzled me a lot:
class CRect : public tagRECT
{
public:
// Constructors
// uninitialized rectangle
CRect();
// from left, top, right, and bottom
CRect(int l, int t, int r, int b);
// copy constructor
CRect(const RECT& srcRect);
// from a pointer to another rect
CRect(LPCRECT lpSrcRect);
// from a point and size
CRect(POINT point, SIZE size);
// from two points
CRect(POINT topLeft, POINT bottomR
...
The base class of CRect is a struct! I never learned this before.And if I call
CWnd::GetClientRect(LPRECT lpRect);
I can use rect or &rect (CRect rect)as the parameter.It's amazing!
I want to know some rules about the class with struct base. Thank you!