home *** CD-ROM | disk | FTP | other *** search
- //--------------------------------------------------------------------------------------------
- //
- // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- // PARTICULAR PURPOSE.
- //
- // Copyright (c) Microsoft Corporation, 1997 All Rights Reserved
- //
- // Description:
- //
- // Contains the base application level code and classes for a simple Apollo application
- //
- //--------------------------------------------------------------------------------------------
- #include <windows.h>
- #include <olectl.h>
- #include <asfc.h>
- #include <ascmnctl.h>
- #include <keypad.h>
-
- #define APCDBG_INIT "TTS Demo"
- #include <apcdebug.h>
-
-
- #include "resource.h"
- #include "appsink.h"
- #include "app.h"
-
- //--------------------------------------------------------------------------------------------
- //
- // Globals
- //
- //--------------------------------------------------------------------------------------------
-
- CTTSApp* g_pApp = NULL;
-
- //--------------------------------------------------------------------------------------------
- //
- // Functions
- //
- //--------------------------------------------------------------------------------------------
-
- //+-------------------------------------------------------------------------
- //
- // Function: WinMain
- //
- // Synopsis: Main Win32 entry point
- //
- // Arguments: Standard Win32 WinMain arguments
- //
- // Returns: TRUE on app exit
- //
- //---------------------------------------------------------------------------
-
- // Main Win32 entry point
-
- int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR szCmd, int nCmdShow)
- {
- MSG msg;
-
- // Peek message to ensure that thread is ready for PostThreadMsg calls
- PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
-
- g_pApp = new CTTSApp( hInst );
- if( g_pApp == NULL ) goto LReturn;
-
- if(!g_pApp->Init()) goto LReturn;
-
- while (GetMessage(&msg, NULL, 0, 0))
- {
- DispatchMessage(&msg);
- }
-
- LReturn:
-
- if(g_pApp) delete g_pApp;
-
- return TRUE;
- }
-