I’ve wrote a class wrapping a grid controls.
I want to init the custom grid class when it is created by calling Create function.
Is there a way that i can catch the event?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, if CWnd:Create or Cwd:CreateEx is used, it is possible to catch the Win32 event with:
See CWnd::OnCreate
With the corresponding mapping:
Attention: If your control is directly added on a dialog template by the designer (ie, using DDX), the function CWnd:.OnCreate() is not called.
In all cases, the following function is called at creation, after the Hwnd (handle of window) is initialized:
See PreSubclassWindow
Best regards,
Alain