特向广大喜欢这套软件的用户致歉:
由于前段时间上传的“WinSail系统内核”是较早前的作品,目前已经上传了最新的“内核”,请重新在“http://www.FirstSail.b2b.Cn”的“产品列表/软件产品/WinSail/附件”中重新下载。
一、文件说明
1:文件:WinSail工控开发系统.doc------WinSail系统简要使用说明书(老版本)
2:文件:WinSail工控开发系统_界面类简介.doc------WinSail系统界面开发说明书(老版本)
3:目录:WinToDos---------------------转换程序
4:目录:include2---------------------系统“头文件”和“库文件”
5:目录:Sail3000---------------------应用工程实例
6:目录:Application------------------VC++程序,系统内核多个对话框是从中转换而来的。
二、include2目录里面的文件说明
01:Barcode.h----------- 条形码显示/打印头文件, 类接口
02:DownComm.h---------- COMM口通讯, 类接口
03:Foxpro.h------------ Foxpro2.6数据库, 类接口
04:GageRR.h------------ 测量的可靠性和重重性报表, 类接口
05:Graph.h------------- 示波器和多纵坐标示波器, 类接口
06:HglgPrit.h---------- 文字、BITMAP图片、ICON图标的显示,WAV声音播放,API接口
07:Kernal.h------------ 多任务,API接口
08:Listing.h----------- 双向链表,类接口
09:Memroy.h------------ XMS和EMS内存,类接口
10:Mouse.h------------ 鼠标,API接口
11:MyFrame.h---------- 控件和内核初始化,类和API接口
12:NewMath.h---------- 数学库,API接口
13:Register.h--------- 文本INI文件读写访问,类接口
14:Relay.h------------ 面向对象的I/O访问,API接口
15:Spc.h-------------- 进程统计控制SPC,类接口
16:SVga_Dev.h--------- 800*600*256,1024*768*256分辨率图形驱动,API接口
17:Symbol.h----------- 符号定义
18:EgavgaF.Obj-------- BC31远调用驱动程序
19:Sail.Lib----------- 系统库文件
20:Socket3.H----------- Socket套接字编程(支持Arp、Icmp、Udp、Tcp协议,链路层采用Packet Driver)
三、Sail3000目录里面的文件说明
01:Config.Sys----------- 系统驱动配置文件
02:Display.Fon---------- 8*16英文字库和16*16简体字库
02:DisplayF.Fon--------- 8*16英文字库和16*16繁体字库
03:Dwpword.Exe---------- 用户和密码观看文件(高级应用)
04:Pass.Bin------------- 用户和密码数据库,二进制
05:Mouse.Com------------ 鼠标驱动程序
06:Sail2000.Cpp--------- 用户工程的源文件示例
07:Sail2000.Prj--------- 用户工程的工程文件示例
08:Sail2000.Exe--------- 用户工程的主程序
09:a.bat---------------- 用户工程的批处理文件
10:Sys\Destop.Sys------- 用户工程的桌面配置文件
11:Sys\Manager.Sys------ 用户工程的桌面配置文件
12:Sys\Relay.Sys-------- 用户工程的I/O配置文件
13:Bmp\Computer.Bmp----- 内核使用的一幅图片
14:Bmp\Desktop.Bmp------ 内核使用的一幅图片
15:Bmp\Winnt.BMp-------- 密码框使用的一幅图片
16:Bmp\Sail2000.Ico------ 窗口默认的标题栏图标
17:Bmp\BookS??.Ico------ 菜单默认的图标
18:Bmp\MsgBox??.Ico----- 信息框使用的图标
19:Bmp\Display.Ico------ 内核使用的一幅图标
20:Bmp\Net.Ico---------- 内核使和的一幅图标
四、WinToDos目录里面的文件说明
对于VC工程中的文件,只有“工程.rc”和“Resource.h”文件有价值
01:MakeDlg.Exe---------- 将VC中的资源对话框转成WinSail的对话框源程序或脚本文件
02:RegisterDll.Dll------ 支持MakeDlg.Exe访问文本INI注册表的DLL文件
五:DOS起动文件配置说明
假设Win的目录名称是“c:\Windows”,BC31的目录是“C:\Bc31”
C:\Config.Sys请如下配置
Device = C:\Windows\Himem.Sys/TestMem:Off
Device = C:\Windows\Emm386.Exe Ram HighScan
DOS = High,Umb
Stacks = 9,256
Files = 25
C:\Autoexec.Bat请如下配置
path C:\Windows;C:\Windows\Command;C:\Bc31\Bin
Lh SmartDrv.Exe
六:对Main()主函数的要求
1:需包含头文件"Symbol.h"和"MyFrame.h"
2:先调用BOOL InitSystem(int argc, char** argv)内核初始化函数
3:中间写自己的代码
4:最后调用BOOL CloseSystem()内核退出函数.
5:例:
#include "Symbol.h"
#include "Myframe.h" extern unsigned _strlen = 60u * 1024u;
void far TransrateKey(CObject* pCurObj)
{
return(0);
} int main(int argc, char** argv)
{
if (!InitSystem(argc, argv))
{
::CloseSystem() ;
::printf("\nInit System Error!") ;
return(0);
}
::CloseSystem();
return(1);
}
七:如何创建Sail2000工程并编码
01:在C盘中安装BC31,最好目录为C:\Bc31
02:用户在自已BC31的目录中,创建"Include2"目录
03:将include2\*.*的所有文件拷贝C:\bc31的"include2"目录中。
04:在BC31集成环境中,将"include包含"路径设成"c:\bc31\include2;c:\bc31\include"
05:在BC31集成环境中,"Large"大模式;"Default for memory model"默认内存模式。
06:在BC31集成环境中,Floating Point设置成"80287/387"和Instruion Set设置成"80386"
07:在BC31集成环境中,创建一工程,假设工程名称为Sail2000.Prj
08:在工程中加入C:\BC31\include2\Sail.Lib内核库文件
09:在工程中加入C:\BC31\include2\Egavgaf.Obj图形库文件
10:在工程中,须编写void far TransrateKey(CObject* pCurObj)的函数,一般如下所示
void far TransrateKey(CObject* pCurObj)
{
return(0);
}
八:如何创建自己的控件,并挂接在窗口系统中。
想定制一个属于自己的个性化控件,假设类名为“CCustomCtrl”,从CObject基类继承 不需要得到焦点的情况需要得到焦点的情况class CCustomCtrl:public CObject{public: void Show();//画控件public: CCustomCtrl(CObject* pParent); //构造函数};//构造函数CCustomCtrl::CCustomCtrl(CObject* pParent):CLabel(pParent){ //…}//重画框件void CCustomCtrl::Show(){RECT rc this->GetScreenRect(&rc);//得到控件的屏幕位置//…}class CCustomCtrl:public CObject{public:void Show();//画控件void SetFocus();//当控件得到焦点时void KillFocus();//当控件失去焦点时public: CCustomCtrl(CObject* pParent); //构造函数};//构造函数CCustomCtrl::CCustomCtrl(CObject* pParent):CLabel(pParent){this->SetTab(TRUE);//将控件置成可接受焦点//…}//重画控件void CCustomCtrl::Show(){RECT rc this->GetScreenRect(&rc);//得到控件的屏幕位置//…}//当控件得到焦点时void CCustomCtrl::SetFocus(){ //…}//当控件失去焦点时void CCustomCtrl::KillFocus(){ //…}
Special apology to the广大 users who like this set of software:
Because the "WinSail system kernel" uploaded earlier was an earlier work, the latest "kernel" has been uploaded now. Please re-download it in "Products List/Software Products/WinSail/Attachments" at "http://www.FirstSail.b2b.Cn".
I. File Description
1: File: WinSail Industrial Control Development System.doc------Brief user manual for WinSail system (old version)
2: File: WinSail Industrial Control Development System_Interface Class Introduction.doc------Interface development manual for WinSail system (old version)
3: Directory: WinToDos---------------------Conversion program
4: Directory: include2---------------------System "header files" and "library files"
5: Directory: Sail3000---------------------Application engineering examples
6: Directory: Application------------------VC++ program, multiple dialog boxes of the system kernel are converted from it.
II. File Description in include2 Directory
01: Barcode.h-----------Header file for barcode display/printing, class interface
02: DownComm.h---------- COMM port communication, class interface
03: Foxpro.h------------ Foxpro2.6 database, class interface
04: GageRR.h------------ Report on measurement reliability and repeatability, class interface
05: Graph.h------------- Oscilloscope and multi-ordinate oscilloscope, class interface
06: HglgPrit.h---------- Display of text, BITMAP pictures, ICON icons, WAV sound playback, API interface
07: Kernal.h------------ Multitasking, API interface
08: Listing.h----------- Doubly linked list, class interface
09: Memroy.h------------ XMS and EMS memory, class interface
10: Mouse.h------------ Mouse, API interface
11: MyFrame.h---------- Controls and kernel initialization, class and API interface
12: NewMath.h---------- Mathematical library, API interface
13: Register.h--------- Reading and writing access to text INI file, class interface
14: Relay.h------------ Object-oriented I/O access, API interface
15: Spc.h-------------- Process statistics control SPC, class interface
16: SVga_Dev.h--------- Graphics driver for 800*600*256, 1024*768*256 resolution, API interface
17: Symbol.h----------- Symbol definition
18: EgavgaF.Obj-------- BC31 far call driver program
19: Sail.Lib----------- System library file
20: Socket3.H----------- Socket socket programming (supports Arp, Icmp, Udp, Tcp protocols, link layer uses Packet Driver)
III. File Description in Sail3000 Directory
01: Config.Sys----------- System driver configuration file
02: Display.Fon---------- 8*16 English character font and 16*16 simplified Chinese character font
02: DisplayF.Fon--------- 8*16 English character font and 16*16 traditional Chinese character font
03: Dwpword.Exe---------- File for viewing user and password (advanced application)
04: Pass.Bin------------- User and password database, binary
05: Mouse.Com------------ Mouse driver program
06: Sail2000.Cpp--------- Source file example of user project
07: Sail2000.Prj--------- Project file example of user project
08: Sail2000.Exe--------- Main program of user project
09: a.bat---------------- Batch file of user project
10: Sys\Destop.Sys------- Desktop configuration file of user project
11: Sys\Manager.Sys------ Desktop configuration file of user project
12: Sys\Relay.Sys-------- I/O configuration file of user project
13: Bmp\Computer.Bmp----- A picture used by the kernel
14: Bmp\Desktop.Bmp------ A picture used by the kernel
15: Bmp\Winnt.BMp-------- A picture used by the password box
16: Bmp\Sail2000.Ico------ Default title bar icon of the window
17: Bmp\BookS??.Ico------ Default icon of the menu
18: Bmp\MsgBox??.Ico----- Icon used by the information box
19: Bmp\Display.Ico------ A picture used by the kernel
20: Bmp\Net.Ico---------- A picture used by the kernel
IV. File Description in WinToDos Directory
For the files in the VC project, only "Project.rc" and "Resource.h" files are valuable
01: MakeDlg.Exe---------- Convert the resource dialog box in VC into the dialog box source program or script file of WinSail
02: RegisterDll.Dll------ DLL file supporting MakeDlg.Exe to access text INI registry
V. Configuration Instructions for DOS Boot File
Assume that the directory name of Win is "c:\Windows" and the directory of BC31 is "C:\Bc31"
Please configure C:\Config.Sys as follows
Device = C:\Windows\Himem.Sys/TestMem:Off
Device = C:\Windows\Emm386.Exe Ram HighScan
DOS = High,Umb
Stacks = 9,256
Files = 25
Please configure C:\Autoexec.Bat as follows
path C:\Windows;C:\Windows\Command;C:\Bc31\Bin
Lh SmartDrv.Exe
VI. Requirements for Main() Main Function
1: Need to include header files "Symbol.h" and "MyFrame.h"
2: First call BOOL InitSystem(int argc, char** argv) kernel initialization function
3: Write your own code in the middle
4: Finally call BOOL CloseSystem() kernel exit function.
5: Example:
#include "Symbol.h"
#include "Myframe.h" extern unsigned _strlen = 60u * 1024u;
void far TransrateKey(CObject* pCurObj)
{
return(0);
} int main(int argc, char** argv)
{
if (!InitSystem(argc, argv))
{
::CloseSystem() ;
::printf("\nInit System Error!") ;
return(0);
}
::CloseSystem();
return(1);
}
VII. How to Create Sail2000 Project and Code
01: Install BC31 in the C drive, preferably the directory is C:\Bc31
02: The user creates "Include2" directory in their own BC31 directory
03: Copy all files in include2\*.* to the "include2" directory of C:\bc31
04: In the BC31 integrated environment, set the "Include include" path to "c:\bc31\include2;c:\bc31\include"
05: In the BC31 integrated environment, set "Large" large mode; "Default for memory model" default memory mode.
06: In the BC31 integrated environment, set Floating Point to "80287/387" and Instruction Set to "80386"
07: In the BC31 integrated environment, create a project, assume the project name is Sail2000.Prj
08: Add the kernel library file C:\BC31\include2\Sail.Lib to the project
09: Add the graphics library file C:\BC31\include2\Egavgaf.Obj to the project
10: In the project, the function void far TransrateKey(CObject* pCurObj) must be written, generally as follows
void far TransrateKey(CObject* pCurObj)
{
return(0);
}
VIII. How to Create Your Own Control and Hook It into the Window System.
Want to customize a personalized control of your own, assume the class name is "CCustomCtrl", inherit from CObject base class For the situation where focus is not needed For the situation where focus is needed class CCustomCtrl:public CObject{public: void Show();//Draw controlpublic: CCustomCtrl(CObject* pParent); //Constructor};//ConstructorCCustomCtrl::CCustomCtrl(CObject* pParent):CLabel(pParent){ //…}//Redraw controlvoid CCustomCtrl::Show(){RECT rc this->GetScreenRect(&rc);//Get the screen position of the control//…}class CCustomCtrl:public CObject{public:void Show();//Draw controlvoid SetFocus();//When the control gets focusvoid KillFocus();//When the control loses focuspublic: CCustomCtrl(CObject* pParent); //Constructor};//ConstructorCCustomCtrl::CCustomCtrl(CObject* pParent):CLabel(pParent){this->SetTab(TRUE);//Set the control to be able to accept focus//…}//Redraw controlvoid CCustomCtrl::Show(){RECT rc this->GetScreenRect(&rc);//Get the screen position of the control//…}//When the control gets focusvoid CCustomCtrl::SetFocus(){ //…}//When the control loses focusvoid CCustomCtrl::KillFocus(){ //…}