Beginner question.
In Win32API, the second parameter of ::GetClientRect is LPRECT, but It receives both CRect and CRect*.
I tried to see how LPRECT is defined, but it seems just an ordinary pointer to struct:
typedef struct tagRECT
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
And CRect inherits tagRECT:
class CRect :public tagRECT {...}
Using MFC, CWnd::GetClientRect works the same way:
CRect rect;
GetClientRect(&rect); // works
GetClientRect(rect); // works too.
How is this possible? Please let me know if I am missing some basic concepts of C++.