So I've started learning Windows C++ programming from the tutorial found on MSDN and got a bit confused by application state management. I'm rather new to coding so this might be a dumb question.
The page says:
"When you receive the WM_NCCREATE and WM_CREATE messages, the lParam parameter of each message is a pointer to a CREATESTRUCT structure."
Then:
"Here is how you extract the pointer to your data structure. First, get the CREATESTRUCT structure by casting the lParam parameter."
And proceeds to
CREATESTRUCT *pCreate = reinterpret_cast<CREATESTRUCT*>(lParam);
What I don't get is if the lParam was already a pointer to a Createstruct,why do I have to cast it?