Solved

Show CFormView inside ActiveX control

Posted on 2002-03-26
3
579 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
MTPudelko earned 50 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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 …
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.

739 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