activeX控件的动态创建问题 to(Microsoftadherent(王万新) )
static CLSID const clsid
= { 0xad962ea1, 0x4acc, 0x4345, { 0xb1, 0xe0, 0x46, 0x9d, 0x12, 0x44, 0xa9, 0x52 } }; //将被创建的控件的CLSID
int CHostTestView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
if(!m_wndSite.CreateControl(clsid,"",WS_CHILD|WS_VISIBLE,CRect(10,10,500,300),this,0))
return -1;
return 0;
}
他总是提示说创建新文档失败!不知道是为什么?