title: Message Systems and parameters in OOP?
body: <p>In the WinAPI, WndProc has lParam and wParam which are longs. This means you generally have to typecast them into the correct type.</p>
  
  <p>I've read that message systems in OOP should not need to cast things and that this is a bad practice. Therefore, in a language like C++, how would a basic message system work, where each message has 2 parameters, or even object pointers, depending on the message, but doing so without typecasting?</p>
  
  <p>Thanks</p>