[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

About CFormView...

Posted on 1999-12-22
5
Medium Priority
?
267 Views
Last Modified: 2013-11-20
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)
0
Comment
Question by:dlxt
  • 4
5 Comments
 
LVL 8

Expert Comment

by:Vinayak Kumbar
ID: 2299927
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
 
LVL 3

Expert Comment

by:akalmani
ID: 2299941
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
 
LVL 8

Expert Comment

by:Vinayak Kumbar
ID: 2299949
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
 
LVL 8

Expert Comment

by:Vinayak Kumbar
ID: 2328180
Hi,

What happened?. Have U solved the Prob?

VinExpert
0
 
LVL 8

Accepted Solution

by:
Vinayak Kumbar earned 100 total points
ID: 2356916
Hi,
What happened?. Have U solved the Prob?

VinExpert
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Suggested Courses

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question