/*==FINGER.CPP========================================================*/ /* */ /* Module : FINGER */ /* */ /* Project : FINGER */ /* */ /* Description: This is a BC++-Version of the finger client-server */ /* application that uses the Windows Sockets API. */ /* It is based on the article of Mike Calbaum, Frank */ /* Porcaro, Mark Ruegsegger, Bruce Backman in */ /* Dr. Dobb's Journal February 1993. */ /* It was tested using Super-TCP 3.0 from Frontier */ /* Technologies Corp. */ /* */ /*--------------------------------------------------------------------*/ /* */ /* (c) Enter AG, Zrich, 1993 */ /* */ /*--------------------------------------------------------------------*/ /* */ /* Author(s) : Hartwig Thomas */ /* */ /* Started : 24. March 1993 */ /* */ /* Finished : 29. March 1993 */ /* */ /*--------------------------------------------------------------------*/ /* */ /* Modifications: */ /* */ /* AUTHOR | DATE | COMMENT */ /* ----------------|--------------|-------------------------------- */ /* | | */ /* | | */ /* */ /*====================================================================*/ // precompiled headers: basic OWL-Stuff #ifndef __WINDOWS_H #include "windows.h" #endif #ifndef __OWL_H #include #endif #pragma hdrstop // resource IDs #ifndef FINGER_DEF #include "finger.h" #endif // main window #ifndef MAINWIN_DEF #include "mainwin.h" #endif /*====================================================================*/ /* finger application (declaration) */ /*====================================================================*/ _CLASSDEF(TFingerApp) class TFingerApp :public TApplication { public: // constructor TFingerApp(LPSTR AName, HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) : TApplication(AName, hInstance, hPrevInstance, lpCmdLine, nCmdShow) {}; // we need at least one window ... virtual void InitMainWindow(); // InitInstance loads the accelerators HAccTable virtual void InitInstance(); }; // TFingerApp class /*====================================================================*/ /* finger application (implementation) */ /*====================================================================*/ void TFingerApp::InitInstance() { char szBuffer[STRSIZESHORT+1]; TApplication::InitInstance(); LoadString(hInstance,IDS_ACCELER,(LPSTR)szBuffer,STRSIZESHORT); HAccTable = LoadAccelerators(hInstance,(LPSTR)szBuffer); } // InitMainWindow /*--------------------------------------------------------------------*/ void TFingerApp::InitMainWindow() { char szBuffer[STRSIZESHORT+1]; LoadString(hInstance,IDS_MAINTITLE,(LPSTR)szBuffer,STRSIZESHORT); MainWindow = new TMainWin((LPSTR)szBuffer); if ((!MainWindow) || (MainWindow->Status)) Status = EM_INVALIDMODULE; } // InitMainWindow /*====================================================================*/ int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { char szBuffer[STRSIZESHORT+1]; LoadString(hInstance,IDS_APPLICATION,(LPSTR)szBuffer,STRSIZESHORT); TFingerApp FingerApp((LPSTR)szBuffer, hInstance, hPrevInstance, lpCmdLine, nCmdShow); if (!FingerApp.Status) FingerApp.Run(); return FingerApp.Status; } // WinMain /*-End of FINGER.CPP--------------------------------------------------*/