I have a custom MFC control, a subclass of CWnd. In addition to providing OnPaint and PreSubclassWindow implementations, it does not override any default functionality and does nothing strange in the design, except registering the window class in the constructor.
The control is added to the dialog using the dialog editor to add a custom control.
The dialog worked when it was a simple modal dialog obtained from CDialog, but we have code that calls CWnd :: CreateDlgIndirect to the instance dialogs, and this fails with a custom control ... but it works if the user control removed from resource template.
source share