I have a custom MFC dialog CMyDialog, with a custom control of type CMyControl added using the resource editor - the dialog has a member variable for the control and has DDX set up.
The control is receiving paint messages, and has a custom on-paint handler. But I want to have the equivalent of OnInitDialog in the control, so it can safely do some initialisation when created - putting the code in the constructor leads to problems.
I tried to add handlers for WM_CREATE, WM_NCCREATE messages, and adding overrides to CWnd::Create... but none of these are firing.
What should I watching for, to know it's safe to edit stuff?