Thanks for the links.. look, i've been through this a hundred times and I just can't see what i am doing wrong.
I create the window...
Code:
hwnd = CreateWindowEx(0,
TEXT("ChildClass"),
TEXT(""),
WS_CHILDWINDOW | WS_VISIBLE,
0, 0,
100, 100,
hParent,
NULL,
hInstance,
this);
And then I try to get the data.. in the WM_CREATE message, WM_NCCREATE, prior to processing any messages. It doesn't matter how I go about it I just can't get the pointer to the class! Any ideas?
Code:
CChild *child = 0;
child = (CChild *)GetWindowLong(hwnd, GWL_USERDATA);
Looking under the debugger, child is not set - I have tried everything but I can't get the value back. Any ideas...