⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filedialog.htm

📁 vc-mfc编程实例 很简单的东西,以后回多传自己的东西
💻 HTM
字号:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#Layer1_close {
	position:absolute;
	left:238px;
	top:7px;
	width:18px;
	height:17px;
	z-index:4;
}
</style>
<script language="javascript" src="js/comm.js" type="text/javascript"></script>
<script language="javascript">
// import js document
	_import("function");
	_import("language");
	_import("langSet");
	//_import("webmenuevent");
	_import("control");
</script>



<link href="css/ritstyle.css" rel="stylesheet" type="text/css">
<body style="overflow:hidden;" onkeydown="return testCode(event.keyCode)">
<div id="Layer1_close" style="display:none;">
<div style="cursor:hand;" onClick="window.external.OnOK();" onMouseOver="changeSubImgTo(this,'pic/close_red.gif')" onMouseOut="changeSubImgTo(this,'pic/close_blue.gif')"><img src="pic/close_blue.gif" ondragstart="changeSubImgTo(this.parentNode,'pic/close_blue.gif');return false;" width="16" height="16"></div></div>
<table width="520" border="0" cellspacing="0" cellpadding="0" id="boxwidth">
  <tr>
    <td background="images/alert_msg_r1_c5.jpg" onMouseDown="moveWindow();"><table width="165" height="29" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="165" style="background-repeat:no-repeat;" id="pic">&nbsp;</td>
      </tr>
    </table></td>
    <td background="images/alert_msg_r1_c5.jpg" onMouseDown="moveWindow();">&nbsp;</td>
    <td valign="top" background="images/alert_msg_r1_c5.jpg" onMouseDown="moveWindow();"><table width="50" border="0" align="right" cellpadding="0" cellspacing="0" style="background-image:url(images/alert_msg_top_right.jpg); background-repeat:no-repeat; background-position:right;">
      <tr>
        <td height="7" colspan="3"><img name="" src="" width="1" height="1" alt="" /></td>
      </tr>
      <tr>
        <td width="35" align="right"><table width="17" height="16" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="arial11black"  >&nbsp;</td>
          </tr>
        </table></td>
        <td width="17" align="right"><table width="17" height="16" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td style="cursor:hand;" background="images/alert_msg_r2_c8.jpg" class="arial11black" onClick="window.external.OnOK();" onMouseOver="isMove=false;" onMouseOut="isMove=true;">&nbsp;</td>
          </tr>
        </table></td>
        <td width="10" align="right"><table width="10" height="16" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="arial11black" style="background-repeat:repeat-y; background-position:right;"><img name="" src="" width="1" height="1" alt="" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td colspan="3"><table width="62" height="6" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td><img name="" src="" width="1" height="1" alt="" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top"><img src="images/alert_msg_r4_c1.jpg" width="9" height="6" /></td>
        <td><img src="" width="1" height="1" alt="" /></td>
        <td align="right" valign="top"><img src="images/alert_msg_r4_c11.jpg" width="9" height="6" /></td>
      </tr>
    </table>
        <table width="100%" height="257" border="0" cellpadding="0" cellspacing="0" id="boxheight">
          <tr>
            <td width="10" align="left" valign="bottom" background="images/alert_msg_r5_c1.jpg" style="background-position:left; background-repeat:repeat-y;">&nbsp;</td>
            <td align="left" valign="top" class="arial11black" style="background-repeat:repeat-x; background-position:bottom;">
			
			<!--/////////////////Step1:initializing//////////////////////////-->
			<div >
				<div class="arial11black">
				<object width="500" border="0" height="372" id="FileTree1" name="FileTree1" classid="clsid:4CA5E8A7-A2B4-4F68-BA0A-7A223368EF3E">
</object>
				</div>
				
				<div align="right" style="padding-top:5px;">
                  <button cstyle="rit" onClick="closeWindowSetStaticData();" id="next">OK</button>
				  <span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
				  <button cstyle="rit" onClick="CloseSelf();" id="cancel">Cancel</button>
          </div>
			</div>
			
					
			</td>
            <td width="10" align="right" valign="bottom" background="images/alert_msg_r5_c10.jpg" style="background-position:right; background-repeat:repeat-y;">&nbsp;</td>
          </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="5%" valign="top" background="images/alert_msg_bottom_center.jpg" style="background-position:top; background-repeat:repeat-x;"><img src="images/alert_msg_bottom_left.jpg" width="9" height="12" /></td>
            <td width="90%" background="images/alert_msg_bottom_center.jpg" style="background-position:top; background-repeat:repeat-x;">&nbsp;</td>
            <td width="5%" align="right" valign="top" background="images/alert_msg_bottom_center.jpg" style="background-position:top; background-repeat:repeat-x;"><img src="images/alert_msg_bottom_right.jpg" width="9" height="12" /></td>
          </tr>
      </table></td>
  </tr>
</table>

<script language="javascript">
var isMove=true;
var leftButtonId="";
var rightButtonId="";
var oldPassword="";
var f1=Request("f1");
var f2=Request("f2");
var flag = Request("flag");
if(!flag.length>0)
{
	flag=null;
}
function moveWindow() {
	if (isMove) {
		window.external.OnMoveWindow();
	}
}
function testCode(id) {
	if(id==32) { return false; }
	if (id==37) {
		var leftbtobj=document.getElementById(leftButtonId);
		if (leftbtobj!=null) {
			leftbtobj.focus();
		}
	}
	else if(id==39) {
		var leftbtobj=document.getElementById(rightButtonId);
		if (leftbtobj!=null) {
			leftbtobj.focus();
		}
	}
}





</script>

<script language="javascript">


document.body.onload=function()
{
	$("pic").style.backgroundImage = 'url('+GS("Pic_1")+')';
	applyButton();
	FileTree1.CreateTFDlg(f2,f1);
	SetTree();
	
}
function SetTree()
{

	if(f2==1)
	{
	FileTree1.height="305";
	}
	else
	{
	FileTree1.height="372";
	}
}
function closeWindowSetStaticData()
{
	var temparr = f1.split("|");
	var regstr="";
	var regstr2="";
	for(var i = 0;i<temparr.length;i++)
	{
		regstr+="\.("+temparr[i]+")$|";
		regstr2+="[a-zA-Z0-9]\.("+temparr[i]+")$|";
	}
	regstr=regstr.substring(0,regstr.length-1);
	regstr2=regstr2.substring(0,regstr2.length-1);
	//alert(regstr);
	eval("var expStr=/"+regstr+"/i;");
	eval("var expStr2=/"+regstr2+"/i;");
	//var expStr=/\.(vcd)$/i;
	//alert(expStr2);
	//var re =  new RegExp("[a-zA-Z_$][a-zA-Z_$0-9]*\.vcd");
	if(f2==0)
	{
		if(flag==null)
		{
			var savename = FileTree1.GetSavePath();
			//alert(savename.match(expStr));
			//eval("/*.")
			if(expStr2.test(savename)==true)
			{
				window.external.SetStaticData(FileTree1.GetSavePath());
				window.external.OnClose();
			}
			else
			{
				RIT_popMsg('',264,180,'ok',"please save a file",'alert');
				return;
			}
		}
		else
		{
			window.external.SetStaticData(FileTree1.GetSavePath());
			window.external.OnClose();
		}	
	}
	else
	{
		if(flag==null)
		{
			var pathname = FileTree1.GetCurPath();
			//alert(pathname);
			//alert(expStr.test(pathname));
			//alert(pathname.match(expStr));
			if(expStr.test(pathname)==true)
			{
				window.external.SetStaticData(FileTree1.GetCurPath());
				window.external.OnClose();
			}
			else
			{
				RIT_popMsg('',264,180,'ok',"please select a file",'alert');
				return;
			}
		}
		else
		{
			window.external.SetStaticData(FileTree1.GetCurPath());
			window.external.OnClose();
		}		
	}


}



function CloseSelf()
{
window.external.OnClose();
}



</script>


</body>

⌨️ 快捷键说明

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