当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 这是我的一段代码,但是不起作用! socket s; struct ip_mreq ipmr; struct sockaddr_in local,from; char recvbuf[2480]; int len=sizeof(struct sockaddr_in); long ret; s=socket(af_inet,sock_dgram,0); local.sin_f......
    摘要: 怎样才能在没装.net的操作系统(如win98)中运行.net生成的exe文件 ......


在HtmlView中如何改变链接.(在线守候)

在HtmlView中如何改变链接.  
  如在网页中有二个链接  
  <a   href="aa.htm">aa</a>  
  <a   href="bb.htm">bb</a>  
  现在我想改变<a   href="aa.htm">aa</a>的链接.改成<a   href="cc.htm">cc</a>.  
  请问有什么方法呢?千万别告诉我用查找字符串替换字符串哦.  
 

NO.1   作者: masterz

void   CChangeurlView::OnEditChangeurl()    
  {  
  //   please   note   that   you   have   to   release   those   interface   pointer  
  IDispatch*   spDisp;  
  spDisp=GetHtmlDocument();  
  IHTMLDocument2*   spDoc;  
  spDisp->QueryInterface(IID_IHTMLDocument2,(void**)&spDoc);  
  IHTMLElementCollection*   pColl;  
  spDoc->get_anchors(&pColl);  
  long   num;  
  HRESULT hr=pColl->get_length(&num);  
  for(long   i=0;i<num;i++)  
  {  
  IDispatch*   spDisp2;  
  pColl->item(_variant_t(i),_variant_t(i),&spDisp2);  
  IHTMLAnchorElement*   spAnchor;  
  spDisp2->QueryInterface(IID_IHTMLAnchorElement,(void**)&spAnchor);  
  if(spAnchor)  
  spAnchor->put_href(_bstr_t("http://www.csdn.net"));  
   
  }  
   
  }  
 


    摘要: 我想实现这样的功能,对excel中某行某列改为一个新值: 我用了 datasheet.cell(4,1).value = "abc" 但是不行呀,不知道怎么办了? 大家帮忙了,谢谢!! ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE