I believe the best way is to create an instance of the class by 'new' keyword, define a pointer in global scope, create an instance of it in
OnInit() by 'new' keyword and assign it to the pointer, then delete it in OnDeinit(), it is well described in the following post:
Another work around would be setting 'm_deinit_reason' to WRONG_VALUE by overriding CAppDialog::Create function virtually, since it is a
public method of the class and it is the only function that calls CreateCommon, and then use the new derived class instead.
Mohammad, a great solution. There is one question. How to access the methods of the created instance of the object in the body of the CMyAppDialog ::
What is the syntax?