Annotation of sbbs/sbbs3/ctrl/aboutboxformunit.cpp, revision 1.1.1.2

1.1       root        1: /* Synchronet Control Panel (GUI Borland C++ Builder Project for Win32) */
                      2: 
1.1.1.2 ! root        3: /* $Id: AboutBoxFormUnit.cpp,v 1.9 2004/10/18 00:00:07 rswindell Exp $ */
1.1       root        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:  *                                                                                                                                                     *
1.1.1.2 ! root        9:  * Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html         *
1.1       root       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: #include <vcl.h>
                     38: #pragma hdrstop
                     39: 
                     40: #include "AboutBoxFormUnit.h"
                     41: #include "emulvt.hpp"
                     42: #include "mailsrvr.h"
                     43: #include "ftpsrvr.h"
1.1.1.2 ! root       44: #include "websrvr.h"
        !            45: #include "services.h"
1.1       root       46: 
                     47: //---------------------------------------------------------------------------
                     48: #pragma package(smart_init)
                     49: #pragma resource "*.dfm"
                     50: TAboutBoxForm *AboutBoxForm;
                     51: //---------------------------------------------------------------------------
                     52: __fastcall TAboutBoxForm::TAboutBoxForm(TComponent* Owner)
                     53:        : TForm(Owner)
                     54: {
                     55: }
                     56: //---------------------------------------------------------------------------
                     57: void __fastcall TAboutBoxForm::FormShow(TObject *Sender)
                     58: {
                     59:     Memo->Lines->Clear();
                     60: 
                     61:     DWORD i;
                     62:     unsigned int len=GetFileVersionInfoSize(
                     63:          Application->ExeName.c_str()  // pointer to filename string
                     64:         ,&i            // pointer to variable to receive zero
                     65:         );
                     66:     BYTE* buf=(BYTE *)malloc(len);
                     67:     if(buf==NULL) {
                     68:         Memo->Lines->Add("MALLOC ERROR!");
                     69:         return;
                     70:     }
                     71:     GetFileVersionInfo(
                     72:          Application->ExeName.c_str()  // pointer to filename string
                     73:         ,i                 // ignored
                     74:         ,len           // size of buffer
                     75:         ,buf           // pointer to buffer to receive file-version info.
                     76:         );
                     77: 
                     78:     VS_FIXEDFILEINFO* Ver;
                     79:     len=sizeof(Ver);
                     80:     VerQueryValue(
                     81:          buf            // address of buffer for version resource
                     82:         ,"\\"          // address of value to retrieve
                     83:         ,(void **)&Ver  // address of buffer for version pointer
                     84:         ,&len          // address of version-value length buffer
                     85:         );
                     86:     free(buf);
                     87: 
                     88:     char compiler[32];
                     89:        wsprintf(compiler,"BCC %X.%02X"
                     90:                ,__BORLANDC__>>8
                     91:                ,__BORLANDC__&0xff);
                     92: 
                     93:     char ver[256];
                     94:     wsprintf(ver,"Synchronet Control Panel v%u.%u.%u.%u%s%s  "
                     95:         "Compiled %s %s with %s"
                     96:         ,Ver->dwFileVersionMS>>16
                     97:         ,Ver->dwFileVersionMS&0xffff
                     98:         ,Ver->dwFileVersionLS>>16
                     99:         ,Ver->dwFileVersionLS&0xffff
                    100:         ,Ver->dwFileFlags&VS_FF_DEBUG ?
                    101:             " Debug" : ""
                    102:         ,Ver->dwFileFlags&VS_FF_PRERELEASE ?
                    103:             " Pre-release" : ""
                    104:         ,__DATE__, __TIME__, compiler
                    105:         );
                    106: 
                    107:     Memo->Lines->Add(bbs_ver());
                    108:     Memo->Lines->Add(mail_ver());
                    109:     Memo->Lines->Add(ftp_ver());
1.1.1.2 ! root      110:     Memo->Lines->Add(web_ver());    
        !           111:     Memo->Lines->Add(services_ver());
1.1       root      112:     Memo->Lines->Add(ver);
1.1.1.2 ! root      113:     Memo->Lines->Add("Synchronet Local Spy ANSI Terminal Emulation"
        !           114:         + CopyRight);
        !           115:     Memo->Lines->Add(AnsiString(js_ver())
        !           116:         + " (c) 1998 Netscape Communications Corp.");
        !           117: }
        !           118: //---------------------------------------------------------------------------
        !           119: void __fastcall TAboutBoxForm::WebPageLabelClick(TObject *Sender)
        !           120: {
        !           121:     ShellExecute(Handle, "open", ((TLabel*)Sender)->Hint.c_str(),
        !           122:         NULL,NULL,SW_SHOWDEFAULT);
        !           123: }
        !           124: //---------------------------------------------------------------------------
        !           125: void __fastcall TAboutBoxForm::LogoClick(TObject *Sender)
        !           126: {
        !           127:     ShellExecute(Handle, "open", "http://www.synchro.net",
        !           128:         NULL,NULL,SW_SHOWDEFAULT);
1.1       root      129: }
                    130: //---------------------------------------------------------------------------
                    131: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.