『第 12 楼』:
使用 LLM 解释/回答一下
可在www.firstsail.b2b.com 网站中免费下载“WinSail”软件。它能够用VC做好的对话框,通过转换软件,转成“WinSail”软件支持的对话框“源代码”或“脚本文件夹”, 现在有一种“WinSail工业控制开发系统”正在业界普遍使用,其推出真正使嵌入式PC进行产品开发时,设计人员不需要在硬件、底层操作作、界面、参数设置等花费太多的时间,只要把精力放在功能开发上。只要您懂C++ For DOS或Visual C++,您就能在DOS下编程,生成一个能与Windows竣美的应用系统!
“WinSail工业控制开发系统”是基于DOS系统,用Borland C++3.1语言,在Large大模式下开发出来的软件开发包。虽然说完整的软件包大约只有450K左右,却能在DOS下生成的程序具有与WIN9x完全相同的界面,拥有Group、Label、Edit、ComboBox、Button、Radio、Check、ListBox、Grid、ScrollBar、Desktop、ToolsBar、StatusBar、Menu、PopuMenu、Window、Dialog、ICON、Bitmap、示波器等界面元素,支持鼠标,控件的操作99.9%与Windows兼容!可加载运行脚本对话框;支持Socket套接字编程;具有完整窗口图形界面的最小应用只有150K左右,可在只有1M的电子盘中运行;具有0.5uS微秒精确度的delay函数。可以说DOS + WinSail >= Windows CE 一、文件说明 1:文件:WinSail工控开发系统.doc------WinSail系统简要使用说明书 2:目录:WinToDos---------------------转换程序 3:目录:include2---------------------系统“头文件”和“库文件” 4:目录:Sail3000---------------------应用工程实例 5:目录: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----------- 系统库文件 三、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\Sail200.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!"<img src="images/smilies/face-wink.png" align="absmiddle" border="0"> ; 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); } VC工程中的资源文件------ --------------à VC工程中的资源头文件-------------------à 需转换成哪个文件-----------------------à 生成的函数类型------------------------à VC工程中的所有对话框ID号列表----------à
You can download the "WinSail" software for free at the website www.firstsail.b2b.com. It can convert dialog boxes made with VC into "source code" or "script folders" supported by the "WinSail" software. Currently, a "WinSail Industrial Control Development System" is widely used in the industry. Its launch truly enables designers not to spend too much time on hardware, low-level operations, interfaces, parameter settings, etc. when developing products for embedded PCs, and only need to focus on functional development. As long as you understand C++ For DOS or Visual C++, you can program under DOS to generate an application system comparable to Windows!
The "WinSail Industrial Control Development System" is a software development kit developed based on the DOS system using Borland C++ 3.1 language in Large mode. Although the complete software package is about 450K, the programs generated under DOS can have the same interface as WIN9x, with interface elements such as Group, Label, Edit, ComboBox, Button, Radio, Check, ListBox, Grid, ScrollBar, Desktop, ToolsBar, StatusBar, Menu, PopuMenu, Window, Dialog, ICON, Bitmap, oscilloscope, etc. It supports the mouse, and 99.9% of the control operations are compatible with Windows! It can load and run script dialog boxes; supports Socket socket programming; the smallest application with a complete window graphical interface is about 150K and can run in an electronic disk with only 1M; has a delay function with an accuracy of 0.5 microseconds. It can be said that DOS + WinSail >= Windows CE
I. File Description
1: File: WinSail Industrial Control Development System.doc ---- Brief instruction manual for the WinSail system
2: Directory: WinToDos --------------------- Conversion program
3: Directory: include2 --------------------- System "header files" and "library files"
4: Directory: Sail3000 --------------------- Application project examples
5: Directory: Application ------------------ VC++ program, with multiple dialog boxes
II. File Description in the include2 Directory
01: Barcode.h ----------- Header file for barcode display/printing, class interface
02: DownComm.h ---------- COMM port communication, class interface
03: Foxpro.h ------------ Foxpro 2.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 ---------- Control and kernel initialization, class and API interface
12: NewMath.h ---------- Math library, API interface
13: Register.h --------- Reading and writing access to text INI files, 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 resolutions, API interface
17: Symbol.h ----------- Symbol definition
18: EgavgaF.Obj --------- BC31 far call driver program
19: Sail.Lib ----------- System library file
III. File Description in the Sail3000 Directory
01: Config.Sys ----------- System driver configuration file
02: Display.Fon ---------- 8*16 English font and 16*16 Simplified Chinese font
02: DisplayF.Fon --------- 8*16 English font and 16*16 Traditional Chinese 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 --------- Sample source file of user project
07: Sail2000.Prj --------- Sample project file 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\Sail200.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 icon used by the kernel
20: Bmp\Net.Ico---------- A icon used by the kernel
IV. File Description in the WinToDos Directory
For the files in the VC project, only the "Project.rc" and "Resource.h" files are valuable
01: MakeDlg.Exe ---------- Convert the resource dialog box in VC into the dialog box source program of WinSail
02: RegisterDll.Dll ------ DLL file supporting MakeDlg.Exe to access the text INI registry
V. Configuration Instructions for DOS Boot File
Assume the directory name of Win is "c:\Windows" and the directory of BC31 is "C:\Bc31"
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
Configure C:\Autoexec.Bat as follows
path C:\Windows;C:\Windows\Command;C:\Bc31\Bin
Lh SmartDrv.Exe
VI. Requirements for the Main() Main Function
1: Need to include the header files "Symbol.h" and "MyFrame.h"
2: First call the BOOL InitSystem(int argc, char** argv) kernel initialization function
3: Write your own code in the middle
4: Finally call the 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)
{
// System kernel initialization
if (!InitSystem(argc, argv))
{
::CloseSystem() ;
::printf("\nInit System Error!") ;
return(0);
}
// User code starts
//……
// User code ends
// Exit system kernel
::CloseSystem();
return(1);
}
VII. How to Create the Sail2000 Project and Code
01: Install BC31 on the C drive, preferably the directory is C:\Bc31
02: The user creates an "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 C:\BC31\include2\Sail.Lib kernel library file to the project
09: Add the C;\BC31\include2\Egavgaf.Obj graphics library file to the project
10: In the project, need to write the default window virtual keyboard function void far TransrateKey(CObject* pCurObj), generally as follows
void far TransrateKey(CObject* pCurObj)
{
return(0);
}
VC project's resource file ------ --------------à VC project's resource header file-------------------à Which file does it need to be converted into-----------------------à Generated function type------------------------à VC project's all dialog box ID number list----------à
|