Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Show CFormView inside ActiveX control

Posted on 2002-03-26
3
Medium Priority
?
591 Views
Last Modified: 2013-11-20
Hi,
Can someone tell me how to show and handle
CFormView inside ActiveX control
Thanks,
Sansky
0
Comment
Question by:sansky_potov
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
MTPudelko earned 150 total points
ID: 6907618
Hi Sansky,

I've found the following article very helpful for doing this type of thing:
http://www.microsoft.com/mind/defaulttop.asp?page=/mind/0497/mfc.htm&nav=/mind/0497/inthisissuecolumns0497.htm

There is a neat CActiveXDocControl class that you can use to create MFC ActiveX controls that use the doc/view architecture. In your case, you'll be able to get your formview into your control by adding a form to your project, and substituting the newly created CFormView-derived class that your new form is hooked up to in the call to AddDocTemplate. After that, you will be able to manage your control in a way similarl to any regular doc/view app, for instance, getting pointers to your Document, Frame, and View from various places using GetDocument(), GetParentFrame(), GetActiveView().

Hope this helps!

Regards,
Mike
0
 

Author Comment

by:sansky_potov
ID: 6910074
Hi,
Thanks for the help. I found this article and worked it out,
but found that it works for CView. For CFormView there are
few more things that needs to be done. Although I worked out
that. I will give you the points.

Thanks
Sansky
0
 

Author Comment

by:sansky_potov
ID: 6910075
Hi,
Thanks for the help. I found this article and worked it out,
but found that it works for CView. For CFormView there are
few more things that needs to be done. Although I worked out
that. I will give you the points.

Thanks
Sansky
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

886 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