China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-21 11:32
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » The Terminator of DOS Interface Development View 94,125 Replies 290
Floor 211 Posted 2007-11-30 00:43 ·  中国 湖南 长沙 电信
新手上路
Credits 7
Posts 4
Joined 2006-03-08 09:50
20-year member
UID 51560
Status Offline
Thanks for providing it.

It's much easier to develop DOS programs with this thing.
Floor 212 Posted 2007-12-29 15:33 ·  中国 福建 厦门 电信
初级用户
Credits 34
Posts 17
Joined 2007-12-29 15:05
18-year member
UID 107123
Gender Male
Status Offline
Why can't I open your website? Could you send one to me? Thanks!
wuxianglin2000@sina.com
Floor 213 Posted 2007-12-29 15:37 ·  中国 福建 厦门 电信
初级用户
Credits 34
Posts 17
Joined 2007-12-29 15:05
18-year member
UID 107123
Gender Male
Status Offline
Fortunately, I flipped through the post earlier and have already downloaded it. Thanks!
Floor 214 Posted 2008-01-03 23:35 ·  中国 香港 电讯盈科有限公司
新手上路
Credits 4
Posts 2
Joined 2008-01-03 20:03
18-year member
UID 107591
Gender Male
Status Offline
think!!!!!
Floor 215 Posted 2008-01-03 23:44 ·  中国 香港 电讯盈科有限公司
新手上路
Credits 4
Posts 2
Joined 2008-01-03 20:03
18-year member
UID 107591
Gender Male
Status Offline
Why can't I open your website? Can you send one to me? Thanks!
honkit.wong@gmail.com
Floor 216 Posted 2008-01-05 17:37 ·  中国 广东 深圳 宝安区 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
20-year member
UID 41110
Gender Male
From 广东深圳
Status Offline
Floor 217 Posted 2008-02-19 19:31 ·  中国 广东 深圳 宝安区 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
20-year member
UID 41110
Gender Male
From 广东深圳
Status Offline
(1) For third-party TCP/IP, three functions are registered, namely "initialization service function", "termination service function", and "network message loop function".
Among them:
Registering the "initialization service function" is for calling in InitSystem().
Registering the "termination service function" is for calling in CloseSystem().
Registering the "network message loop function" is for calling in the CWindow::OnIdle() function.


(2) For third-party multitasking modules, three functions are registered, namely "initialization service function", "termination service function", and "sleep function".
Among them:
Registering the "initialization service function" is for calling in InitSystem().
Registering the "termination service function" is for calling in CloseSystem().
Registering the "sleep function" is for when the system internally calls the KernelDelay() function to switch to the actual delay or sleep function.




int main(int argc, char** argv)
{

// Register WinSail-TCPIP stack
// GlobalInitSocket -- TCP/IP initialization service function
// GlobalCloseSocket -- TCP/IP termination service function
// EthernetEntry -- TCP/IP network message loop function
::AfxRegisterNetcardEntry(::GlobalInitSocket,
::GlobalCloseSocket, ::EthernetEntry);

//// Register WinSail-multitasking stack
// KernelInitProcess -- multitasking initialization service function
// KernelCloseProcess -- multitasking termination service function
// __MultiTaskDelay -- multitasking sleep function
::AfxRegisterMultitaskEntry(::KernelInitProcess,
::KernelCloseProcess, ::__MultiTaskDelay);

// Initialize system kernel
if (!::InitSystem(argc, argv))
{
// Close system kernel
::CloseSystem();
printf("\nInit System Error!");
return(0);
}


// User program
//.......


// Close system kernel
::CloseSystem();

return(1);

}
Floor 218 Posted 2008-02-20 18:59 ·  中国 广东 深圳 电信
初级用户
Credits 28
Posts 13
Joined 2008-02-18 12:33
18-year member
UID 110885
Gender Male
Status Offline
May I ask, Mr. firstsail? I just downloaded the winwail program and found two problems:

1. After adding any control (for example, adding a toolbar CToolsBar) in a window with a CMenu menu, the CMenu cannot be opened with the mouse, and can only be opened with the keyboard Alt+F and then can be operated with the mouse; I tried the early version of your winsail before and there was no problem?

2. Opening and saving folders does not seem to support the floppy disk A drive?
Floor 219 Posted 2008-02-22 16:28 ·  中国 广东 深圳 宝安区 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
20-year member
UID 41110
Gender Male
From 广东深圳
Status Offline
In a window with a CMenu menu, after adding any other control (for example, adding a toolbar CToolsBar), the CMenu cannot be opened with the mouse, and can only be operated with the mouse after being opened with the keyboard Alt+F; I tried the early version of the great winsail before and there was no problem?


Answer: It has been found that there is indeed this problem. Because the website server is refreshing, the changed WinSail can only be uploaded after 5:30 pm. At that time, please re-download and re-"Build All" with Bc31 during compilation.


Opening and saving folders does not seem to support the floppy drive A:?


Answer: Since floppy disks are rarely used, it is canceled in the new version. I generally use "CF card" + "CF to IDE converter" instead of floppy disks.
Floor 220 Posted 2008-02-24 01:51 ·  中国 重庆 沙坪坝区 电信
初级用户
Credits 45
Posts 17
Joined 2006-09-23 13:24
19-year member
UID 63469
Status Offline
Qiang~ Tears are streaming down!
Floor 221 Posted 2008-02-26 11:56 ·  中国 广东 深圳 电信
初级用户
Credits 28
Posts 13
Joined 2008-02-18 12:33
18-year member
UID 110885
Gender Male
Status Offline
Mr. Guo, did you update it on your homepage http://www.firstsail.com.cn/Software.html? I just downloaded it and it still hasn't changed. It's still the version from , and the sail.lib is still from December 25, 2007?

Another thing: a small problem with the open and save dialog box functions: For example, my D drive is a USB-disk, and the U disk is detected when the program starts, but if the U disk is not inserted when the open dialog box is opened, it will cause the system to crash.

Also, as I understand, in many traditional industries, due to slow updates, many old industrial environments are still using floppy disks. Considering improving compatibility, it is suggested that you still add the floppy disk reading and writing function. It shouldn't need to add more programs because reading and writing are the same as the hard disk, both are DOS standard functions.

To solve the above two problems, it is suggested to use the absread or _bios_disk function to detect whether this disk exists before opening this dialog box, which can solve the problem of the floppy disk or U disk not being inserted.
Floor 222 Posted 2008-02-26 15:23 ·  中国 广东 深圳 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
20-year member
UID 41110
Gender Male
From 广东深圳
Status Offline
Has it been updated on your homepage http://www.firstsail.com.cn/Software.html? I just downloaded it and it seems not to have changed yet. It's still the version, and the sail.lib inside is still from December 25, 2007?



Because the network was just repaired, WinSail was updated today , and the mouse problem in the menu has been fixed!

If you want to solve the above two problems, it is recommended to use the absread or _bios_disk function to detect whether this disk exists before opening this dialog box, and then the problem of the floppy disk or USB flash drive not being inserted can be solved.


I will add the detection of the existence of the disk using the absread or _bios_disk function as you suggested in a few days. Please pay attention to the update!

[ Last edited by firstsail on 2008-2-26 at 03:27 PM ]
Floor 223 Posted 2008-02-26 21:14 ·  中国 北京 中移铁通
初级用户
Credits 46
Posts 22
Joined 2006-11-13 10:14
19-year member
UID 70433
Gender Male
Status Offline
1. When combining multiple EXE programs, when the main program calls the subroutine, "sail200 触" is displayed on the screen. How to block it?
2. Can the settimefc() function set the timing time? The "beep" time in DOS is too short. Sometimes it is not desired that the timer works too fast.
3. How to set the maximum number of bytes, or the maximum number of bytes per line, or the maximum number of columns for a multi-line edit box, so that automatic line wrapping can be done without pressing Enter when entering.
4. Can you give an example of combining list control editing with a database?
Floor 224 Posted 2008-02-27 10:51 ·  中国 广东 深圳 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
20-year member
UID 41110
Gender Male
From 广东深圳
Status Offline
When combining multiple EXE programs, when the main program calls a subroutine, "sail200 触" is displayed on the screen. How to shield it?

......

Can the settimefc() function set the timing time? The "beep" time under DOS is too short. Sometimes it is not desired that the timer works too fast.


By default, it is 55ms, now set it to 110ms
void far OnTime_MyDialog(CObject* pObj)
{

CDialog* pDialog = (CDialog *)pObj;

//Introduce a static variable as the number of timing cycles
static int nLoops = 0;
if ((++nLoops) < 2)
{
return;
}
nLoops = 0;

//Add your code here

}


3. How to set the maximum number of bytes, or the maximum number of bytes per line, or the maximum number of columns for a multi-line edit box, so that automatic line wrapping can be done without pressing Enter when entering.


//.....

4. Can you give an example of combining list control editing with a database?


BOOL LoadDatabase(CListBox* pListbox)
{
char buf;

char* pStrFile = "MyBase.Dbf";
//Suppose there is a database named "MyBase.Dbf" which has three fields
//其中索引为 2的字段是字符串字段

//Open the database
CFoxpro mFoxpro;
if (!mFoxpro.Open (pStrFile))
{
::sprintf (buf, "File opening error\n---%s", pStrFile);
::AfxMessageBox("Error", buf, MB_OK);
return (FALSE);
}

//Read the properties of the field with index 2
FOXPRO_FIELDS mFoxproFields = *(mFoxpro.GetFoxproFields(2));

//Judge whether the field with index 2 is a string field
if (mFoxproFields.byStyle != 'C' && mFoxproFields.byStyle != 'c')
{
::sprintf (buf, "Illegal database\n---%s", pStrFile);
::AfxMessageBox("Error", buf, MB_OK);
return (FALSE);
}

int nMaxCh = (int)(WORD)mFoxproFields.byLength;

//Get the total number of records in the database
long lgCount = mFoxpro.GetRecordCount();

//Set the maximum number of characters per line of the list box
pListBox->SetLineCharacter((nMaxCh == 255) ? 255 : nMaxzCh + 1);

//Set the total number of items in the list box to lgCount
pListBox->SetCount (lgCount);

//Loop to read the content of the string field with index 2 in the database
for (long i = 0L; i < lgCount; i++)
{
//Locate the database
mFoxpro.Seek(i, SEEK_SET);

//Read the value of the string field with index 2
mFoxpro.GetFieldString (2, buf);

//Write the read value into the list box
pListBox->SetSel(i, buf);
}


//Close the database
mFoxpro.Close();

return (TRUE);
}

[ Last edited by firstsail on 2008-2-27 at 11:27 AM ]
Floor 225 Posted 2008-02-27 12:55 ·  中国 四川 遂宁 联通
新手上路
Credits 4
Posts 2
Joined 2008-01-18 20:28
18-year member
UID 108961
Gender Male
Status Offline
Where to download it?
‹ Prev 1 13 14 15 16 17 20 Next ›
Forum Jump: