引用 | 編輯
唐老鴨
2005-03-30 19:59 |
樓主
▼ |
||
![]() 那是很久以前在DOS底下的一個編輯器程式.... 就跟WINDOWS的Notepad一樣.... 剛好有人在問怎麼用C畫視窗.... 所以我就想到可以把這個傳上來當範例.... 這是以前小弟用C寫的.... 剛剛試過在TC Compiler是沒問題的.... 但VC會有問題(可能因為有些舊式不支援吧).... DEV-C就請你們自己試試看囉^^..... 這是程式碼..... #include <stdio.h> #include <stdlib.h> #include <bios.h> #include <conio.h> #define MAXLINES 255 int window_location; void quit(char *s) { printf("%s",s); exit(1); //return to DOS } void show_window(void) { window(1,1,80,22); textattr(YELLOW+(BLUE<<4)); clrscr(); gotoxy(1,1); window_location=1; } void command_window(void) { window(1,23,80,23); textattr(WHITE+(GREEN<<4)); clrscr(); gotoxy(1,1); window_location=2; } void help_window(void) { window(1,24,80,25); textattr(WHITE+(BLACK<<4)); clrscr(); gotoxy(1,2); window_location=3; //clreol(); } void main(int argc,char *argv[]) .. 訪客只能看到部份內容,免費 加入會員 ![]()
|