www.pudn.com > H323BeaconClient-v1.4_win_src.zip > BeaconClient.cpp, change:2003-10-09,size:3148b


/* 
 * BeaconClient.cxx 
 * 
 * Defines the class behaviors for the application 
 * 
 * Copyright (c) ITEC-Ohio, 2002. 
 * 
 * The contents of this file are subject to the Mozilla Public License 
 * Version 1.0 (the "License"); you may not use this file except in 
 * compliance with the License. You may obtain a copy of the License at 
 * http://www.mozilla.org/MPL/ 
 * 
 * Software distributed under the License is distributed on an "AS IS" 
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 
 * the License for the specific language governing rights and limitations 
 * under the License. 
 * 
 * The Original Code is Open H323 Library available at http://www.openh323.org 
 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 
 * 
 */ 
 
 
#include "stdafx.h" 
#include "BeaconClient.h" 
#include "MyTabCtrl.h" 
#include "BeaconClientDlg.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CBeaconClientApp 
 
BEGIN_MESSAGE_MAP(CBeaconClientApp, CWinApp) 
	//{{AFX_MSG_MAP(CBeaconClientApp) 
		// NOTE - the ClassWizard will add and remove mapping macros here. 
		//    DO NOT EDIT what you see in these blocks of generated code! 
	//}}AFX_MSG 
	ON_COMMAND(ID_HELP, CWinApp::OnHelp) 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CBeaconClientApp construction 
 
CBeaconClientApp::CBeaconClientApp() 
{ 
	// TODO: add construction code here, 
	// Place all significant initialization in InitInstance 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// The one and only CBeaconClientApp object 
 
CBeaconClientApp theApp; 
 
///////////////////////////////////////////////////////////////////////////// 
// CBeaconClientApp initialization 
 
BOOL CBeaconClientApp::InitInstance() 
{ 
	if(!AfxOleInit())  // OLE addition starts here 
    { 
      AfxMessageBox("Could not initialize COM dll"); 
      return FALSE; 
    }                 // End of OLE your  
 
	if (!AfxSocketInit()) 
	{ 
		AfxMessageBox(IDP_SOCKETS_INIT_FAILED); 
		return FALSE; 
	} 
 
	AfxEnableControlContainer(); 
 
	// Standard initialization 
	// If you are not using these features and wish to reduce the size 
	//  of your final executable, you should remove from the following 
	//  the specific initialization routines you do not need. 
 
#ifdef _AFXDLL 
	Enable3dControls();			// Call this when using MFC in a shared DLL 
#else 
	Enable3dControlsStatic();	// Call this when linking to MFC statically 
#endif 
 
	CBeaconClientDlg dlg; 
	m_pMainWnd = &dlg; 
	int nResponse = dlg.DoModal(); 
	if (nResponse == IDOK) 
	{ 
		// TODO: Place code here to handle when the dialog is 
		//  dismissed with OK 
	} 
	else if (nResponse == IDCANCEL) 
	{ 
		// TODO: Place code here to handle when the dialog is 
		//  dismissed with Cancel 
	} 
 
	// Since the dialog has been closed, return FALSE so that we exit the 
	//  application, rather than start the application's message pump. 
	return FALSE; 
}