其实它是用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;
}
Actually, it is made by using the MakeDlg.Exe program to convert the dialog box of Visual C++ into the dialog box of WinSail and then adding some code slightly. The source code is as follows
#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,"About the System");
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,
" Author: Xianhang Company\n"
" Contact number: 13560730316, 0755-27570111\n"
" This computer program is protected by copyright law and international treaties\n"
"If this program (or any part of it) is copied or disseminated without authorization,\n"
"severe civil and criminal sanctions will be imposed, and the maximum possible prosecution will be carried out within the scope permitted by law!");
CListBox* pListBox1 = new CListBox(pDialog);
pListBox1->CreateList(127,160,320,120,NULL);
pListBox1->SetLineCharacter(100);
pListBox1->SetCount(6);
//System
sprintf(buf,"System Name %s",AfxString);
pListBox1->SetSel(0,buf);
//User
sprintf(buf,"User Name %s , %s",
strAfxUserName,
((bAfxManager)?"System Administrator":"Ordinary User"));
pListBox1->SetSel(1,buf);
//Print
sprintf(buf,"Print Port Address %s",strAfxPrintPathName);
pListBox1->SetSel(2,buf);
pDialog->ShowWindow();
pDialog->DoModal();
delete pDialog;
}