Danh mục

Giáo trình hình thành quy trình điều khiển thiết bị bán dẫn chứa các mạch logic điện tử p9

Số trang: 10      Loại file: pdf      Dung lượng: 322.83 KB      Lượt xem: 14      Lượt tải: 0    
Thu Hiền

Phí tải xuống: 2,000 VND Tải xuống file đầy đủ (10 trang) 0
Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Tham khảo tài liệu giáo trình hình thành quy trình điều khiển thiết bị bán dẫn chứa các mạch logic điện tử p9, kỹ thuật - công nghệ, điện - điện tử phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
Giáo trình hình thành quy trình điều khiển thiết bị bán dẫn chứa các mạch logic điện tử p9. 82 LUAÂÄN VAÊN TOÁT NGHIEÄP Maxy = getmaxy(); } //--------------------------------------------------------- void InitValues(char *lpCaption) // Khoi tao cac gia tri cho bien Windows de ve cua so man hinh { int WinWidth, WinHeight; W_CHAR = 8; H_CHAR = 8; // Chieu rong va chieu cao cua mot ki tu W_SIZE = 8; H_SIZE = 20; T_SIZE = 18; MSG_SIZE = 20; COLOR_WINDOW = CYAN; COLOR_BUTTON = LIGHTGRAY; COLOR_BORDER = LIGHTGRAY; COLOR_CAPTION = BLUE; COLOR_TEXT = BLUE; strcpy(MainWindow.sCaption, lpCaption); // Gan gia tri cho WinRect - H.C.nhat chua cua so MainWindow.rWinRect.left = 0; MainWindow.rWinRect.top = 0; MainWindow.rWinRect.right = Maxx; MainWindow.rWinRect.bottom= Maxy; WinWidth = MainWindow.rWinRect.right-MainWindow.rWinRect.left+1; WinHeight= MainWindow.rWinRect.bottom-MainWindow.rWinRect.top+1; // Gan gia tri cho rSys - H.C.nhat chua SystemMenu MainWindow.rSys.left = BORDERSIZE; MainWindow.rSys.top = BORDERSIZE; MainWindow.rSys.right = MainWindow.rSys.left+T_SIZE; MainWindow.rSys.bottom= MainWindow.rSys.top+T_SIZE; // Gan gia tri cho rTitleBar - H.C.nhat chua thong tin thanh tieu de MainWindow.rTitleBar.left = BORDERSIZE+1;//MainWindow.rSys.right+1; MainWindow.rTitleBar.top = BORDERSIZE+1; MainWindow.rTitleBar.right = WinWidth-BORDERSIZE-1; MainWindow.rTitleBar.bottom= MainWindow.rSys.top+T_SIZE; // Gan gia tri cho rMenuBar - H.C.nhat chua thong tin menu // Gan gia tri cho rMessage - H.C.nhat chua thong tin cua cac //thong bao MainWindow.rMessage.left = BORDERSIZE+1; MainWindow.rMessage.right = WinWidth-BORDERSIZE-2; MainWindow.rMessage.top = WinHeight-(BORDERSIZE+2)-MSG_SIZE; MainWindow.rMessage.bottom= MainWindow.rMessage.top+MSG_SIZE; // Gan gia tri cho rViewPort - H.C.nhat chua thong tin ve vung lam viec // thuc su cua cua so MainWindow.rViewPort.left = BORDERSIZE+1; MainWindow.rViewPort.top = MainWindow.rTitleBar.bottom+2;//MainWindow.rMenuBar.bottom+2; MainWindow.rViewPort.right = WinWidth-BORDERSIZE-2; MainWindow.rViewPort.bottom= MainWindow.rMessage.top-2; VP_WIDTH = MainWindow.rViewPort.right-MainWindow.rViewPort.left; VP_HEIGHT = MainWindow.rViewPort.bottom-MainWindow.rViewPort.top; } //---------------------------------------------------------. 83 LUAÂÄN VAÊN TOÁT NGHIEÄP void OutMessage(char *Msg) // Ghi thong bao Msg ra cua so rMessage { struct fillsettingstype FillInfo; int OldColor; struct viewporttype vp; // luu thong tin cu getfillsettings(&FillInfo); OldColor = getcolor(); getviewsettings(&vp); // xoa thong bao cu setviewport(MainWindow.rWinRect.left, MainWindow.rWinRect.top, MainWindow.rWinRect.right, MainWindow.rWinRect.bottom, 1); setfillstyle(SOLID_FILL, COLOR_BUTTON); setcolor(COLOR_TEXT); bar(MainWindow.rMessage.left, MainWindow.rMessage.top, MainWindow.rMessage.right, MainWindow.rMessage.bottom); // in thong bao moi ra outtextxy(MainWindow.rMessage.left+W_CHAR, MainWindow.rMessage.bottom-H_CHAR-5, Msg); // tra ve trang thai cu setfillstyle(FillInfo.pattern, FillInfo.color); setcolor(OldColor); setviewport(vp.left,vp.top, vp.right, vp.bottom, 1); } //--------------------------------------------------------- void DrawScreenBorder(int left, int top, int right, int bottom) // Ve duong vien cho mot hinh chu nhat co toa do (left, top), (right, bottom) { setfillstyle(SOLID_FILL, COLOR_BORDER); bar(left, top, right, top+BORDERSIZE); bar(left, bottom, right, bottom-BORDERSIZE); bar(left, top, left+BORDERSIZE, bottom); bar(right-BORDERSIZE, top, right, bottom); setcolor(BLACK); rectangle(left, top, right, bottom); rectangle(left+BORDERSIZE, top+BORDERSIZE, right-BORDERSIZE, bottom-BORDERSIZE); } //--------------------------------------------------------- #include void InitScreen(void) // Ve cac thanh phan cua cua so { int x, y; int WinWidth, WinHeight; struct viewporttype vp; getviewsettings(&vp); setviewport(MainWindow.rWinRect.left, MainWindow.rWinRect.top, MainWindow.rWinRect.right, MainWindow.rWinRect.bottom, 1); WinWidth = Main ...

Tài liệu được xem nhiều:

Gợi ý tài liệu liên quan: