mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
68 lines
1.3 KiB
C++
68 lines
1.3 KiB
C++
// WinStun.cpp : Defines the class behaviors for the application.
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "WinStun.h"
|
|
#include "WinStunDlg.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#endif
|
|
|
|
|
|
// CWinStunApp
|
|
|
|
BEGIN_MESSAGE_MAP(CWinStunApp, CWinApp)
|
|
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
// CWinStunApp construction
|
|
|
|
CWinStunApp::CWinStunApp()
|
|
{
|
|
// TODO: add construction code here,
|
|
// Place all significant initialization in InitInstance
|
|
}
|
|
|
|
|
|
// The one and only CWinStunApp object
|
|
|
|
CWinStunApp theApp;
|
|
|
|
|
|
// CWinStunApp initialization
|
|
|
|
BOOL CWinStunApp::InitInstance()
|
|
{
|
|
// InitCommonControls() is required on Windows XP if an application
|
|
// manifest specifies use of ComCtl32.dll version 6 or later to enable
|
|
// visual styles. Otherwise, any window creation will fail.
|
|
InitCommonControls();
|
|
|
|
CWinApp::InitInstance();
|
|
|
|
if (!AfxSocketInit())
|
|
{
|
|
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
|
|
return FALSE;
|
|
}
|
|
|
|
AfxEnableControlContainer();
|
|
|
|
|
|
CWinStunDlg dlg;
|
|
m_pMainWnd = &dlg;
|
|
INT_PTR nResponse = dlg.DoModal();
|
|
|
|
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;
|
|
}
|