ations")); (0);// Load standard INI file options (including) * pDocTemplate; = new CSingleDocTemplate (_MAINFRAME, _CLASS (CLlip_clientDoc ), _CLASS (CMainFrame),// ​​main SDI frame window_CLASS (CLlip_clientView)); (pDocTemplate);
// Parse command line for standard shell commands, DDE, file opencmdInfo; (cmdInfo);
// Dispatch commands specified on the command line (! ProcessShellCommand (cmdInfo)) FALSE;
// The one and only window has been initialized, so show and update = R.left + 500;. Bottom = r.top + 380; _pMainWnd-> MoveWindow (& r);
sockaddr_in sa ;//структура даних гнізда
s = socket (AF_INET, SOCK_STREAM, 0) ;//створити гніздо (s == INVALID_SOCKET)
{(NULL, "Socket error.", "Помилка", MB_OK); 0;
} (addr == INADDR_NONE)// при помилку
{(NULL, "Invalid IP address.", "Помилка", MB_OK); (s); 0;
}. sin_family = AF_INET ;//заповнити структуру даних гнезда.sin_port = htons (port);. sin_addr.s_addr = addr;
// встановити з'єднання: (connect (s, (sockaddr *) & sa, sizeof (sa)) == SOCKET_ERROR)
{(NULL, "Connect error.", "Помилка", MB_OK); (s); 0;
} TRUE;
} CAboutDlg: public CDialog
{: ();
// Dialog Data ​​p>
// {{AFX_DATA (CAboutDlg) {IDD = IDD_ABOUTBOX};
//}} AFX_DATA
// ClassWizard generated virtual function overrides
// {{AFX_VIRTUAL (CAboutDlg): void DoDataExchange (CDataExchange * pDX);// DDX/DDV
//}} AFX_VIRTUAL
// Implementation:
// {{AFX_MSG (CAboutDlg)
// No message handlers
//}} AFX_MSG_MESSAGE_MAP ()
}; :: CAboutDlg (): CDialog (CAboutDlg :: IDD)
{
// {{AFX_DATA_INIT (CAboutDlg)
//}} AFX_DATA_INIT
} CAboutDlg :: DoDataExchange (CDataExchange * pDX)
{:: DoDataExchange (pDX);
// {{AFX_DATA_MAP (CAboutDlg)
//}} AFX_DATA_MAP
} _MESSAGE_MAP (CAboutDlg, CDialog)
// {{AFX_MSG_MAP (CAboutDlg)
// No message handlers
//}} AFX_MSG_MAP_MESSAGE_MAP ()
// App command to run the dialogCLlip_clientApp :: OnAppAbout ()
{aboutDlg;. DoModal (); p align="justify">} CLlip_clientApp :: ExitInstance ()
{(s);// закрити гнездоCWinApp :: ExitInstance ();}
Додаток Б (обов'язковий)