其实它是用MakeDlg.Exe程序将Visual C++的对话框转化成WinSail的对话框后,稍微增加一些代码而成,源代码如下
#include <Symbol.h>
#include <MyFrame.h>
extern BOOL bAfxManager;
extern char far AfxString;
extern char strAfxUserName;
extern char strAfxPrintPathName;
void AboutDlg()
{
char buf;
CDialog* pDialog = new CDialog;
pDialog->CreateWindow(0,0,455,287,"关于系统");
pDialog->Center();
new CCloseButton(pDialog);
CLabel* pLabel1 = new CLabel(pDialog);
pLabel1->CreateObject(0,19,123,285,NULL);
pLabel1->SetBitmapFlags(TRUE);
pLabel1->SetBackColorDisplay(TRUE);
pLabel1->SetBitmapFile("Bmp\\DESKTOP.BMP");
CLabel* pLabel2 = new CLabel(pDialog);
pLabel2->CreateObject(127,40,273,64,
" 作者:先航公司\n"
" 联系电话:13560730316,0755-27570111\n"
" 本计算机程序受版权法和国际条约保护\n"
"如果未经授权而擅自复制或传播本程序(或\n"
"其中任何部分),将受到严厉的民事及刑事\n"
"制裁,并将在法律许可的范围内受到最大可\n"
"能的起诉!");
CListBox* pListBox1 = new CListBox(pDialog);
pListBox1->CreateList(127,160,320,120,NULL);
pListBox1->SetLineCharacter(100);
pListBox1->SetCount(6);
//System
sprintf(buf,"系统名称 %s",AfxString);
pListBox1->SetSel(0,buf);
//User
sprintf(buf,"用户名称 %s , %s",
strAfxUserName,
((bAfxManager)?"系统管理员":"普通用户"));
pListBox1->SetSel(1,buf);
//Print
sprintf(buf,"打印口地址 %s",strAfxPrintPathName);
pListBox1->SetSel(2,buf);
pDialog->ShowWindow();
pDialog->DoModal();
delete pDialog;
}