DUEL.H

/*========================================================================== 
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File:duel.h
* Content:main include file
*
*
***************************************************************************/

#ifndef DUEL_INCLUDED
#define DUEL_INCLUDED

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
#include <mmsystem.h>
#include "resource.h"
#include <tchar.h>

/*
* Application messages
*/

#define UM_LAUNCH WM_USER
#define UM_ABORT WM_USER+1
#define UM_RESTARTTIMER WM_USER+2

// program states
enum
{
PS_SPLASH,
PS_ACTIVE,
PS_REST
};

#define MAX_SCREEN_X 639
#define MAX_SCREEN_Y 479
#define MAX_PLAYERNAME 50
#defineMAX_SESSIONNAME 50
#defineMAX_SPNAME50
#defineMAX_CLASSNAME50
#defineMAX_WINDOWTITLE 50
#defineMAX_ERRORMSG256
#defineMAX_FONTNAME50
#defineMAX_HELPMSG512

#define RECEIVE_TIMER_ID 1
#define RECEIVE_TIMEOUT 1000 // in milliseconds

#define ENUM_TIMER_ID 2
#define ENUM_TIMEOUT 500 // in milliseconds

// default window size
#defineMAX_DEFWIN_X640
#defineMAX_DEFWIN_Y480


// tree view image info
#define CX_BITMAP25
#define CY_BITMAP25
#define NUM_BITMAPS 2

// registry info
#define DUEL_KEY (TEXT("Software\\Microsoft\\Duel"))

// macros
#define DEBUG_OUT(s) OutputDebugString(s);

/*
* fn prototypes
*/

int WINAPIWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
int nCmdShow );
long WINAPIMainWndproc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
BOOL InitApplication(HINSTANCE hinst);
void CleanupApplication(void);
BOOL LaunchedByLobby(void);
BOOLShowError( int err );
HWNDShowConnectStatus(void);
void UpdateTitle(void);

#endif