Not gettting WM_CREATE in subclassed edit control

I have an edit control, who is a child of the main window and I have subclassed the edit control procedure and I never get WM_CREATE. Please help
Well, think about it. You have a CreateWindowEx() call to create the edit control. Before that call returns and the HWND of the edit control is assigned to whatever variable you have assigned to capture it, the WM_CREATE handler code within the system dlls will execute. So only after the internal WM_CREATE returns, will the HWND be assigned to your variable. At that point you call SetWindowLong() to subclass the control, but at that point the WM_CREATE message is long gone.
You're spot on freddie1! Didn't think about that. Thanks
Last edited on
Topic archived. No new replies allowed.