// [!output APP_IMPL] : define los comportamientos de las clases para la aplicación. // #include "stdafx.h" #include "[!output APP_HEADER]" #include "[!output DIALOG_HEADER]" #ifdef _DEBUG #define new DEBUG_NEW #endif // [!output APP_CLASS] BEGIN_MESSAGE_MAP([!output APP_CLASS], [!output APP_BASE_CLASS]) [!if HELPSTYLE_WINHELP] ON_COMMAND(ID_HELP, &CWinApp::OnHelp) [!endif] END_MESSAGE_MAP() // Construcción de [!output APP_CLASS] [!if HELPSTYLE_WINHELP] [!output APP_CLASS]::[!output APP_CLASS](LPCTSTR lpszHelpName) : [!output APP_BASE_CLASS](lpszHelpName) [!else] [!output APP_CLASS]::[!output APP_CLASS]() : [!output APP_BASE_CLASS]() [!endif] { // TODO: agregar aquí el código de construcción, // Colocar toda la inicialización importante en InitInstance } // El único objeto [!output APP_CLASS] [!if HELPSTYLE_WINHELP] [!output APP_CLASS] theApp(_T("HELP_NAME")); [!else] [!output APP_CLASS] theApp; [!endif] // Inicialización de [!output APP_CLASS] BOOL [!output APP_CLASS]::InitInstance() { [!if !MULTIPLE_PLATFORM] [!if POCKETPC2003_UI_MODEL || SMARTPHONE2003_UI_MODEL] // SHInitExtraControls se debe llamar una vez durante la inicialización de la aplicación para inicializar cualquiera // de los controles específicos de Windows Mobile como por ejemplo CAPEDIT SIPPREF. SHInitExtraControls(); [!endif] [!else] [!if POCKETPC2003_UI_MODEL || SMARTPHONE2003_UI_MODEL] #if defined(WIN32_PLATFORM_PSPC) || defined(WIN32_PLATFORM_WFSP) // SHInitExtraControls se debe llamar una vez durante la inicialización de la aplicación para inicializar cualquiera // de los controles específicos de Windows Mobile como por ejemplo CAPEDIT SIPPREF. SHInitExtraControls(); #endif // WIN32_PLATFORM_PSPC || WIN32_PLATFORM_WFSP [!endif] [!endif] [!if SOCKETS] if (!AfxSocketInit()) { AfxMessageBox(IDP_SOCKETS_INIT_FAILED); return FALSE; } [!endif] [!if ACTIVEX_CONTROLS] AfxEnableControlContainer(); [!endif] // Inicialización estándar // Si no utiliza estas características y desea reducir el tamaño // del archivo ejecutable final, debe quitar // las rutinas de inicialización específicas que no necesite // Cambie la clave del Registro en la que se almacena la configuración // TODO: debe modificar esta cadena para que contenga información correcta // como el nombre de su compañía u organización SetRegistryKey(_T("Aplicaciones generadas con el Asistente para aplicaciones local")); [!output DIALOG_CLASS] dlg; m_pMainWnd = &dlg; INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: insertar aquí el código para controlar // cuándo se descarta el cuadro de diálogo con Aceptar } // Dado que el cuadro de diálogo se ha cerrado, devolver FALSE para salir // de la aplicación en vez de iniciar el suministro de mensajes de dicha aplicación. return FALSE; }