|
|
1.1 ! root 1: /* Synchronet Control Panel (GUI Borland C++ Builder Project for Win32) */ ! 2: ! 3: /* $Id: AboutBoxFormUnit.cpp,v 1.11 2006/12/29 02:53:39 rswindell Exp $ */ ! 4: ! 5: /**************************************************************************** ! 6: * @format.tab-size 4 (Plain Text/Source Code File Header) * ! 7: * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * ! 8: * * ! 9: * Copyright 2006 Rob Swindell - http://www.synchro.net/copyright.html * ! 10: * * ! 11: * This program is free software; you can redistribute it and/or * ! 12: * modify it under the terms of the GNU General Public License * ! 13: * as published by the Free Software Foundation; either version 2 * ! 14: * of the License, or (at your option) any later version. * ! 15: * See the GNU General Public License for more details: gpl.txt or * ! 16: * http://www.fsf.org/copyleft/gpl.html * ! 17: * * ! 18: * Anonymous FTP access to the most recent released source is available at * ! 19: * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net * ! 20: * * ! 21: * Anonymous CVS access to the development source and modification history * ! 22: * is available at cvs.synchro.net:/cvsroot/sbbs, example: * ! 23: * cvs -d :pserver:[email protected]:/cvsroot/sbbs login * ! 24: * (just hit return, no password is necessary) * ! 25: * cvs -d :pserver:[email protected]:/cvsroot/sbbs checkout src * ! 26: * * ! 27: * For Synchronet coding style and modification guidelines, see * ! 28: * http://www.synchro.net/source.html * ! 29: * * ! 30: * You are encouraged to submit any modifications (preferably in Unix diff * ! 31: * format) via e-mail to [email protected] * ! 32: * * ! 33: * Note: If this box doesn't appear square, then you need to fix your tabs. * ! 34: ****************************************************************************/ ! 35: ! 36: //--------------------------------------------------------------------------- ! 37: #ifdef USE_CRYPTLIB ! 38: #include "cryptlib.h" ! 39: #endif ! 40: ! 41: #include <vcl.h> ! 42: #pragma hdrstop ! 43: ! 44: #include "AboutBoxFormUnit.h" ! 45: #include "emulvt.hpp" ! 46: #include "mailsrvr.h" ! 47: #include "ftpsrvr.h" ! 48: #include "websrvr.h" ! 49: #include "services.h" ! 50: ! 51: //--------------------------------------------------------------------------- ! 52: #pragma package(smart_init) ! 53: #pragma resource "*.dfm" ! 54: TAboutBoxForm *AboutBoxForm; ! 55: //--------------------------------------------------------------------------- ! 56: __fastcall TAboutBoxForm::TAboutBoxForm(TComponent* Owner) ! 57: : TForm(Owner) ! 58: { ! 59: } ! 60: //--------------------------------------------------------------------------- ! 61: void __fastcall TAboutBoxForm::FormShow(TObject *Sender) ! 62: { ! 63: Credits->Lines->Clear(); ! 64: ! 65: DWORD i; ! 66: unsigned int len=GetFileVersionInfoSize( ! 67: Application->ExeName.c_str() // pointer to filename string ! 68: ,&i // pointer to variable to receive zero ! 69: ); ! 70: BYTE* buf=(BYTE *)malloc(len); ! 71: if(buf==NULL) { ! 72: Credits->Lines->Add("MALLOC ERROR!"); ! 73: return; ! 74: } ! 75: GetFileVersionInfo( ! 76: Application->ExeName.c_str() // pointer to filename string ! 77: ,i // ignored ! 78: ,len // size of buffer ! 79: ,buf // pointer to buffer to receive file-version info. ! 80: ); ! 81: ! 82: VS_FIXEDFILEINFO* Ver; ! 83: len=sizeof(Ver); ! 84: VerQueryValue( ! 85: buf // address of buffer for version resource ! 86: ,"\\" // address of value to retrieve ! 87: ,(void **)&Ver // address of buffer for version pointer ! 88: ,&len // address of version-value length buffer ! 89: ); ! 90: free(buf); ! 91: ! 92: char compiler[32]; ! 93: wsprintf(compiler,"BCC %X.%02X" ! 94: ,__BORLANDC__>>8 ! 95: ,__BORLANDC__&0xff); ! 96: ! 97: char ver[256]; ! 98: wsprintf(ver,"Synchronet Control Panel v%u.%u.%u.%u%s%s " ! 99: "Compiled %s %s with %s" ! 100: ,Ver->dwFileVersionMS>>16 ! 101: ,Ver->dwFileVersionMS&0xffff ! 102: ,Ver->dwFileVersionLS>>16 ! 103: ,Ver->dwFileVersionLS&0xffff ! 104: ,Ver->dwFileFlags&VS_FF_DEBUG ? ! 105: " Debug" : "" ! 106: ,Ver->dwFileFlags&VS_FF_PRERELEASE ? ! 107: " Pre-release" : "" ! 108: ,__DATE__, __TIME__, compiler ! 109: ); ! 110: ! 111: Credits->Lines->Add(bbs_ver()); ! 112: Credits->Lines->Add(mail_ver()); ! 113: Credits->Lines->Add(ftp_ver()); ! 114: Credits->Lines->Add(web_ver()); ! 115: Credits->Lines->Add(services_ver()); ! 116: Credits->Lines->Add(ver); ! 117: Credits->Lines->Add("Synchronet Local Spy ANSI Terminal Emulation" ! 118: + CopyRight); ! 119: Credits->Lines->Add(AnsiString(js_ver()) ! 120: + " (c) 1998 Netscape Communications Corp."); ! 121: ! 122: #ifdef USE_CRYPTLIB ! 123: wsprintf(ver,"Cryptlib v%u.%u.%u.%u" ! 124: ,CRYPTLIB_VERSION/1000 ! 125: ,(CRYPTLIB_VERSION/100)%10 ! 126: ,(CRYPTLIB_VERSION/10)%10 ! 127: ,CRYPTLIB_VERSION%10); ! 128: Credits->Lines->Add(AnsiString(ver) + ! 129: " Copyright 1992-2006 Peter Gutmann. All rights reserved."); ! 130: #endif ! 131: } ! 132: //--------------------------------------------------------------------------- ! 133: void __fastcall TAboutBoxForm::WebPageLabelClick(TObject *Sender) ! 134: { ! 135: ShellExecute(Handle, "open", ((TLabel*)Sender)->Hint.c_str(), ! 136: NULL,NULL,SW_SHOWDEFAULT); ! 137: } ! 138: //--------------------------------------------------------------------------- ! 139: void __fastcall TAboutBoxForm::LogoClick(TObject *Sender) ! 140: { ! 141: ShellExecute(Handle, "open", ((TImage*)Sender)->Hint.c_str(), ! 142: NULL,NULL,SW_SHOWDEFAULT); ! 143: } ! 144: //--------------------------------------------------------------------------- ! 145: void __fastcall TAboutBoxForm::CreditsClick(TObject *Sender) ! 146: { ! 147: ShellExecute(Handle, "open", ((TMemo*)Sender)->Hint.c_str(), ! 148: NULL,NULL,SW_SHOWDEFAULT); ! 149: } ! 150: //--------------------------------------------------------------------------- ! 151:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.