那要格式化输出用什么函数你看我这样一段程序:(在sail3000工程中对sail2000.cpp的改动)
if( !::InitSystem(argc,argv))
{
::CloseSystem();
::printf("\nSystem Source Not Enough!");
return(0);
}
ChPrintf(40,0, WHITE, DARKGRAY, 1, 1,
"*********温馨提示********* "
"用户名--- super 密 码--- ( 空 )");
printf("OK!\n");//存dos下应该能用吧
::CloseSystem();
printf("before return\n");
return(1);
其他的只有一些必要的框架,然而这个函数运行后只屏幕输出before return ????
这是因为程序执行太快了,您可以加入“getch()”,或者AfxMessageBox()函数,停顿一个
if( !::InitSystem(argc,argv))
{
::CloseSystem();
::printf("\nSystem Source Not Enough!");
return(0);
}
ChPrintf(40,0, WHITE, DARKGRAY, 1, 1,
"*********温馨提示********* "
"用户名--- super 密 码--- ( 空 )");
printf("OK!\n");//存dos下应该能用吧
AfxMessageBox("调试", "中华人民共和国万岁", MB_OK); // 加入这一行
::CloseSystem();
printf("before return\n");
return(1);
========================================
在网站下载的Sail3000,已经配置成256色,如果要用printf函数,请使用16色,
可修改config.sys的display段
device = 0
mode = 0
What function is used for formatted output? Look at this piece of program: (modifications to sail2000.cpp in the sail3000 project)
if( !::InitSystem(argc,argv))
{
::CloseSystem();
::printf("\nSystem Source Not Enough!");
return(0);
}
ChPrintf(40,0, WHITE, DARKGRAY, 1, 1,
"********* Friendly Reminder ********* "
"Username --- super Password --- ( Empty )");
printf("OK!\n");//Should be usable under DOS
::CloseSystem();
printf("before return\n");
return(1);
There are only some necessary frameworks in other parts, however, after this function runs, only "before return" is output on the screen????
This is because the program executes too fast. You can add "getch()" or AfxMessageBox() function to pause for a
if( !::InitSystem(argc,argv))
{
::CloseSystem();
::printf("\nSystem Source Not Enough!");
return(0);
}
ChPrintf(40,0, WHITE, DARKGRAY, 1, 1,
"********* Friendly Reminder ********* "
"Username --- super Password --- ( Empty )");
printf("OK!\n");//Should be usable under DOS
AfxMessageBox("Debug", "Long live the People's Republic of China", MB_OK); // Add this line
::CloseSystem();
printf("before return\n");
return(1);
========================================
The Sail3000 downloaded from the website has been configured for 256 colors. If you want to use the printf function, please use 16 colors.
The display segment of config.sys can be modified
device = 0
mode = 0