te(pDocTemplate);
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initialized, so show and update it.
//add begin
m_pMainWnd->MoveWindow(0,0,800,600,true);//added by yjk
m_pMainWnd->CenterWindow();
m_pMainWnd->SetWindowText("月影传书");
m_pMainWnd->ShowWindow(SW_SHOW); //这句代码不是作者添加了,是AppWizard自动生成的。
m_pMainWnd->UpdateWindow(); //这句代码不是作者添加了,是AppWizard自动生成的。
/*
//这一部分代码被我注释掉了,因为在上面的AfxSocketInit()函数中已经调用过WSAStartup函数了。
//pList.RemoveAll();
WORD wVersionRequested;
WSADATA wsaData;
// char name[255];
//PHOSTENT hostinfo;
wVersionRequested = MAKEWORD( 2, 0 );
if ( WSAStartup( wVersionRequested, &wsaData ) == 0 )
{
WSACleanup();
}
*/
//add end
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
//CLinkCtrl Class This class wraps the functionality of the SysLink common control.
//A "link control" provides a convenient way to embed hypertext links in a window. The actual control is a window that renders marked-up text and launches appropriate applications when the user clicks an embedded link. Multiple links are supported within one control and can be accessed by a zero-based index.
//The CLinkCtrl class provides the functionality of the Windows common SysLink control.
//MSDN中说,这种超链接只用于WinXP及后续版本,可是我试过了,在Win98下也能实现正常链接!看来,MSDN的资料中存在着很多的错误!This control (and therefore the CLinkCtrl class) is available only to programs running under Windows XP and later.
CLinkCtrl m_mail;
CLinkCtrl m_http;
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX);
virtual BOOL OnInitDialog();
// DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
// No message handlers
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
上一篇:
CLIENT.CPP
下一篇:
致享和威驰哪个好点?冲着安全和空间 推荐致享