Solved

Show CFormView inside ActiveX control

Posted on 2002-03-26
3
585 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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: 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…
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

631 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