Solved

Show CFormView inside ActiveX control

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
function returning CString in a regular win32 DLL 8 176
VBA "SendKeys" Syntax for Multiple Keystrokes 7 108
sum67 challenge 35 97
How to convert MFC::CString to UTF8 wchar_t* 10 203
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…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 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