Link to home
Start Free TrialLog in
Avatar of HStrix
HStrix

asked on

Display menu with form

Hello Experts,
I'm new in VC++.
I created an MFC application (in .Net 2002 unmanaged C++) as SDI and added a resource form (IDD_FORMVIEW).
Now I want that after starting the application the menu with the form is displayed.
Actually only the menu and the toolbar is displayed.
If anyone knows what I need to do,
please supply an appropriate information.

Thank you for any help.

  HStrix
Avatar of Member_2_1001466
Member_2_1001466

Is the view of that app derived from CFormView? In that case it should be done automatically. Otherwise you can create a new project where you select within the appwizard that the view is derived from CFormView. That way it will start automatically with that view. Otherwise you need to add a class to the form (IDD_FORMVIEW) derived from CFormView. And now you need to replace all calls to the old view class with that new one. Decide yourself which way is faster.
Avatar of HStrix

ASKER

Thank you SteH,
I created the MFC environment,
then I added the resource using IDD_FORMVIEW.
Now clicking the right mouse on the form I created a new class
called CMyForm based on CFormView (ID=IDD_FORMVIEW).
But the result is still unchanged.
I did not change anything to the "old view class", is it CFormView?
I found CFormView only in my new class.

  HStrix
ASKER CERTIFIED SOLUTION
Avatar of Member_2_1001466
Member_2_1001466

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HStrix

ASKER

Thank you SteH,
now I modified inside CYourApp the line
  RUNTIME_CLASS(CYourView));
to
  RUNTIME_CLASS(CMyForm));
and added the header file MyForm.h.
And - it works as expected.

Again, thank you very much.

  HStrix