About CFormView...

i made a MDI project,and derive CMyView
from CView,
but now i want to change CMyView,i want
to derive it from CFormView and after
i derived it how can i insert a new form
for CMyView??
(without create a new Class)
dlxtAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vinayak KumbarSr Program ManagerCommented:
Hi,

Create one more project with the same name. Now this time u derive the view from CFormView. Then copy those view.cpp and view.h file to the existing project. I mean replace the old view files. That will work

Try it out.
VinExpert
0
akalmaniCommented:
Hi dlxt !!
    Hope this helps u out

1) change the base class of CMyView to CFormView
2)Add a form in resources
3)change the base class for Implement_dynacreate to CFormView
4)change the base class for Message_map to CFormView
5)In the constructor call the base class constructor: CMyView::CMyView()
      : CFormView(CMyView::ID_FORM)
where ID_FORM is the ID of the form from resources.

0
Vinayak KumbarSr Program ManagerCommented:
Hi,

along with that u have to modify the resource also.
open both the *.rc files in the text mode.
In the new rc file, there is one more dialog template, copy that dialogs content say
IDD_MDIDELVIEW_FORM      DIALOG DISCARDABLE 0, 0, 185, 93
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
//some static control will be there which i have removed
END

and paste in the old projects rc in the dialogs section.
In resource.h file define the ID IDD_MDIDELVIEW_FORM.

Thats it. Now compile the old project, and run it. U will get Ur view of CFormView.

Try it out.
VinExpert
0
Vinayak KumbarSr Program ManagerCommented:
Hi,

What happened?. Have U solved the Prob?

VinExpert
0
Vinayak KumbarSr Program ManagerCommented:
Hi,
What happened?. Have U solved the Prob?

VinExpert
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.