Solved

Show CFormView inside ActiveX control

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now