中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-10-31 10:31
47,815 topics / 349,930 posts / today 0 new / 48,290 members
DOS开发编程 & 发展交流 (开发室) » The Terminator of DOS Interface Development
Printable Version  100,838 / 290
Floor211 cxjnet Posted 2007-11-30 00:43
新手上路 Posts 4 Credits 7
Thanks for providing it.

It's much easier to develop DOS programs with this thing.
Floor212 wuxianglin2000 Posted 2007-12-29 15:33
初级用户 Posts 17 Credits 34
Why can't I open your website? Could you send one to me? Thanks!
[email protected]
Floor213 wuxianglin2000 Posted 2007-12-29 15:37
初级用户 Posts 17 Credits 34
Fortunately, I flipped through the post earlier and have already downloaded it. Thanks!
Floor214 kit100 Posted 2008-01-03 23:35
新手上路 Posts 2 Credits 4
think!!!!!
Floor215 kit100 Posted 2008-01-03 23:44
新手上路 Posts 2 Credits 4
Why can't I open your website? Can you send one to me? Thanks!
[email protected]
Floor216 firstsail Posted 2008-01-05 17:37
高级用户 Posts 295 Credits 668 From 广东深圳
Floor217 firstsail Posted 2008-02-19 19:31
高级用户 Posts 295 Credits 668 From 广东深圳
(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);

}
Floor218 godai Posted 2008-02-20 18:59
初级用户 Posts 13 Credits 28
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?
Floor219 firstsail Posted 2008-02-22 16:28
高级用户 Posts 295 Credits 668 From 广东深圳
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.
Floor220 kmlxk Posted 2008-02-24 01:51
初级用户 Posts 17 Credits 45
Qiang~ Tears are streaming down!
Floor221 godai Posted 2008-02-26 11:56
初级用户 Posts 13 Credits 28
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.
Floor222 firstsail Posted 2008-02-26 15:23
高级用户 Posts 295 Credits 668 From 广东深圳
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 ]
Floor223 fgckfl Posted 2008-02-26 21:14
初级用户 Posts 22 Credits 46
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?
Floor224 firstsail Posted 2008-02-27 10:51
高级用户 Posts 295 Credits 668 From 广东深圳
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 ]
Floor225 liudongfu Posted 2008-02-27 12:55
新手上路 Posts 2 Credits 4
Where to download it?
Prev  1 … 12 13 14 15 16 17 18 … 20  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023