Dear All,

I am trying to understand how to create SDI based on ViewForm class that has a different dialog in the mainframe according to the type of user that has logged.

I have been playing our this afternoon and noticed that when you click on the ".rc" file in the resource folder you can create add a new dialog. Then I went to the view class and adding to his enum the token identifying the dialog ID.


After this I have modified the constructor method of the myview class changing the paramenter that gives to the CFormView upper class.

(Something like "CDialogTestView::CDialogTestView()::CFormView(IDD1){}")

The goal I wanted to achieve was to change the token basing on the login and for this I tried to call the super constructor from the constructor method body:

(Something like "CDialogTestView::CDialogTestView(){

Unfortunately it gives me the following error at compile time:
error C2512: 'CFormView' : no appropriate default constructor available

I was wondering if anyone know already a better way of doing this and if MICROSOFT has already implemented a class or method to do so.

Thanks for ur attention and Best Regards!

PS: If interested please find the source file and the project for VS 2008 at

Size approx 6.6 MB