client.cpp
来自「VC++串口通信设。本书详细说明讲解了在VC++环境下编写串口通信得过程。值得一」· C++ 代码 · 共 59 行
CPP
59 行
// Get needed include files
#define INITGUID
#include "GUIDs.h"
#include "Resource.h"
#include "Utility.h"
#include "SpyDlg.h"
#include "AttachDlg.h"
//
// Main application/client class
//
class CPizzaSpy : public CWinApp
{
public:
// Public method inherited from CWinApp
virtual BOOL InitInstance();
};
// Our one-and-only application object
CPizzaSpy TheApp;
// Our one-and-only ATL module object
QueATLModule _Module;
//
// The entire program is run out of this method
//
BOOL CPizzaSpy::InitInstance()
{
// Standard initialization
Enable3dControls();
// Initialize OLE libraries
if (!AfxOleInit()) {
AfxMessageBox("Could not initialize OLE subsystem.");
return FALSE;
}
// Initialize our ATL module
_Module.Init(NULL, m_hInstance);
// Ask the user for the name of the host
CAttachDialog Attach;
if (Attach.DoModal() != IDCANCEL) {
// Bring up the main window
CSpyDialog Spy(Attach.GetHostname());
Spy.DoModal();
}
return FALSE;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?