view是通过chtmlview类显示的网页,如何在其中加入广告位?
解决方案 »
- 怎么用安装DLL取代注册DLL
- 菜鸟,播放器如何在全屏模式下去掉窗口标题栏
- 多文档多视图重载CMainFrame的OnClose()函数偶尔出错是什么原因啊?(建议也有分)
- 编辑框出现"1:1#INF"是什么意思
- 使用TryEnterCriticalSection的问题
- Connecting SQL Sever时的奇怪问题
- 请教:PDA上的数据库
- 哪里的论坛(forum)人流量最大,大家能交流得更多!--提高学习效率的革命
- 关于手机输入法的编程问题
- VC的对话框应用程序,创建对话框时CREATE和DOMODAL有什么区别?
- 在vc中list members功能有快捷键吗?
- 急!急!Cserialport 类的调用
IHTMLDocument2* phtmldoc2 = NULL;
IHTMLElement* phtmlElement = NULL;
IDispatch* pdisp = NULL;
IHTMLBodyElement* phtmlBodyElement = NULL;
pdisp = this->GetHtmlDocument();
if(pdisp != NULL)
{
pdisp->QueryInterface(IID_IHTMLDocument2,(void**)&phtmldoc2);
pdisp->Release();
}
if(phtmldoc2 != NULL)
{
phtmldoc2->get_body(&phtmlElement);
phtmldoc2->Release();
}
if(phtmlElement != NULL)
{
phtmlElement->insertAdjacentHTML("afterBegin","you ad code");//插入你的广告
}
CHtmlView::OnDocumentComplete(lpszURL);