DOS under TC2.0 Graphics Chinese menu

zhaozj2021-02-17  48

This is my comparative full-time graphic Chinese menu under the self-contained DOS! However, the current directory requires several font files that come with UCDOS! HZK24H, HZK24K file

/ * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------- File: Menu.cfunction: Operate Mainmenu --------------- -------------------------------------------------- ---------- * / # Define max_frame 4 # define up 72 # define down 80 # define left 75 # define right 77 # define esc 27 # define F1 59 # define del 83 # define space 32 # define ENTER 13 # define Alt_X 45 # define Alt_Y 21 # define Alt_D 32 # define Alt_T 20 # define Alt_O 24 # define BackSpace 8struct gmenu {int left, top; char * menuname; char * submenu [7]; int count, width;} Menuframe [Max_Frame] = {{15, 31, "Database Operation (D)", {"Open Library File", "Show Structure", "Show Record Content", "Record Find", "Close Library File", " - "," Exit ALT X "}, 7, 14,}, {175, 31," Function Curve (T) ", {" SIN Function "," COS Function "," TAN Function "," CTG Function ", "-", "B Group Design"}, 6, 12,}, {335, 31, Software (DIY ", {" Window Color "," Window Font Color "," Main Menu Settings "," Submenu Setting "," - "," Fill mode "," user-defined mode ",}, 7, 12,}, {480, 31," other (o) ", {" Mouse 闯迷 "," serial communication transmission "," music appreciation "," - "" System Restore "," Help F1 "," About "}, 7, 12,}}; char * title =" C language program integrated design "; int DIY_Style = 1, DIY_UFILL = -1, DIY_COLOR =

BLUE, diy_bkcolor = LIGHTGRAY, chang = 0; int diy_sgkcolor = RED, diy_sgcolor = WHITE, diy_mgkcolor = CYAN, diy_mgcolor = BLUE; int setmenu (void) {int title_x = 200; setbkcolor (BLUE); setcolor (WHITE); Tbox ( 2, 2, getmaxx () - 2, getmaxy () - 2, lightgray, blue, 4); DIS_HZ (Title_x, 8, Title, Yellow); TLINE (6, getmaxy () - 32, getmaxx () - 6, GETMAXY () - 32); setFillStyle (0, 1); bar (10, getmaxy () - 28, getmaxx () - 10, getmaxy () - 7); DIS_HZ (10, getmaxy () - 28, "Operation Navigation : Please select ......... "; DIS_HZ (GetMaxX () - 12-7 * 16, getMaxY () - 28," Exit Alt X ", White; ListtopMenu (); return 0;} int Listtopmenu (void) {Int i; tbutton (7,28, getmaxx () - 8, 53, diy_bkcolor, diy_color, null, 0, diy_style); for (i = 0; i ZWIDTH)? Swidth: Zwidth) (Which == 2? 2: 12), ATOP STOP); if (size! =

-1) Buffer = malloc (size); if (Keylr == 0 || Change == 2 || (Buffer && (Keylr == LEFT || Keylr == Right)) {GetImage (SLEFT, STOP, ((Swidth > ZWIDTH)? SWIDTH: ZWIDTH) (Which == 2? 2: 12), ATOP STOP, BUFFER; Change = 0;} TButton (Sleft, STOP, ZWIDTH, STOP 19, DIY_MGKCOLOR, DIY_MGCOLOR, MENUFRAME [ Which] .menuname, 0, DIY_Style; TButton (Sleft 4, STOP 30, SWIDTH 7, ATOP 15, DIY_BKCOLOR, DIY_COLOR, NULL, 0, DIY_STYLE); PTOP = STOP 40; for (i = 0 i

0) OpenFile (); if (SubWhich == 1) List_db_structure (); if (SubWhich == 2) List_db_recorder (); if (SubWhich == 3) DB_Search (); if (SubWhich == 4) Closefile (); IF (SubWhich == 6) quit ();} if (which == 1) {system ("fpk"); clearDevice (); setMenu ();} else draw (Subwhich 1) ; If (Which == 2) {if (SubWhich == 0) set_bkcolor (); if (SubWhich == 1) set_color (); if (SubWhich == 2) set_mcolor (); if (SubWhich == 3) set_scolor (); If (SubWhich == 5) set_fillstyle (); if (SubWhich == 6) set_filluser ();} if (which == 3) {if (SubWhich == 0) {system ("maze"); ClearDevice (); setmenu ();} if (SubWhich == 1) Message (menuframe [which]); if (SubWhich == 2) PlayMusic (); if (SubWhich == 4) reset (); IF (SubWhich == 5) Help (); if (SubWhich == 6) Welcome ();} clear ();} if (buffer && (keylr == left || keylr == right)) {PUTIMAGE (SLEFT, STOP) , buffer, copy_put; clear ();} free (buffer); if (change == 1) {ListtopMenu (); clear (); change = 2;} if (Which <0) {ListtopMenu (); clean <0); Clear Break; } Return 0;} int ion; while (Bioskey (1) == 0) DISPLAY_TIME (400, getmaxy () - 50, white); key = bioskey (0); key = key & 0xff? Key & 0xFF: Key >> 8; Return (key);

转载请注明原文地址:https://www.9cbs.com/read-29424.html

New Post(0)