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

📄 tc2.0下写的dos图形中文菜单.htm

📁 一些c的经典案例
💻 HTM
📖 第 1 页 / 共 2 页
字号:
    <TD width=768 bgColor=#cc6600><FONT 
      color=#ffffff>&gt;&gt;计算机考试&gt;</FONT><FONT 
      color=#ffffff>C语言专区</FONT><FONT 
      color=#ffffff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</FONT><A 
      href="http://www.ugpr.com/"><FONT color=#ffffff>首页</FONT></A><FONT 
      color=#ffffff> </FONT><FONT color=#ffffff>|<A 
      href="http://www.ugpr.com/jsjks/c/shili/jsjks.htm"> </A></FONT><A 
      href="http://www.ugpr.com/jsjks/c/shili/jsjks.htm"><FONT 
      color=#ffffff>计算机考试</FONT></A><FONT color=#ffffff> |<A 
      href="http://www.ugpr.com/jsjks/c/proe/proe.htm"> </A></FONT><A 
      href="http://www.ugpr.com/jsjks/c/proe/proe.htm"><FONT 
      color=#ffffff>Pro/ENGINEER</FONT><FONT color=#ffffff> </FONT></A><FONT 
      color=#ffffff>| <A 
      href="http://www.ugpr.com/jsjks/c/ug/ug.htm"></A></FONT><A 
      href="http://www.ugpr.com/jsjks/c/ug/ug.htm"><FONT 
      color=#ffffff>Unigraphics</FONT></A><FONT color=#ffffff> | <A 
      href="http://www.ugpr.com/ansys/ansys.htm"><FONT 
      color=#ffffff>ANSYS</FONT></A> | </FONT><A 
      href="http://www.ugpr.com/jsjks/c/shoucang/shoucang.htm"><FONT 
      color=#ffffff>本站收藏</FONT></A><FONT color=#ffffff> | </FONT><A 
      href="http://www.ugpr.com/jsjks/c/aboutme/aboutme.htm"><FONT 
      color=#ffffff>关于站长</FONT></A><FONT color=#ffffff>|</FONT></TD></FORM></TR>
  <TR>
    <TD width=768 bgColor=#efefef>
      <TABLE id=table1 cellSpacing=0 cellPadding=0 width=767 align=center 
      border=0>
        <TBODY>
        <TR style="FONT-SIZE: 12px">
          <TD style="FONT-SIZE: 12px" vAlign=bottom width=107 
bgColor=#008000> 
            <P> </P>
            <P> </P>
            <P> </P>
            <P> </P>
            <P> 
            <P><B><A href="http://www.ugpr.com/jsjks/c/shili/c.htm"><FONT 
            color=#ffffff>&lt;回上页</FONT></A></B></P></TD>
          <TD style="FONT-SIZE: 12px" vAlign=top width=42> 
            <P> </P>
            <P> </P>
            <P> </P></TD>
          <TD style="FONT-SIZE: 12px" vAlign=top width=515>&nbsp;<BR>&nbsp; 
            <BR><BR>TC2.0下写的DOS图形中文菜单<BR><BR><BR>这是本人自编的在DOS下的比较全面操作的图形中文菜单!不过当前目录需要有UCDOS自带的几个字库文件!hzk24h,hzk24k文件<BR><BR>/*---------------------------------------------------------------------------<BR>File: 
            MENU.C<BR>Function: Operate 
            MainMenu<BR>---------------------------------------------------------------------------*/<BR># 
            define MAX_FRAME 4<BR># define UP 72<BR># define DOWN 80<BR># define 
            LEFT 75<BR># define RIGHT 77<BR># define ESC 27<BR># define F1 
            59<BR># define DEL 83<BR># define SPACE 32<BR># define ENTER 13<BR># 
            define Alt_X 45<BR># define Alt_Y 21<BR># define Alt_D 32<BR># 
            define Alt_T 20<BR># define Alt_O 24<BR># define BackSpace 
            8<BR>struct gmenu{<BR>int left,top;<BR>char *menuname;<BR>char 
            *submenu[7];<BR>int 
            count,width;<BR>}menuframe[MAX_FRAME]={<BR>{15,31,"数据库操作(D)",{"打开库文件",<BR>"显示库结构",<BR>"显示记录内容",<BR>"记录查找",<BR>"关闭库文件",<BR>"-",<BR>"退出ALT+X"},7,14,},<BR>{175,31,"函数曲线图(T)",{"SIN函数",<BR>"COS函数",<BR>"TAN函数",<BR>"CTG函数",<BR>"-",<BR>"B组设计"},6,12,},<BR>{335,31,"软件(DIY)",{"窗口颜色",<BR>"窗口字体颜色",<BR>"主菜单设置",<BR>"子菜单设置",<BR>"-",<BR>"系统填充模式",<BR>"用户定义模式",},7,12,},<BR>{480,31,"其他(O)",{"老鼠闯迷宫 ",<BR>"串口通讯传输",<BR>"音乐欣赏  ",<BR>"-",<BR>"系统还原",<BR>"帮助  F1",<BR>"关于"},7,12,}};<BR>char 
            *title="C语言程序综合设计";<BR>int 
            diy_style=1,diy_ufill=-1,diy_color=BLUE,diy_bkcolor=LIGHTGRAY,chang=0;<BR>int 
            diy_sgkcolor=RED,diy_sgcolor=WHITE,diy_mgkcolor=CYAN,diy_mgcolor=BLUE;<BR><BR>int 
            setmenu(void)<BR>{ int 
            title_x=200;<BR>setbkcolor(BLUE);<BR>setcolor(WHITE);<BR>Tbox(2,2,getmaxx()-2,getmaxy()-2,LIGHTGRAY,BLUE,4);<BR>dis_hz(title_x,8,title,YELLOW);<BR>Tline(6,getmaxy()-32,getmaxx()-6,getmaxy()-32);<BR>setfillstyle(0,1);bar(10,getmaxy()-28,getmaxx()-10,getmaxy()-7);<BR>dis_hz(10,getmaxy()-28,"操作导航:请选择………",WHITE);<BR>dis_hz(getmaxx()-12-7*16,getmaxy()-28,"退出ALT+X",WHITE);<BR>listtopmenu();return 
            0;<BR>}<BR>int listtopmenu(void)<BR>{ int 
            i;<BR>Tbutton(7,28,getmaxx()-8,53,diy_bkcolor,diy_color,NULL,0,diy_style);<BR>for 
            (i=0;i&lt;MAX_FRAME;i++)<BR>Tbutton(menuframe[i].left,menuframe[i].top,menuframe[i].left+(strlen(menuframe[i].menuname)+2)*8,menuframe[i].top+20,diy_bkcolor,diy_color,menuframe[i].menuname,0,diy_style);<BR>return 
            0;<BR>}<BR>int loadmenu(int which)<BR>{int 
            i,keylr,size,sleft,stop,zwidth,swidth,scount,atop,ptop,subwhich;<BR>void 
            *buffer;<BR>subwhich=keylr=sleft=stop=0;<BR>while 
            (1)<BR>{setfillstyle(0,1);bar(90,getmaxy()-28,getmaxx()-8*16,getmaxy()-7);<BR>dis_hz(90,getmaxy()-28,menuframe[which].submenu[subwhich],WHITE);<BR>sleft=menuframe[which].left;stop=menuframe[which].top;<BR>zwidth=sleft+(strlen(menuframe[which].menuname)+2)*8;<BR>swidth=sleft+(menuframe[which].width+2)*8+10;<BR>scount=menuframe[which].count;atop=stop+30;<BR>for 
            (i=0;i&lt;scount;i++) 
            atop=(strcmp("-",menuframe[which].submenu[i])==0)?atop+10:atop+30;<BR>size=imagesize(sleft,stop,((swidth&gt;zwidth)?swidth:zwidth)+(which==2?2:12),atop+stop);<BR>if 
            (size!=-1) buffer=malloc(size);<BR>if 
            (keylr==0||change==2||(buffer&amp;&amp;(keylr==LEFT||keylr==RIGHT)))<BR>{ 
            getimage(sleft,stop,((swidth&gt;zwidth)?swidth:zwidth)+(which==2?2:12),atop+stop,buffer);change=0; 
            }<BR>Tbutton(sleft,stop,zwidth,stop+19,diy_mgkcolor,diy_mgcolor,menuframe[which].menuname,0,diy_style);<BR>Tbutton(sleft+4,stop+30,swidth+7,atop+15,diy_bkcolor,diy_color,NULL,0,diy_style);<BR>ptop=stop+40;<BR>for 
            (i=0;i&lt;scount;i++)<BR>{ if 
            (strcmp("-",menuframe[which].submenu[i])==0)<BR>{ 
            Tline(sleft+8,ptop+3,swidth+5,ptop+3); ptop+=10;}<BR>else<BR>{ if 
            (subwhich==i) 
            Tbutton(sleft+13,ptop,sleft+25+(menuframe[which].width)*8,ptop+22,diy_sgkcolor,diy_sgcolor,menuframe[which].submenu[i],0,diy_style);<BR>else 
            Tbutton(sleft+13,ptop,sleft+25+(menuframe[which].width)*8,ptop+22,diy_bkcolor,diy_color,menuframe[which].submenu[i],0,diy_style);<BR>ptop+=30; 
            }<BR>}<BR>switch (keylr=inkey())<BR>{ case Alt_X: 
            quit();break;<BR>case F1 : help();break;<BR>case ESC: 
            which=-1;break;<BR>case LEFT: 
            which=which==0?MAX_FRAME-1:which-1;subwhich=0;listtopmenu();break;<BR>case 
            RIGHT: 
            which=which==MAX_FRAME-1?0:which+1;subwhich=0;listtopmenu();break;<BR>case 
            UP: subwhich=(subwhich==0)?scount-1:subwhich-1;<BR>if 
            (strcmp(menuframe[which].submenu[subwhich],"-")==0) 
            subwhich--;break;<BR>case DOWN: 
            subwhich=(subwhich==scount-1)?0:subwhich+1;<BR>if 
            (strcmp(menuframe[which].submenu[subwhich],"-")==0) 
            subwhich++;break;<BR>case ENTER:<BR>clear();<BR>if (which==0)<BR>{ 
            if (subwhich==0) openfile();<BR>if (subwhich==1) 
            list_db_structure();<BR>if (subwhich==2) list_db_recorder();<BR>if 
            (subwhich==3) db_search();<BR>if (subwhich==4) closefile();<BR>if 
            (subwhich==6) quit();<BR>}<BR>if (which==1)<BR>if (subwhich==5) 
            {system("fpk");cleardevice();setmenu();}<BR>else 
            draw(subwhich+1);<BR>if (which==2)<BR>{ if (subwhich==0) 
            set_bkcolor();<BR>if (subwhich==1) set_color();<BR>if (subwhich==2) 
            set_mcolor();<BR>if (subwhich==3) set_scolor();<BR>if (subwhich==5) 
            set_fillstyle();<BR>if (subwhich==6) set_filluser();<BR>}<BR>if 
            (which==3)<BR>{ if (subwhich==0) 
            {system("maze");cleardevice();setmenu();}<BR>if (subwhich==1) 
            message(menuframe[which].submenu[subwhich]);<BR>if (subwhich==2) 
            playmusic();<BR>if (subwhich==4) reset();<BR>if (subwhich==5) 
            help();<BR>if (subwhich==6) welcome();<BR>}<BR>clear();<BR>}<BR>if 
            (buffer&amp;&amp;(keylr==LEFT||keylr==RIGHT)) 
            {putimage(sleft,stop,buffer,COPY_PUT);clear();}<BR>free(buffer);<BR>if 
            (change==1) {listtopmenu();clear();change=2;}<BR>if (which&lt;0) { 
            listtopmenu();clear();break; }<BR>}<BR>return 0;<BR>}<BR><BR>int 
            inkey(void)<BR>{int key;<BR>while(bioskey(1)==0) 
            display_time(400,getmaxy()-50,WHITE);<BR>key=bioskey(0);<BR>key=key&amp;0xff?key&amp;0xff:key&gt;&gt;8;<BR>return 
            (key);<BR>}<BR><BR><BR><BR><BR><BR><BR> </TD>
          <TD style="FONT-SIZE: 12px" vAlign=top width=102 
        bgColor=#008000> </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV>
<TABLE height=65 cellSpacing=0 cellPadding=0 width=770 align=center 
background=TC2.0下写的DOS图形中文菜单.files/bottom_line.gif border=0>
  <TBODY>
  <TR>
    <TD height=5> </TD></TR>
  <TR>
    <TD align=middle>
      <SCRIPT src=""></SCRIPT>

      <SCRIPT>var tc_user="adu520";var tc_class="2";</SCRIPT>

      <SCRIPT src=""></SCRIPT>

      <SCRIPT src=""></SCRIPT>
    </TD></TR>
  <TR>
    <TD align=middle>
      <DIV align=center><FONT face=Verdana, size=2 sans-serif Helvetica, 
      Arial,>CopyRight&copy; </FONT><FONT size=2 sans-serif helvetica, arial,>2003 
      </FONT><A href="http://adu520.yeah.net/"><STRONG><FONT color=#000000 
      size=2 sans-serif helvetica, arial,>乐知网络</FONT></STRONG></A><FONT 
      face=Verdana, size=2 sans-serif Helvetica, Arial,>All Rights 
      Reserved</FONT></DIV></TD></TR>
  <TR>
    <TD align=middle>
      <DIV align=center>
      <P align=center>未经授权禁止复制或建立镜像。谢谢!</P></DIV></TD></TR></TBODY></TABLE>
<SCRIPT src=""></SCRIPT>
</BODY></HTML>

⌨️ 快捷键说明

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