Garmin Fleet Management Controller  2.19.0
CFmiApplication.cpp
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * MODULE NAME:
4 * CFmiApplication.cpp
5 *
6 * Copyright 2008-2009 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #include "stdafx.h"
11 #include "CFmiApplication.h"
12 #include "CFmiPcAppDlg.h"
13 #include "FmiApplicationLayer.h"
14 #include "Logger.h"
15 
16 BEGIN_MESSAGE_MAP( CFmiApplication, CWinApp )
17  ON_COMMAND( ID_HELP, CWinApp::OnHelp )
18 END_MESSAGE_MAP()
19 
20 //----------------------------------------------------------------------
22 //----------------------------------------------------------------------
24 {
25 }
26 
28 {
30 }
31 
32 //----------------------------------------------------------------------
35 //----------------------------------------------------------------------
37 {
38  // InitCommonControls() is required on Windows XP if an application
39  // manifest specifies use of ComCtl32.dll version 6 or later to enable
40  // visual styles. Otherwise, any window creation will fail.
41  InitCommonControls();
42  CWinApp::InitInstance();
43  AfxEnableControlContainer();
44 
45 #if( FMI_SUPPORT_A602 )
46  id_type freeformFmiPacketId = ID_FMI_PACKET;
47 #if( FMI_SUPPORT_A615 )
48  if( NULL != _tcsstr( GetCommandLine(), _T( "freeformFmiPacketId=ID_HOSART_PACKET" ) ) )
49  {
50  freeformFmiPacketId = ID_HOSART_PACKET;
51  }
52 #endif
53 #if( CDT_SUPPORT )
54  if( NULL != _tcsstr( GetCommandLine(), _T( "freeformFmiPacketId=ID_CDT_PACKET" ) ) )
55  {
56  freeformFmiPacketId = ID_CDT_PACKET;
57  }
58 #endif
59  CFmiPcAppDlg dlg( freeformFmiPacketId );
60 #else
61  CFmiPcAppDlg dlg;
62 #endif
63 
64  m_pMainWnd = &dlg;
65  dlg.DoModal();
66 
67  // Since the dialog has been closed, return FALSE so that we exit the
68  // application, rather than start the application's message pump
69  return FALSE;
70 }
Main application dialog.
Definition: CFmiPcAppDlg.h:64
uint8 id_type
Garmin packet ID.
Definition: garmin_types.h:101
#define FALSE
Definition: garmin_types.h:46
virtual BOOL InitInstance()
Initialize the application instance.
Application class for this MFC application.
static void closeLog()
Close the log file.
Definition: Logger.cpp:102
virtual ~CFmiApplication()