3 Answers
3

const LPCREATESTRUCT expands to CREATESTRUCT* const, i.e. a constant pointer to non-const structure, while
const CREATESTRUCT* is a non-constant pointer to constant structure, so the compiler is right.

In addition to avoiding any confusion about exactly what is const, by using C++ references you've also said in code that the argument "can't" be NULL. (Yes, somebody could write OnCreate(hWnd, *(static_cast<CREATESTRUCT*>(NULL))) to create a null reference).