Solved

Wrap a SDI/MDI app via an OCX?

Posted on 2001-09-08
4
374 Views
Last Modified: 2013-11-20
I have seen articles on, and have successfully been able to wrap a modal dialog into an OCX, resulting in an OCX that has the full dialog functionality etc. This has enabled me to code a modal dialog control for use in a web page.

But is it possible to wrap an MDI/SDI app with an OCX? If so, how would this be done?

I can describe how the CDialog was wrapped by the OCX in hopes it may trigger some thoughts:

1) Create an OCX using the Visual Studio ActiveX control wizard.
2) Add a dialog to the ocx via the resource tab, then use the class wizard to generate the CDialog based class code.
3) Create a member variable within the OCX of the CDialog based class just created.
4) In the OCX's InitInstance, call CDialog::Create() on the member variable to create the dialog.
5) In the OCX's OnDraw, comment out the existing draw code and instead call the member variable's OnDraw.

This works great and I have used it often.

The issue here is that I want to create a more sophisticated UI, a splitter window similar to Windows Explorer with a tree view on the left, and a list view on the right, separated by a splitter.

Visual Studio App Wizard generates this in the form of an SDI/MDI app and it is this app I would like to wrap in the form of an OCX so that it could be used as a WEB control, or within another app as a dialog control etc.

I don't know if this is possible, but I am looking for clues as to how this could be done. I am willing to prototype and work with someone on this to get it working.

Thanks.
0
Comment
Question by:rascal
  • 2
4 Comments
 
LVL 1

Expert Comment

by:MRNMurthy
ID: 6468008
Hi,

I will try it once & get back to u.

From

MRN Murthy
0
 
LVL 2

Accepted Solution

by:
BogdyPtr earned 200 total points
ID: 6468526
If u want just a splitter look at the following link:

http://codeguru.earthweb.com/dialog/split_in_dlg.shtml
0
 
LVL 1

Author Comment

by:rascal
ID: 6477649
Thanks, that does the trick!
0
 
LVL 1

Author Comment

by:rascal
ID: 6478020
I hope I didn't speak too soon. The issue I find now is the dialog has to be a child window. This appears to hose the Splitter window since the splitter needs to be a top level window (?)

Any thoughts?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repeateFront java challenge 31 92
Add content to output file 4 62
no14 challenge 14 62
zeroMAx challenge 20 88
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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.

920 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

16 Experts available now in Live!

Get 1:1 Help Now