int CKkCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;

// TODO: Add your specialized creation code here
CRect rect;
GetClientRect (&rect);

ASSERT(m_pBrowser);

if (!m_pBrowser.Create(NULL,NULL,WS_VISIBLE,rect,this,IDD_BROWSER))
{
TRACE("failed to create browser\n");
delete m_pBrowser;
//m_pBrowser = NULL;

} // Initialize the first URL.
COleVariant noArg;
m_pBrowser.Navigate("www.microsoft.com",&noArg,&noArg,&noArg,&noArg);
return 0;
}CKkCtrl是派生于COleControl--》class CKkCtrl : public COleControl