mapobject学习笔记-在鹰眼指示窗口中拖动方框代码_魏国强 的 博客.htm

来自「MO+VC的学习文档资料」· HTM 代码 · 共 1,270 行 · 第 1/4 页

HTM
1,270
字号

			try{
					var ed=editor.window.document.body;
					ed.innerHTML="";
					editor.window.focus();
				}catch(e){
					var cmt=cmtForm.getElementsByTagName("textarea")[0];
					cmt.value="";
					cmt.focus();
			}

			G("cancleReLink").style.display="none";
			cmtForm.btn_ok.value="发表评论";
		}

		function gotoreply()
		{//to checking whether reply cmt
			if( window.location.hash.indexOf("&re=1")<0) return;
			var cmtID=window.location.hash.split("&")[0].replace("#","");
			var cmtlinks=document.getElementsByTagName("a");
			for(var i=0,n=cmtlinks.length;i<n;i++)
			{
				if(cmtlinks[i].name==cmtID){ var rename=cmtlinks[i].getAttribute("rename");  repid=cmtlinks[i].getAttribute("repid"); break;}
			}
			if(typeof(rename)!="undefined"){
				cmtreply(rename, repid);
			}
		}

//-->
</SCRIPT>

<SCRIPT type=text/javascript>
    /*<![CDATA[*/

window.onerror=function(){return true;}

var RelatedDocData = null, GetAndEval = false;
(function(){
	var xhr = BdAjax.getXHR();
	if(xhr == null){
		RelatedDocData = -1;
		return;
	}

	xhr.open("GET", "/sys/search?type=8&word=MapObject%D1%A7%CF%B0%B1%CA%BC%C7%A3%AD%D4%DA%D3%A5%D1%DB%D6%B8%CA%BE%B4%B0%BF%DA%D6%D0%CD%CF%B6%AF%B7%BD%BF%F2%B4%FA%C2%EB&item=552632fa24b1891aa8d31136&t=" + new Date().getTime(), true);
	xhr.onreadystatechange = function(){
		if(xhr.readyState == 4){
			if(xhr.status == 0 || xhr.status == 200){
				if(GetAndEval){
					eval(xhr.responseText);
				}else{
					RelatedDocData = xhr.responseText;
				}
			}
		}
	}
	xhr.send(null);
})();
/*]]>*/
</SCRIPT>

<META content="MSHTML 6.00.2900.3395" name=GENERATOR></HEAD>
<BODY onload=formatonlinpic();>
<CENTER>
<SCRIPT type=text/javascript>/*<![CDATA[*/if(top.location != self.location){	top.location = self.location;}var myref = encodeURIComponent("http://hi.baidu.com/laowei/blog/item/552632fa24b1891aa8d31136%2Ehtml");/*]]>*/</SCRIPT>
<LINK href="MapObject学习笔记-在鹰眼指示窗口中拖动方框代码_魏国强 的 博客.files/mods.css" type=text/css 
rel=stylesheet><LINK 
href="MapObject学习笔记-在鹰眼指示窗口中拖动方框代码_魏国强 的 博客.files/ed37aa18922bd40735fa4177.css" 
type=text/css rel=stylesheet><LINK 
href="MapObject学习笔记-在鹰眼指示窗口中拖动方框代码_魏国强 的 博客.files/space.css" type=text/css 
rel=stylesheet>
<STYLE type=text/css>.stage {
	BACKGROUND: url(http://img.baidu.com/hi/img/tempbg6b.jpg)
}
#usrbar {
	PADDING-RIGHT: 10px; PADDING-LEFT: 0px; FONT-SIZE: 12px; BACKGROUND: #ffffff; FILTER: alpha(opacity=65); PADDING-BOTTOM: 3px; WIDTH: 100%; COLOR: #000000; LINE-HEIGHT: 19px; PADDING-TOP: 4px; FONT-FAMILY: Arial; LETTER-SPACING: normal; HEIGHT: 19px; TEXT-ALIGN: right; moz-opacity: 0.5
}
#usrbar A {
	COLOR: #0000cc; TEXT-DECORATION: underline
}
#usrbar A:link {
	COLOR: #0000cc; TEXT-DECORATION: underline
}
#usrbar A:visited {
	COLOR: #0000cc; TEXT-DECORATION: underline
}
#ft {
	CLEAR: both; FONT-SIZE: 12px; COLOR: #666666; LINE-HEIGHT: 20px; FONT-FAMILY: Arial; HEIGHT: 20px; TEXT-ALIGN: center
}
#ft A {
	COLOR: #7777cc; TEXT-DECORATION: underline
}
#ft A:link {
	COLOR: #7777cc; TEXT-DECORATION: underline
}
#ft A:visited {
	COLOR: #7777cc; TEXT-DECORATION: underline
}
#usrbar {
	LETTER-SPACING: normal
}
#usrbar A {
	LETTER-SPACING: normal
}
#usrbar A:link {
	LETTER-SPACING: normal
}
#usrbar A:visited {
	LETTER-SPACING: normal
}
#ft {
	LETTER-SPACING: normal
}
#ft A {
	LETTER-SPACING: normal
}
#ft A:link {
	LETTER-SPACING: normal
}
#ft A:visited {
	LETTER-SPACING: normal
}
</STYLE>

<DIV id=usrbar><NOBR><A id=hi_index href="http://hi.baidu.com/" 
target=_blank>百度空间</A>&nbsp;|&nbsp;<A href="http://www.baidu.com/" 
target=_blank>百度首页</A>&nbsp;
<SCRIPT type=text/javascript>		document.write('| <a href="https://passport.baidu.com/?login&tpl=sp&tpl_reg=sp&u=http://hi.baidu.com' + encodeURIComponent('/laowei/blog/item/552632fa24b1891aa8d31136%2Ehtml') + '">登录</a>');		</SCRIPT>
 </NOBR></DIV>
<DIV id=newUserTip 
style="Z-INDEX: 30000; RIGHT: 0px; FLOAT: right; WIDTH: 225px; POSITION: absolute; TOP: 26px; HEIGHT: 130px; TEXT-ALIGN: right"><A 
id=newUserTipShadow 
style="DISPLAY: block; FONT-SIZE: 14px; Z-INDEX: 30001; RIGHT: 14px; BACKGROUND: none transparent scroll repeat 0% 0%; OVERFLOW: hidden; WIDTH: 55px; COLOR: #4242f9! important; POSITION: absolute; TOP: 108px; HEIGHT: 14px; TEXT-DECORATION: none! important" 
onclick=newUserRegLog() 
href="http://passport.baidu.com/?reg&amp;tpl=sp&amp;return_method=get&amp;skip_ok=1&amp;u=http://hi.baidu.com/sys/reg/" 
target=_blank>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A> 
<EMBED id=newUserTipSwf style="WIDTH: 225px; HEIGHT: 130px" 
src=http://hi.baidu.com/ui/flash/userReg/guide.swf 
type=application/x-shockwave-flash wmode="transparent" 
allowScriptAcess="always"> </DIV>
<SCRIPT language=javascript>	<!--		function newUserTipShow(f)		{			if(f=="0"){//close				G("newUserTipSwf").style.width="40px";				G("newUserTip").style.width="40px";				G("newUserTipShadow").style.display="none";			}else{//show				G("newUserTip").style.width="225px";				G("newUserTipSwf").style.width="225px";				G("newUserTipShadow").style.display="block";			}		}		function newUserRegLog(){			var now=new Date();			now.setTime(now.getTime()+5*60*1000);			document.cookie="BDSP_REGFLAG=1;expires="+now.toGMTString()+";path=/";			new Image().src="http://hi.baidu.com/sys/statlog/1.gif?m=blog_newer_pro2_click&v=/laowei&t="+Math.random();		}	//-->	</SCRIPT>

<SCRIPT type=text/javascript>function set_cookie_4_bdtip(index/* start from one */, value){	var bdtip = document.cookie.match(/(^| )BDTIP=([^;]*)(;|$)/);	if(!bdtip){		bdtip=new Array(index);		for(var i=0,n=bdtip.length;i<n;i++)		{			if(bdtip[i]=="" || bdtip[i]==null)  bdtip[i]=0;			if(i == index - 1){				bdtip[i] = value;			}		}	}else{	bdtip = bdtip[2].split('-');	if(index > bdtip.length)  bdtip.length= index;	for(var i = 0, j = bdtip.length; i < j; i ++){		if(bdtip[i]=="" || bdtip[i]==null) bdtip[i]=0;		if(i == index - 1){			bdtip[i] = value;		}	}	}	bdtip = bdtip.join('-');	document.cookie = "BDTIP=" + bdtip+ ";expires=Wed, 28-Nov-37 01:45:46 GMT;path=/;domain=.baidu.com";}</SCRIPT>

<DIV id=main align=left><!--[if IE]>
<SCRIPT>
var objmain = document.getElementById("main");
function updatesize(){ var bodyw = window.document.body.offsetWidth; if(bodyw <= 790) objmain.style.width="772px"; else if(bodyw >= 1016) objmain.style.width="996px"; else objmain.style.width="100%"; }
updatesize(); window.onresize = updatesize;
</SCRIPT>
<![endif]-->
<DIV id=header>
<DIV class=lc>
<DIV class=rc></DIV></DIV>
<DIV class=tit><A class=titlink 
title="guoqiang_wei的空间 http://hi.baidu.com/laowei" 
href="http://hi.baidu.com/laowei">魏国强 的 博客</A></DIV>
<DIV class=desc>李白乘舟将欲行,忽听扑通跳水声;一个猛子扎下去,捞起一看是汪伦。</DIV>
<DIV id=tabline></DIV>
<DIV id=tab><A href="http://hi.baidu.com/laowei">主页</A><A class=on 
href="http://hi.baidu.com/laowei/blog">博客</A><A 
href="http://hi.baidu.com/laowei/album">相册</A><SPAN>|</SPAN><A 
href="http://hi.baidu.com/laowei/profile">个人档案</A> <SPAN>|</SPAN><A 
href="http://hi.baidu.com/laowei/friends">好友</A> </DIV></DIV>
<DIV class=stage>
<DIV class=stagepad>
<DIV style="WIDTH: 100%">
<TABLE class=modth cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD class=modtl width=7>&nbsp;</TD>
    <TD class=modtc noWrap>
      <DIV class=modhead><SPAN class=modtit>查看文章</SPAN></DIV></TD>
    <TD class=modtc noWrap align=right></TD>
    <TD class=modtr width=7>&nbsp;</TD></TR></TBODY></TABLE>
<DIV class=modbox id=m_blog>
<DIV class=tit>MapObject学习笔记-在鹰眼指示窗口中拖动方框代码</DIV>
<DIV class=date>2008-01-07 23:12</DIV>
<TABLE style="TABLE-LAYOUT: fixed">
  <TBODY>
  <TR>
    <TD>
      <DIV class=cnt id=blog_text>
      <P><FONT size=2>(转自</FONT><A class=HeaderMainTitle 
      href="http://www.cnblogs.com/gispeng/"><FONT 
      size=2>GIS雲中飛鹏</FONT></A><FONT size=2>)</FONT></P>
      <P><FONT size=2><STRONG><FONT 
      face=宋体>类模块</FONT></STRONG><SPAN>dragfeedback</SPAN><STRONG 
      style="mso-bidi-font-weight: normal"><SPAN>定义</SPAN></STRONG></FONT></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>' WinAPI function 
      declarations and constants</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Private Declare 
      Function GdiRectangle Lib "gdi32" Alias "Rectangle" (ByVal hdc As Long, 
      ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As 
      Long</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Private Declare 
      Function GetDC Lib "user32" (ByVal hwnd As Long) As Long</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Private Declare 
      Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As 
      Long</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Private Declare 
      Function SetROP2 Lib "gdi32" (ByVal hdc As Long, ByVal nDrawMode As Long) 
      As Long</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Private Const 
      R2_NOTXORPEN = 10</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>' glogal 
      map</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Dim m_map As 
      MapObjects2.Map</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>' variables that keep 
      track of moving the indicator</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Dim m_hDC As 
      Long<SPAN 
      style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      </SPAN>' a DC to draw into</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Dim m_hWnd As 
      Long<SPAN 
      style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      </SPAN>' window handle</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Dim m_xMin As 
      Integer, m_yMin As Integer<SPAN style="mso-spacerun: yes"> </SPAN>' drag 
      indicator</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Dim m_xMax As 
      Integer, m_yMax As Integer<SPAN style="mso-spacerun: yes"> </SPAN>' drag 
      indicator</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Dim m_xPrev As 
      Integer<SPAN 
      style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>' 
      click location</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Dim m_yPrev As 
      Integer<SPAN 
      style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>' 
      click location</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Function DragFinish(x 
      As Single, y As Single) As MapObjects2.Rectangle</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>GdiRectangle m_hDC, 
      m_xMin, m_yMin, m_xMax, m_yMax</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>ReleaseDC m_hWnd, 
      m_hDC</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>' return the 
      rectangle</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Dim r As New 
      MapObjects2.Rectangle</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>PixelsRectToMap 
      m_xMin, m_yMin, m_xMax, m_yMax, r</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Set DragFinish = 
      r</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>End 
      Function</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>Sub DragMove(x As 
      Single, y As Single)</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>' convert to 
      pixels</SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN>xNext = 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?