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

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


Multiple activation of embedded items

Vinay Wadhwa -- vinay@hclind.hclc-ggn.hcla.com
Thursday, August 22, 1996


Environment: MSVC 4.0, Windows 95

	I am trying to activate two embedded items of
Netscape in two different panes of my OLE container,
that is in the form of a splitter frame. I want to activate
both of the items simultaneously. To achive that I commented out
the lines in OnActivate as Under:
( NSHyperTextDocument is derived from COleClientItem)

void NSHyperTextDocument::OnActivate()
{
	CView* pView = GetActiveView();
	ASSERT_VALID(pView);
	COLEClientItem * pItem = GetDocument()->GetInPlaceActiveItem(pView);
	//  if (pItem != NULL && pItem != this)
	 //        pItem->Close();
	     
	  COleClientItem::OnActivate();
  }

	The problem is that I get two toolbars of the Server Item
instead of one . How do we hide or remove one of the toolbars.
I tried to use 
	pItem->DoVerb(OLEIVERB_SHOW, pParentWnd)
	pItem->DoVerb(OLEIVERB_INPLACEACTIVATE, pParentWnd)

after CreateNewItem() of NSHyperTextDocument (COLeClientItem)

	Any help will be appreaciated.

	Mukesh
	mkgupta@hclggn.hcla.com





Mike Blaszczak -- mikeblas@nwlink.com
Monday, August 26, 1996

At 08:49 PM 8/22/96 IST, you wrote:

>	I am trying to activate two embedded items of
>Netscape in two different panes of my OLE container,
>that is in the form of a splitter frame.

That's a very unique design.  I'm not perfectly sure that OLE supports this
model. In-place activation means there's a certain relationship between the
frame and the object that's gone in-place active. I don't think there's any
standard for what has to happen when more than one object goes in-place active.

>
>	The problem is that I get two toolbars of the Server Item
>instead of one . How do we hide or remove one of the toolbars.
>I tried to use 

You can't.  When an object goes inplace active, it is allowed to display
whatever toolbars it wants to.  Unless the Netscape objects that you're
containing have some automation feature that would let you turn off their
toolbars, there's nothing you can do.

You _might_ be able to hack the automation code to make one of the two
instances create its toolbar window outside of your client area (and
effectively be visible), but I'm not sure you can actually get that to work.
It wouldn't be very much fun, at least.

.B ekiM
http://www.nwlink.com/~mikeblas/
These words are my own. I do not speak on behalf of Microsoft.





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