-
January 9th, 2003, 04:54 PM
#1
access violation creating webbrowser2 control
i'm trying to add a webbrowser2 control to my app. i am receiving an 'access violation' when i attempt to create it. access violation is pointing to the following Cwnd function:
BOOL CWnd::InitControlContainer()
{
m_pCtrlCont = afxOccManager->CreateContainer(this);
}
my class definition and 'onupdate' function follows:
class CInitialWnd : public CWnd
private:
CWebBrowser2 m_target;
int CInitialWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CWnd::OnCreate(lpCreateStruct) == -1)
return -1;
DWORD dwStyle = WS_VISIBLE | WS_CHILD;
m_target.Create(NULL, dwStyle, CRect(0, 0, 100, 100), this, ID_BROWSER_TARGET);
return 0;
}
thanks in advance,
chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|