OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Brian Muth (bmuthSWI.COM)
Date: Mon Dec 03 2001 - 12:47:41 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    :-) :-) I can't imagine anyone other that Tim coming up with this.

    >
    > AFAIK, it's not there automatically. But you can build it
    > into your control or host. Look at WM_GETISHELLBROWSER in
    > Q157247 for an example in the Shell. And review
    > CAxWindow::QueryControl for controls hosted in ATL.
    >

    Along this same vein, it is sometimes useful for an OCX control to know
    which HTML element is referencing it. For anyone that cares, this works
    just dandy...

     CComBSTR id;
     CComQIPtr<IOleControlSite> pSite = m_spClientSite;
     if (pSite != NULL)
     {
      CComPtr<IDispatch> pExt;
      if (SUCCEEDED (pSite->GetExtendedControl (&pExt)))
      {
       CComQIPtr<IHTMLElement> pElem = pExt;
       if (pElem != NULL)
       {
        pElem->get_id (&id);
       }
      }
     }

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM