BUG: Using Scriptlet Control in MFC App causes assertionID: Q190838
|
When using the Microsoft Scriptlet Component in a Visual C++ MFC SDI application, calling the CWebBridge::Create method causes an assertion in Occsite.cpp at line 1475.
If you want to use the Scriptlet Componenet in Visual C++ applications, you must automate the component. Please see the MORE INFORMATION section for an example of how to do this.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
#include "WebBridge.h"
CWebBridge m_webBridge;
CRect rc;
m_webBridge.Create(NULL, WS_VISIBLE|WS_CHILD, rc, this,
IDC_WEBBRIDGE);
#import <mshtmlwb.dll> // This DLL should be in your system dir
using namespace WBLib;
#include <comdef.h> // Needed for Compiler COM support
IWebBridgePtr m_webBridge;
CoInitialize(NULL);
void CMyView::OnInitialUpdate()
{
CView::OnInitialUpdate();
// Create an instance of the Scriptlet Component.
// Here, I am asking for a pointer to the IWebBridge interface.
// You could ask for IWBScriptControl or query for it later.
HRESULT hr = CoCreateInstance(_uuidof(Scriptlet), NULL,
CLSCTX_INPROC_SERVER,
_uuidof(IWebBridge),
(void**)&m_webBridge);
if (SUCCEEDED(hr))
{
// Insert some code here
}
}
BOOL bScrollbar;
bScrollbar = m_webBridge->GetScrollbar();
TRACE("Scrollbar is %s\n", bScrollbar ? "on" : "off");
For more information, please see the MSDN Web Workshop:
http://msdn.microsoft.com/workshop/default.aspSearch on "Dynamic HTML Scriptlets."
© Microsoft Corporation 1998, All Rights Reserved.
Contributions by Scott Roberts, Microsoft Corporation
Additional query words:
Keywords : kbCtrl kbIE400bug kbIE401bug kbScript kbIE401sp1bug kbIE500bug
Version :
Platform :
Issue type : kbbug
Last Reviewed: April 9, 1999