|
jpzsj
初级用户
 
积分 43
发帖 26
注册 2005-10-7
状态 离线
|
『楼 主』:
WinSail确实不错,但希望能改进一下界面
[已使用 LLM 解释]
下载研究了两天,今天终于编译成功,但本人对界面不太满意,希望能改进一下,我用VC建立了一个最普通的对话框,有取消和确定两个按钮,但生成后就只有一个取消按钮了,不知道为什么。
我这里有XOSL的源代码,它的界面确实不错,希望老大能参考一下,改进一下界面,先谢了,附件是XOSL 1.1.5的源代码。
Downloaded and studied for two days, and finally succeeded in compiling today. But I'm not satisfied with the interface. I hope to improve it. I used VC to create a most ordinary dialog box with two buttons, Cancel and OK, but after generation, there is only one Cancel button. I don't know why.
I have the source code of XOSL here. Its interface is really good. I hope the boss can refer to it and improve the interface. Thanks in advance. The attachment is the source code of XOSL 1.1.5.
LLM 解释
技术背景与解析
WinSail 是 2000 年代初期中文 DOS 社区中出现的一个图形界面(GUI)库或工具,其设计目标是为 DOS 环境下的程序提供类似 Windows 的对话框和控件交互体验。由于当时 DOS 下缺乏统一的图形界面标准,此类工具通常需要开发者通过特定的资源转换工具(如本帖提到的 MakeDlg.exe)将 Windows 环境下生成的资源文件(.RC 或 .DLG)转换为 DOS 下可用的数据结构。
1. 关于 MakeDlg.exe 转换错误的成因
在帖子中,用户 jpzsj 发现使用 Visual C++(VC)设计的包含“确定”和“取消”两个按钮的对话框,在转换后丢失了一个控件。开发者 firstsail 确认了这是由于 资源文件分析逻辑的索引偏移错误(Off-by-one error) 导致的。
-
技术原理:Windows 的资源文件(Resource Script)是以树状或列表结构组织的。解析器在遍历
DIALOG 结构中的控件定义(如 PUSHBUTTON, DEFPUSHBUTTON)时,如果循环初始值设置错误,或者未能正确处理资源脚本中的头信息,往往会导致忽略掉序列中的第一个控件。
-
环境限制:当时的个人开发者工具往往是基于字符串解析(String Parsing)实现的,而非完整的语法树分析,因此对 VC 生成的特定格式(如包含冗余空行或特定头定义)兼容性较弱。
2. XOSL (Extended Operating System Loader) 的技术特征
用户提到的 XOSL 是一个著名的开源多重引导管理器(Boot Manager)。
-
界面实现:XOSL(尤其是 1.1.5 版本)并不依赖 Windows 资源文件,它拥有一套基于 VESA 模式的独立 GUI 框架,支持鼠标操作、窗口拖动和半透明效果。其源代码主要使用 C++ 和汇编编写。
-
开发工具链:如帖子所述,这类 DOS 下的高级图形程序通常使用 DJGPP(GCC 的 32 位 DOS 移植版)进行编译。DJGPP 支持保护模式(Protected Mode),允许程序访问 1MB 以上的内存,这是实现复杂图形界面和多系统引导逻辑的必要条件。
3. 关于“热键写入 MBR”的功能实现
针对用户 baomaboy 提出的在 MBR 中实现“F10 引导”的需求,这涉及到了 MBR(主引导记录)的物理限制:
-
空间限制:标准 MBR 的引导代码区仅有 446 字节。在如此狭小的空间内实现图形界面、键盘扫描(扫描码检测 F10)和倒计时逻辑是不可能的。
-
实现方案:像 XOSL 这样的程序采用的是“分级引导”机制。MBR 中仅存放一小段跳转代码,用于加载位于磁盘特定扇区或分区的核心引导程序(如
XOSL.BIN)。该核心程序运行在实模式或保护模式下,拥有足够的空间来显示提示信息并处理用户输入。
4. 编译环境与工具链说明
-
DJGPP:这是 1990 年代末到 2000 年代初 DOS 开发者最常用的 32 位编译器,它提供了完整的 C/C++ 标准库支持,并配合
CWSDPMI 等 DPMI 服务运行。
-
资源转换差异:WinSail 的设计初衷是简化开发,试图让用户在 Windows 下绘图,在 DOS 下运行;而 XOSL 是自建的一套底层图形驱动,两者在工程实现路径上完全不同。WinSail 的界面受限于其转换工具对 Windows 资源定义的还原程度。
附件
1: xosl115.part1.rar (2005-11-2 22:45, 224.61 KiB, 下载附件所需积分 1 点
,下载次数: 211)
附件
2: xosl115.part2.rar (2005-11-2 22:45, 218.01 KiB, 下载附件所需积分 1 点
,下载次数: 193)
|
|
2005-11-2 22:45 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 2 楼』:
关于MakeDlg.Exe转换程序
使用 LLM 解释/回答一下
Originally posted by jpzsj at 2005-11-2 22:45:
下载研究了两天,今天终于编译成功,但本人对界面不太满意,希望能改进一下,我用VC建立了一个最普通的对话框,有取消和确定两个按钮,但生成堮..
多谢楼主!
原因是程序在分析资源文件时,丢失了第一个控件,目前已经修正了该错误,谢谢,您可以从网上重新下载修正后的WinSail!
Originally posted by jpzsj at 2005-11-2 22:45:
Downloaded and studied for two days, finally succeeded in compiling today, but I am not satisfied with the interface, hope to improve it. I used VC to create a most ordinary dialog box, with two buttons: Cancel and OK, but the generated...
Thanks to the landlord!
The reason is that the program lost the first control when analyzing the resource file. The error has been corrected now. Thank you. You can download the corrected WinSail from the Internet again!
|
|
2005-11-3 12:50 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
Originally posted by jpzsj at 2005-11-2 22:45:
下载研究了两天,今天终于编译成功,但本人对界面不太满意,希望能改进一下,我用VC建立了一个最普通的对话框,有取消和确定两个按钮,但生成堮..
我下载了您的源程序,里百没有Exe文件可以直接运行,再加上没有中文文档,全都是英文,我的英文水平不好,请指明使用何种编程器?
Originally posted by jpzsj at 2005-11-2 22:45:
I downloaded and studied for two days, and finally succeeded in compiling today, but I am not satisfied with the interface. I hope to improve it. I used VC to create a most ordinary dialog box with two buttons: Cancel and OK, but the generated...
I downloaded your source code, but there is no Exe file that can be run directly. Moreover, there are no Chinese documents, all are in English. My English level is not good. Please specify which programming tool to use?
|
|
2005-11-3 12:54 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
Originally posted by jpzsj at 2005-11-2 22:45:
下载研究了两天,今天终于编译成功,但本人对界面不太满意,希望能改进一下,我用VC建立了一个最普通的对话框,有取消和确定两个按钮,但生成堮..
不好意思,太多错别字了!
我下载了您的源程序,里面没有Exe文件可以直接运行,再加上没有中文文档,全都是英文,我的英文水平不好,请指明使用何种编译器?
Originally posted by jpzsj at 2005-11-2 22:45:
Downloaded and studied for two days, finally succeeded in compiling today, but I am not satisfied with the interface, and hope to improve it. I used VC to create a most ordinary dialog box, with two buttons: cancel and OK, but the generated...
I'm sorry, there are too many typos!
I downloaded your source code, there is no Exe file that can be run directly, and there are no Chinese documents, all in English. My English level is not good, please specify which compiler to use?
|
|
2005-11-3 12:55 |
|
|
jpzsj
初级用户
 
积分 43
发帖 26
注册 2005-10-7
状态 离线
|
|
2005-11-3 14:11 |
|
|
jpzsj
初级用户
 
积分 43
发帖 26
注册 2005-10-7
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
编译器我是用 djgpp , 对了, 你还没有回答我上面的问题呢
The compiler I use is djgpp. By the way, you haven't answered my above question yet
|
|
2005-11-3 14:13 |
|
|
jpzsj
初级用户
 
积分 43
发帖 26
注册 2005-10-7
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
这个操作起来比较好, 和Win差不多, 你可以在虚拟机中安装试试
This operation is relatively easy, similar to Win. You can try installing it in a virtual machine.
|
|
2005-11-3 14:16 |
|
|
baomaboy
银牌会员
    
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
to jpzsj
你的程序
能否将热键(F10)写入mbr中,实现引导系统前提示“F10 to win98”两秒,无按键操作就启动c盘的winxp,如果按了F10就引导启动其他盘的win98。(类似一键恢复)
to jpzsj
Can your program write the hotkey (F10) into the MBR to achieve that before booting the system, it prompts "F10 to win98" for two seconds, if there is no key operation, it starts winxp on the C drive, and if F10 is pressed, it boots and starts win98 on another drive. (Similar to one-click recovery)
|
|
2006-1-2 01:16 |
|
|
jpzsj
初级用户
 
积分 43
发帖 26
注册 2005-10-7
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
Originally posted by baomaboy at 2006-1-2 01:16:
to jpzsj
你的程序
能否将热键(F10)写入mbr中,实现引导系统前提示“F10 to win98”两秒,无按键操作就启动c盘的winxp,如果按了F10就引导启动其他盘皠...
这个不是我的程序,是老外编的,是一个有GUI的多重引导程序
Originally posted by baomaboy at 2006-1-2 01:16:
to jpzsj
Can your program write the hotkey (F10) into the MBR to achieve that before booting the system, it prompts "F10 to win98" for two seconds. If there is no key operation, it starts winxp on drive C. If F10 is pressed, it boots and starts from another drive...
This is not my program. It was made by a foreigner. It's a multi-boot program with a GUI
|
|
2006-1-5 10:21 |
|
|
qclore
新手上路

积分 8
发帖 2
注册 2006-6-9
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
TO:Firstsail
现在在哪里可以下载到WInsail
TO:Firstsail
Where can I download WInsail now
|
|
2006-6-9 12:22 |
|
|
cnc202
新手上路

积分 6
发帖 3
注册 2007-1-28
状态 离线
|
|
2007-5-14 16:01 |
|
|
hq20051252
新手上路

积分 3
发帖 2
注册 2007-6-29
状态 离线
|
|
2007-7-1 09:37 |
|
|
xuwenyi
新手上路

积分 2
发帖 1
注册 2010-11-4
状态 离线
|
『第 13 楼』:
winsai
使用 LLM 解释/回答一下
现在感觉是一头雾水
Now I feel completely confused
|
|
2010-11-11 14:41 |
|