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-24 07:33
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » The Terminator of DOS Interface Development View 94,226 Replies 290
Floor 76 Posted 2005-12-20 19:50 ·  中国 北京 联通
高级用户
★★
Credits 506
Posts 187
Joined 2005-12-04 22:41
20-year member
UID 46500
Gender Male
Status Offline
Still getting an error. But this time it didn't crash. Still thanks to Guo Heng.
Floor 77 Posted 2005-12-20 22:40 ·  中国 广东 珠海 电信
中级用户
★★
Credits 493
Posts 161
Joined 2002-10-29 00:00
23-year member
UID 94
Gender Male
From ZHCN
Status Offline
Studying...
Floor 78 Posted 2006-01-09 10:19 ·  中国 湖南 邵阳 电信
初级用户
Credits 44
Posts 14
Joined 2006-01-04 13:08
20-year member
UID 48410
Gender Male
Status Offline
Guo Daxia! You're really awesome, it makes me so happy!!!, I'm kissing you hard
Floor 79 Posted 2006-01-21 21:15 ·  中国 广东 深圳 天威有线宽带(关内)
初级用户
Credits 184
Posts 31
Joined 2005-03-13 00:00
21-year member
UID 36998
Gender Male
Status Offline
Winsail is really great, but where does the compiled program run? If the mouse and keyboard are not moved, it freezes after a while. Does it have to bring:
//Register Callback Function for Window
pDialog->SetTimeFc(NULL);//Register timer callback function
pDialog->SetDrawFc(NULL);//Register drawing callback function
pDialog->SetHelpFc(NULL);//Register help callback function
pDialog->SetKeyboardFc(NULL);//Register virtual keyboard callback function
Floor 80 Posted 2006-02-16 14:45 ·  中国 广西 桂林 电信
初级用户
★★
Credits 176
Posts 74
Joined 2005-11-07 16:51
20-year member
UID 44761
Status Offline
Wow, this is powerful,
But, I don't understand, heh heh
Floor 81 Posted 2006-04-17 11:10 ·  中国 广东 深圳 宝安区 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
20-year member
UID 41110
Gender Male
From 广东深圳
Status Offline
```c
#include <string.h>

#include <Symbol.h>
#include <Memory.h>


extern unsigned _stklen = 50L * 1024L;


int main()
{
// Create a default page frame of 256 bytes
CXmsMemory mXmsMemory;

// Allocate a new memory block as a new page frame. The larger the page frame, the faster the access to XMS
BYTE* pNewBlock = new BYTE[2048];
// The user's default page frame is 256 bytes, change the page frame to 2048 bytes
BYTE* pOldBlock = mXmsMemory.ChangeFrame(pNewBlock, 2048);
// Delete the old page frame
delete pOldBlock;

// Allocate 200K bytes of XMS memory
mXmsMemory.SetSize(200L, 1024L);

// Increase 100K of XMS memory (300 = 200 + 100)
mXmsMemory.SetSizeEx(300L, 1024L);


// Write the string "My name is LiPing!" to the position with byte - unit index "120030L"
char buf[100] = "My Name is LiPing!";
mXmsMemory.SetByteData(120030L, (BYTE *)buf, _fstrlen(buf) + 1);

// Read the string "My name is LiPing!" from the position with byte - unit index "120030L"
_fmemset((BYTE *)buf, 0, 100);
mXmsMemory.GetByteData(120030L, (BYTE *)buf, 100);
printf("\n S = \"%s\"", buf);
getch();

// Release the allocated XMS memory block
mXmsMemory.FreeXms();

return(0);
}
```
Floor 82 Posted 2006-04-24 09:57 ·  中国 湖北 荆州 电信
高级用户
★★★
Credits 994
Posts 444
Joined 2005-01-29 00:00
21-year member
UID 35779
Gender Male
Status Offline
How to use it on pcm3486?
Floor 83 Posted 2006-04-24 12:46 ·  中国 广东 深圳 宝安区 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
20-year member
UID 41110
Gender Male
From 广东深圳
Status Offline
In the XMS module, the global variable int nAfxXmsStyle is the variable that controls the default XMS memory allocation mode.
nAfxXmsStyle = XMSMEMORY_STYLE_MORAL (=0) means the default XMS
Floor 84 Posted 2006-04-24 12:58 ·  中国 广东 深圳 宝安区 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
20-year member
UID 41110
Gender Male
From 广东深圳
Status Offline
In the XMS module, the global variable int nAfxXmsStyle is the variable that controls the default XMS memory allocation mode.

nAfxXmsStyle = 0 (=XMSMEMORY_STYLE_MORAL) means default XMS

nAfxXmsStyle = 1 (=XMSMEMORY_STYLE_DISK) means disk XMS

nAfxXmsStyle = 2 (=XMSMEMORY_STYLE_EMSCARD) means the extended memory card of PCM3486

If you call the "InitSystem()" function, it will analyze the "XmsStyle" key in the "Boot" section of the "Config.Sys" file.


Actually, you can call CXmsMemory::SetXmsStyle() to change the XMS property, and it must be called before the following functions:

CXmsMemory::SetSize()

CXmsMemory::SetSizeEx()

CXmsMemory::MallocXms() function

//---------------------------------------------

#include <string.h>

#include <Symbol.h>
#include <Memory.h>


extern unsigned _stklen = 50L * 1024L;

extern int nAfxXmsStyle;
int main()
{
nAfxXmsStyle = XMSMEMORY_STYLE_DISK; // Use disk emulated XMS memory


// Create a default frame with 256 bytes
CXmsMemory mXmsMemory;

// Allocate a new memory block as a new frame. The larger the frame, the faster the access to XMS
BYTE* pNewBlock = new BYTE[2048];
// The user's default frame is 256 bytes, change the frame to 2048 bytes
BYTE* pOldBlock = mXmsMemory.ChangeFrame(pNewBlock, 2048);
// Delete the old frame
delete pOldBlock;

// Allocate 200K bytes of XMS memory
mXmsMemory.SetSize(200L, 1024L);

// Increase 100K of XMS memory (300 = 200 + 100)
mXmsMemory.SetSizeEx(300L, 1024L);


// Write the string "My name is LiPing1!" to the position with byte-based index "120030L"
char buf[100] = "My Name is LiPing1!";
mXmsMemory.SetByteData(120030L, (BYTE *)buf, _fstrlen(buf) + 1);

// Read the string "My name is LiPing1!" from the position with byte-based index "120030L"
_fmemset((BYTE *)buf, 0, 100);
mXmsMemory.GetByteData(120030L, (BYTE *)buf, 100);
printf("\n S = \"%s\"", buf);


// If running on an ordinary PC, you can change the memory to XMS
mXmsMemroy.FreeXms();
mXmsMemory.SetXmsStyle(XMSMEMORY_STYLE_NORMAL); // If it is PCM3486, change to XMSMEMORY_STYLE_EMSCARD
mXmsMemory.SetSize(300L, 1024L);

// Write the string "My name is LiPing2!" to the position with byte-based index "120030L"
_fmemcpy(buf, "My Name is LiPing2!");
mXmsMemory.SetByteData(120030L, (BYTE *)buf, _fstrlen(buf) + 1);

// Read the string "My name is LiPing2!" from the position with byte-based index "120030L"
_fmemset((BYTE *)buf, 0, 100);
mXmsMemory.GetByteData(120030L, (BYTE *)buf, 100);
printf("\n S = \"%s\"", buf);


getch();

// Release the allocated XMS memory block
mXmsMemory.FreeXms();

return(0);
}
Floor 85 Posted 2006-06-03 13:25 ·  中国 广东 深圳 宝安区 电信
新手上路
Credits 2
Posts 1
Joined 2006-06-03 13:19
20-year member
UID 56483
Gender Female
From 广东深圳
Status Offline
What a great thing!

Having searched far and wide without finding it, now I get it without any effort!

Thanks a lot to the LZ for selfless dedication!
Floor 86 Posted 2006-07-17 18:33 ·  中国 广东 深圳 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
20-year member
UID 41110
Gender Male
From 广东深圳
Status Offline
Excuse me, moderator, how to insert pictures in the post?
Floor 87 Posted 2006-07-17 22:08 ·  中国 云南 红河哈尼族彝族自治州 石屏县 电信
中级用户
★★
Credits 478
Posts 132
Joined 2003-07-02 00:00
22-year member
UID 6296
Gender Male
Status Offline
to firstsail: It is strongly suggested that you create an integrated development environment, just like boywindows and qbwin, etc. This would be more convenient. Although the code generated by converting with your program to VC++, I think it is not bad, but not very good. So if you have time, a strong suggestion!!!!!
Floor 88 Posted 2006-07-22 11:49 ·  中国 香港 Cyber_Express通信公司
银牌会员
★★★
阿林
Credits 1,410
Posts 497
Joined 2004-06-28 00:00
21-year member
UID 27551
Gender Male
From 九龍,香港
Status Offline
Firstsail's interface is really great. It is hoped that these domestic experts can participate in world - class projects like ReactOS... On one hand, it won't be exploited by Microsoft, and on the other hand, it will also bring honor to the Chinese people!
我 的 網 站 - http://optimizr.dyndns.org
Floor 89 Posted 2006-07-24 09:09 ·  中国 江苏 苏州 电信
新手上路
Credits 2
Posts 1
Joined 2006-07-23 01:47
19-year member
UID 59048
Status Offline
Please provide the Chinese text that needs to be translated.
Floor 90 Posted 2006-07-25 00:44 ·  中国 云南 红河哈尼族彝族自治州 个旧市 电信
中级用户
★★
Credits 478
Posts 132
Joined 2003-07-02 00:00
22-year member
UID 6296
Gender Male
Status Offline
Boss, why are there no replies?
‹ Prev 1 4 5 6 7 8 20 Next ›
Forum Jump: