Merge branch '138-toggle-free-look-with-hotkey' into main/gingo-test
[ryzomcore.git] / nelns / login_system / nel_launcher_windows / nel_launcher.cpp
blob2df5db3a108aa9706ecb70d559babdeae63f2231
1 // nel_launcher.cpp : Defines the class behaviors for the application.
2 //
10 /** TODO:
12 - find a way to remove the right-click-popup-window in the IE
13 - find a way to remove the right scroll bar when it s not needed
14 - if load page error, trap it and display an error, retry, quit...
20 #include "stdafx.h"
21 #include <nel/misc/types_nl.h>
22 #include <nel/misc/debug.h>
23 #include <nel/misc/path.h>
24 #include "nel_launcher.h"
25 #include "nel_launcherDlg.h"
27 #ifdef _DEBUG
28 #define new DEBUG_NEW
29 #undef THIS_FILE
30 static char THIS_FILE[] = __FILE__;
31 #endif
33 NLMISC::CFileDisplayer FileDisplayer;
35 /////////////////////////////////////////////////////////////////////////////
36 // CNel_launcherApp
38 BEGIN_MESSAGE_MAP(CNel_launcherApp, CWinApp)
39 //{{AFX_MSG_MAP(CNel_launcherApp)
40 // NOTE - the ClassWizard will add and remove mapping macros here.
41 // DO NOT EDIT what you see in these blocks of generated code!
42 //}}AFX_MSG
43 ON_COMMAND(ID_HELP, CWinApp::OnHelp)
44 END_MESSAGE_MAP()
46 /////////////////////////////////////////////////////////////////////////////
47 // CNel_launcherApp construction
49 CNel_launcherApp::CNel_launcherApp()
51 // TODO: add construction code here,
52 // Place all significant initialization in InitInstance
55 /////////////////////////////////////////////////////////////////////////////
56 // The one and only CNel_launcherApp object
58 CNel_launcherApp theApp;
60 /////////////////////////////////////////////////////////////////////////////
61 // CNel_launcherApp initialization
63 BOOL CNel_launcherApp::InitInstance()
65 // use log.log if NEL_LOG_IN_FILE defined as 1
66 NLMISC::createDebug(NULL, true, true);
68 // filedisplayer only deletes the 001 etc
69 if (NLMISC::CFile::isExists("nel_launcher.log"))
70 NLMISC::CFile::deleteFile("nel_launcher.log");
71 // initialize the log file
72 FileDisplayer.setParam("nel_launcher.log", true);
73 NLMISC::DebugLog->addDisplayer(&FileDisplayer);
74 NLMISC::InfoLog->addDisplayer(&FileDisplayer);
75 NLMISC::WarningLog->addDisplayer(&FileDisplayer);
76 NLMISC::AssertLog->addDisplayer(&FileDisplayer);
77 NLMISC::ErrorLog->addDisplayer(&FileDisplayer);
79 AfxEnableControlContainer();
81 // Standard initialization
82 // If you are not using these features and wish to reduce the size
83 // of your final executable, you should remove from the following
84 // the specific initialization routines you do not need.
86 #ifdef _AFXDLL
87 Enable3dControls(); // Call this when using MFC in a shared DLL
88 #else
89 Enable3dControlsStatic(); // Call this when linking to MFC statically
90 #endif
92 CNel_launcherDlg dlg;
93 m_pMainWnd = &dlg;
94 int nResponse = dlg.DoModal();
95 if (nResponse == IDOK)
97 // TODO: Place code here to handle when the dialog is
98 // dismissed with OK
100 else if (nResponse == IDCANCEL)
102 // TODO: Place code here to handle when the dialog is
103 // dismissed with Cancel
106 // Since the dialog has been closed, return FALSE so that we exit the
107 // application, rather than start the application's message pump.
108 return FALSE;