This sample application shows how to pass application state data in the WM_NCCREATE message.
The BaseWindow sample application is a variation on the Windows Hello World Sample. It uses the WM_NCCREATE message to pass application data to the window procedure. This sample is discussed in the topic Managing Application State.
Downloading the Sample
This sample is available here.