引用 | 编辑
唐老鸭
2005-03-30 19:59 |
楼主
▼ |
||
x0
不知道有没有知道什么是PE2呢....那是很久以前在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[]) .. 访客只能看到部份内容,免费 加入会员 x2
|