I'm trying to include into my Dialog Window Procedure, that when the msg WM_CTLCOLORSTATIC is received that I get the ID of the Control that is sending the message.
case WM_CTLCOLORSTATIC:
UINT ID = GetWindowLong((HWND)lParam, GWL_ID);
Problem is... when I try to type-cast the lParam of WM_CTLCOLORSTATIC it returns the value 65535, which can't be correct; I don't even have a resource item with the maximum UINT ID 65535.
Can you give me any insight into why this is happening?