15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


How to implement ActiveX Document View class?

Michael S. Scherotter -- mss@tartus.com
Tuesday, May 07, 1996

Using MFC 4.1 / Win95 or NT 3.51/4.0

Based on the ActiveX Development Kit's OLE Document Specification:
I want to create an OLE object that represents a OLE Document View, implementing
the following interfaces using MFC:

IOleDocumentView
IOleCommandTarget
IPrint
IOleInPlaceObject
IOleInPlaceActiveObject

There is documentation for the first three, but does anyone have suggestions
for implmenting the other two interfaces?
Should I derive from CCmdTarget, CView (Preferable), or any other class?

Thanks in advance,

Michael


-- 
Michael S. Scherotter            |Architectural Design Tools
Lead Software Developer          |AutoCAD Applications
Tartus Development, Inc.         |Custom CAD Solutions
630 Las Gallinas Ave #300        |__________________________ 
San Rafael, CA 94903                          mss@tartus.com
(415) 491-8925                          michael@charette.com
(415) 491-8921 (fax)               71035.1675@compuserve.com
____________________________________________________________



Mike Blaszczak -- mikeblas@msn.com
Friday, May 10, 1996

----------
From: 	owner-mfc-l@netcom.com on behalf of Michael Scherotter
Sent: 	Tuesday, May 07, 1996 12:11

> Using MFC 4.1 / Win95 or NT 3.51/4.0

Thanks.

> Based on the ActiveX Development Kit's OLE Document Specification:
> I want to create an OLE object that represents a OLE Document View,

The BINDSCRB sample already does this.  Since you know what interfaces are 
involved, you could have found that out for yourself by using the "Find in 
Files" command to search *.cpp and *.h files in the SAMPLES\MFC directory (and 
subdirectories) of your VC++ CD.

 > IOleDocumentView
 > IOleCommandTarget
 > IPrint
 > IOleInPlaceObject
 > IOleInPlaceActiveObject

The last two interfaces are already implemented by MFC.  The first three 
interfaces are implemented in the sample.  The sample largely goes away in MFC 
4.2, by the way: all the code has been moved in to MFC itself.  That is, MFC 
4.2 inherently supports OLE DocObjects.

> There is documentation for the first three, but does anyone have suggestions
> for implmenting the other two interfaces?

There's stacks of documentations on the last two, too.

> Thanks in advance,

Yeah, whatever.

.B ekiM
TCHAR szNixon[] = _T("People have gotta know if thier foundation class team 
members are crooks.  Well, I'm not a crook: I've worked for everything I have. 
Why, these very words are my own.");



Dave Kolb -- sasdxk@unx.sas.com
Monday, May 13, 1996

[Mini-digest: 2 responses]

...
>interfaces are implemented in the sample.  The sample largely goes away in MFC 
>4.2, by the way: all the code has been moved in to MFC itself.  That is, MFC 
>4.2 inherently supports OLE DocObjects.
...

I heard at TechEd that that 4.2 (beta ?) will be on the post TechEd CD, is
this true? Will it include AppWizard support for DocObjects?

Thanks,

Dave Kolb                     Compuserve: 72410,407@compuserve.com
SAS Institute, Inc.           EMAIL:      sasdxk@unx.sas.com
SAS Campus Drive - R3282      Phone:      (919) 677-8000 x6827
Cary, NC  27513-2414 USA      FAX:        (919) 677-8123

-----From: Steven Binney 

Using MFC 4.1 on NT 4.0

I have two questions on MFC 4.2:

1) Will MFC 4.2 support free threading in MFC based servers?.  When I =
tried to enable free threading in my MFC 4.1 OLE server (change =
OleInitialize() to CoInitialializeEx(NULL,COINIT_MULTITHREADED)), my =
server crashed.  Does 4.1 not support this or did I make a mistake?

2) Will the Active X Template Library (ATL) be supported in VC++ 4.2??  =
Will  IDL generation of exposed method interfaces and  more than 3 =
objects/interfaces be included??=20




Mike Blaszczak -- mikeblas@msn.com
Wednesday, May 15, 1996

----------
From: 	owner-mfc-l@netcom.com on behalf of Dave Kolb
Sent: 	Monday, May 13, 1996 06:23

 > I heard at TechEd that that 4.2 (beta ?) will be on the post TechEd CD, is
 > this true? Will it include AppWizard support for DocObjects?

A very immature not-even-alpha quality build of MFC 4.2 was made available at 
The Internet PDC in San Francisco in March.  I requested that same build of 
MFC be put on the TechEd 1996 post-conference CD and I was told it was being 
taken care of.  Since nobody listens to me (ie, folks still send me questions 
privately as if I owe everyone in the world eight hours of free consulting), 
I'm not sure the files will really, really be there.

That release is just MFC: it isn't a new IDE or any other components.  So, 
that code doesn't have Wizard support for DocObjects.  The final DocObject 
support is so easy that even a politician could add DocObject support to their 
application.  I'm not as fat as some politicians, but I'm drunker than most, 
so I should know.

-----From: Steven Binney 

 > I have two questions on MFC 4.2:
 > 1) Will MFC 4.2 support free threading in MFC based servers?
 > 2) Will the Active X Template Library (ATL) be supported in VC++ 4.2?? 

I'm sorry: I'm not in a position to answer questions about future Microsoft 
products.  I can't answer questions like yours even though you did use a 
inappropriate subject line to try and mask your intentions.

The only information that's been made public about MFC 4.2 (withstanding the 
pre-alpha incomplete mispelled #ifdef MIKEBLAS hackola release that was made 
in March at the PDC) is:

+ it will support DocObjects inherently
+ it will support WININET.DLL
+ it will support creation of OLE 96 controls
+ it has many clever performance enhancements
+ it will support some other neat ActiveX thingies
+ it will not support development of Win32s applications

Except for the Win32s thing, you could have learned all of this by going to 
TechEd this year.  Since it seems like you need to know this stuff, why didn't 
you go to TechEd?

.B ekiM
TCHAR sz[] = _T("Done-bun can't be undone.");





| Вернуться в корень Архива |